Add support for SM3 hash algorithm though the PSA crypto hash APIs #895

Open
ronald-cron-arm wants to merge 23 commits from ronald-cron-arm/sm3-base into development
ronald-cron-arm commented 2026-09-04 09:05:14 -05:00 (Migrated from github.com)

Description

Fixes #874 and #887

Out of scope: ECDSA-SM3, RSA-PSS-SM3, RSA PKCS#1 v1.5-SM3, HMAC_DRBG-SM3 and PBKDF2-HMAC-SM3 testing.
See SM3 EPIC in https://github.com/orgs/Mbed-TLS/projects/22

Only the last seven commits are up for review. The preceding commits are from the original PR adding SM3 support and have been added to the Git history to acknowledge that its implementation was reused as the basis for the SM3 implementation provided by this PR.

PR checklist

  • changelog not required because: will add one when support is complete
  • framework PR provided Mbed-TLS/mbedtls-framework#320
  • TF-PSA-Crypto development PR provided here
  • TF-PSA-Crypto 1.1 PR not required because: new feature, development only
  • mbedtls development PR not required because: crypto only
  • mbedtls 4.1 PR not required because: crypto only
  • mbedtls 3.6 PR not required because: crypto only
  • tests provided
## Description Fixes #874 and #887 Out of scope: ECDSA-SM3, RSA-PSS-SM3, RSA PKCS#1 v1.5-SM3, HMAC_DRBG-SM3 and PBKDF2-HMAC-SM3 testing. See SM3 EPIC in https://github.com/orgs/Mbed-TLS/projects/22 Only the last seven commits are up for review. The preceding commits are from the [original PR](https://github.com/Mbed-TLS/mbedtls/pull/4492) adding SM3 support and have been added to the Git history to acknowledge that its implementation was reused as the basis for the SM3 implementation provided by this PR. ## PR checklist - [x] **changelog** not required because: will add one when support is complete - [x] **framework PR** provided Mbed-TLS/mbedtls-framework#320 - [x] **TF-PSA-Crypto development PR** provided here - [x] **TF-PSA-Crypto 1.1 PR** not required because: new feature, development only - [x] **mbedtls development PR** not required because: crypto only - [x] **mbedtls 4.1 PR** not required because: crypto only - [x] **mbedtls 3.6 PR** not required because: crypto only - **tests** provided
valeriosetti (Migrated from github.com) reviewed 2026-09-04 09:05:14 -05:00
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'ronald-cron-arm/sm3-base:ronald-cron-arm/sm3-base'
git switch 'ronald-cron-arm/sm3-base'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'development'
git merge --no-ff 'ronald-cron-arm/sm3-base'
git switch 'ronald-cron-arm/sm3-base'
git rebase 'development'
git switch 'development'
git merge --ff-only 'ronald-cron-arm/sm3-base'
git switch 'ronald-cron-arm/sm3-base'
git rebase 'development'
git switch 'development'
git merge --no-ff 'ronald-cron-arm/sm3-base'
git switch 'development'
git merge --squash 'ronald-cron-arm/sm3-base'
git switch 'development'
git merge --ff-only 'ronald-cron-arm/sm3-base'
git switch 'development'
git merge 'ronald-cron-arm/sm3-base'
git push origin 'development'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto!895
No description provided.