Skip to content

TI C2000 example: add standalone SHA-2 and SHA-3 examples - #645

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:c2000_sha_examples
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:c2000_sha_examples

Conversation

@dgarske

@dgarske dgarske commented Oct 15, 2026

Copy link
Copy Markdown
Member

Adds two small standalone hash examples to embedded/ti-c2000-f28p55x so the SHA-2 and SHA-3 call flow can be read in one file each, without wolf_main.c or the upstream test/benchmark harness.

What it adds

  • Source/test_sha2.c (make SHA2=1) - SHA-224/256/384/512, SHA-512/224, SHA-512/256
  • Source/test_sha3.c (make SHA3=1) - SHA3-224/256/384/512, SHAKE128, SHAKE256
  • Source/c2000_board.c, Header/c2000_board.h - clocks, SCIA console and CPU Timer 0 for the two examples

Each example runs Init -> Update -> Final -> Free per variant on the FIPS 180-4 / FIPS 202 "abc" vector, a multi-Update streaming case, and a throughput loop through the generic wc_Hash* API.

Touches shared files

  • Makefile - SHA2=1 / SHA3=1 build only that family's wolfCrypt source; combining them with each other or any other toggle is a build error
  • Header/user_settings.h - WOLF_SHA2_EXAMPLE / WOLF_SHA3_EXAMPLE select one family, no RNG, no ML-DSA
  • 28p55x_wolf_flash_lnk.cmd - the .TI.ramfunc entries for sha3.obj / wc_mldsa.obj are skipped when those objects are not built
  • README.md - section on the two examples, noting that the default image's test.c / benchmark.c come from the wolfSSL tree

The default image and wolf_main.c are unchanged.

Hardware / test status

Validated on LAUNCHXL-F28P55X (XDS110, SCIA 115200 8N1): every KAT passes in both images and the throughput loop completes. The default image still builds.

@dgarske dgarske assigned dgarske and wolfSSL-Bot and unassigned dgarske Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants