Add unit tests for ECDSA-SM3 signatures #894

Open
opened 2026-09-04 07:51:38 -05:00 by ronald-cron-arm · 0 comments
ronald-cron-arm commented 2026-09-04 07:51:38 -05:00 (Migrated from github.com)

Suggested enhancement

Depends on: https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/874 and https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/887

Add correctness unit tests based on sign_verify_message(), verify_hash() and verify_message() test functions for ECDSA-SM3 and ECDSA-DETERMINISTIC-SM3 signature algorithms. For verify_hash() and verify_message() based tests, compute the expected signature with a third party library. It seems to be doable with the PyCryptodome library.

Out of scope:
HMAC-DRBG-SM3 testing
HMAC-SM3 support in MD implies HMAC-DRBG-SM3 support as for any hash based MAC. No need to add SM3 specific HMAC-DRBG unit tests.

Justification

TF-PSA-Crypto needs this to tests ECDSA signatures with the SM3 hash.

### Suggested enhancement Depends on: https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/874 and https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/887 Add correctness unit tests based on `sign_verify_message()`, `verify_hash()` and `verify_message()` test functions for ECDSA-SM3 and ECDSA-DETERMINISTIC-SM3 signature algorithms. For `verify_hash()` and `verify_message()` based tests, compute the expected signature with a third party library. It seems to be doable with the PyCryptodome library. Out of scope: HMAC-DRBG-SM3 testing HMAC-SM3 support in MD implies HMAC-DRBG-SM3 support as for any hash based MAC. No need to add SM3 specific HMAC-DRBG unit tests. ### Justification TF-PSA-Crypto needs this to tests ECDSA signatures with the SM3 hash.
Sign in to join this conversation.
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#894
No description provided.