Skip to content

arch/arm/src/stm32h7: Extend crypto interface to support HW HASH/HMAC#19491

Merged
jerpelea merged 1 commit into
apache:masterfrom
pbarada:test/stm32h7-hash-crypt11
Jul 21, 2026
Merged

arch/arm/src/stm32h7: Extend crypto interface to support HW HASH/HMAC#19491
jerpelea merged 1 commit into
apache:masterfrom
pbarada:test/stm32h7-hash-crypt11

Conversation

@pbarada

@pbarada pbarada commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Extend stm32h7 HW crypto to support MD5, SHA1, SHA2-224, SHA2-256 accelerations along with their HMAC variants.

Impact

  • User experience: No adaptation required. This fix extends existing behavior.
  • Build: No impact.
  • Hardware: No impact.
  • Documentation: No impact..
  • 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

Runtime testing:

Booted, ran crc32, hsash, hmac, aescbc, and aesctr crypto test utilities and verified HW acceleration is used.

From target console:

NuttShell (NSH) NuttX-13.0.0
nsh> uname -a
NuttX 13.0.0 e26e38fefd-dirty Jul 20 2026 13:43:19 arm nucleo-h753zi
nsh> crc32
crc32 test case 1 success
crc32 test case 2 success
crc32 test case 3 success
crc32 test case 4 success
crc32 test case 5 success
crc32 test case 6 success
crc32 test case 7 success
crc32 test case 8 success
nsh> hash
hash md5 success
hash md5 success
hash md5 success
hash md5 success
hash md5 success
hash md5 success
hash md5 success
hash sha1 success
hash sha1 success
hash sha1 success
hash sha224 success
hash sha224 success
hash sha224 success
hash sha256 success
hash sha256 success
hash sha256 success
md5 huge block test success(4 passes over 153600 bytes to hash 614400 bytes)
sha1 huge block test success(4 passes over 153600 bytes to hash 614400 bytes)
sha224 huge block test success(4 passes over 153600 bytes to hash 614400 bytes)
sha256 huge block test success(4 passes over 153600 bytes to hash 614400 bytes)
md5 unaligned buffer size match success
sha1 unaligned buffer size match success
sha244 unaligned buffer size match success
sha256 unaligned buffer size match success
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 sha256 success
hmac sha256 success
hmac sha256 success
hmac sha256 success
hmac sha256 success
nsh> aescbc
aescbc test ok
nsh> aesctr
OK test vector 0
OK test vector 1
OK test vector 2
OK test vector 3
OK test vector 4
OK test vector 5
OK test vector 6
OK test vector 7
OK test vector 8
nsh>

@github-actions github-actions Bot added Arch: arm Issues related to ARM (32-bit) architecture Size: L The size of the change in this PR is large Board: arm labels Jul 20, 2026
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

Add stm32h7 support for HASH HW accelerator for MD5, SHA1, SHA2-224,
and SHA2-256 as well as their HMAC variants.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
@jerpelea
jerpelea merged commit c0e796e into apache:master Jul 21, 2026
38 checks passed
@pbarada
pbarada deleted the test/stm32h7-hash-crypt11 branch July 21, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Board: arm Size: L The size of the change in this PR is large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants