Skip to content

crypto: Support SHA2_224_HMAC#19294

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
pbarada:test/sha2_224_hmac
Jul 4, 2026
Merged

crypto: Support SHA2_224_HMAC#19294
xiaoxiang781216 merged 1 commit into
apache:masterfrom
pbarada:test/sha2_224_hmac

Conversation

@pbarada

@pbarada pbarada commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Since already have support for SHA2-224, extend cryptodev/cryptosoft to support HMAC version of SHA2-224.

Impact

  • User experience: No adaptation required. This fix extends existing behavior.
  • Build: No impact.
  • Hardware: No impact.
  • Documentation: Add mention of SHA2_224_HMAC crypto method.
  • Security: No impact.
  • Compatibility: Backward compatible - adds functionality.

Testing

Build Host:

  • OS: Ubuntu 24.04.4 LTS
  • Compiler: arm-none-eabi-gcc 13.2.1

Target:

  • Architecture: ARM (STM32H753ZI)
  • Board: Nucleo-h753zi
  • Configuration: nucleo-h753zi:crypto configuration followed by changing configuration:
    -- Enable CRYPTO_SW_AES
    -- Disable CRYPTO_CRYPTODEV_HARDWARE
    -- Enable CRYPTO_CRYPTODEV_SOTWARE_CRYPTO
    -- Enable TESTING_CRYPTO_HMAC

Runtime testing:

Modified version of nuttx-apps/testing/drivers/crypto/hmac.c to add SHA2_224_HMAC test results (generated by openssl) to run same HMAC testcase data through SHA2_224_HMAC crypto method (PR coming in nuttx-apps repository to submit these changes after this PR is merged).

From target console:

NuttShell (NSH) NuttX-13.0.0-RC0
nsh> uname -a
NuttX 13.0.0-RC0 7a4f270492-dirty Jul  3 2026 16:50:50 arm nucleo-h753zi
nsh> hmac
hmac md5 success
hmac md5 success
hmac md5 success
hmac md5 success
hmac md5 success
hmac sha1 success
hmac sha1 success
hmac sha1 success
hmac sha1 success
hmac sha1 success
hmac sha224 success
hmac sha224 success
hmac sha224 success
hmac sha224 success
hmac sha224 success
hmac sha256 success
hmac sha256 success
hmac sha256 success
hmac sha256 success
hmac sha256 success
nsh>

Since already have support for SHA2-224, extend cryptodev/cryptosoft
to support HMAC version of SHA2-224.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
@github-actions github-actions Bot added Size: S The size of the change in this PR is small Area: Crypto labels Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@xiaoxiang781216 xiaoxiang781216 merged commit fb42889 into apache:master Jul 4, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Crypto Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants