Skip to content

testing/drivers/crypto: Add SH224 hash test#3514

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
pbarada:test/h753zi-hash
May 31, 2026
Merged

testing/drivers/crypto: Add SH224 hash test#3514
xiaoxiang781216 merged 1 commit into
apache:masterfrom
pbarada:test/h753zi-hash

Conversation

@pbarada
Copy link
Copy Markdown
Contributor

@pbarada pbarada commented May 30, 2026

Summary

-Add SHA224 hash test; expected results generated from sha224sum.
-Modify hash "huge block" testing since allocating 600KB to hash all at once fails on most microcontrollers. Instead allocate biggest block it can and pass into syshash_update() enough times to hash 600KB of data.

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

Testing performed:

  • Booted board and ran hash test utilities; verify test utilities use HW acceleration

Runtime testing:

From target console:

nsh> uname -a 
NuttX 12.13.0 7679bba75e-dirty May 30 2026 17:46:39 arm nucleo-h753zi 
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 a 153600 bytes to hash 614400 bytes)
sha1 huge block test success(4 passes over a 153600 bytes to hash 614400 bytes)   
sha224 huge block test success(4 passes over a 153600 bytes to hash 614400 bytes) 
sha256 huge block test success(4 passes over a 153600 bytes to hash 614400 bytes) 
nsh> 

Add SHA224 hash test using results generated from sha224sum.

Modify "huge block" testing since allocating 600KB to hash all
at once fails on most microcontrollers.  Instead allocate a
smaller block and pass into syshash_update() enough times to
hash 600KB of data.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
Copy link
Copy Markdown
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @pbarada :-)

@xiaoxiang781216 xiaoxiang781216 merged commit fa46bdf into apache:master May 31, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants