-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ecc.c and test.c changes to add support in ecc_sign_determinsitic.c #7700
Conversation
…or SHA256, SHA384, and SHA512 for SECP256R1, SECP384R1, SECP521R1.
…e called again. Fix possible leak with async and deterministic sign.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a new ECDSA signing API that will take the hash algorithm.
The original will call the new with WC_HASH_TYPE_NONE.
The new will pass the hash algorithm in.
The code to guess the hash algorithm is fine.
I would prefer not to add sign/verify variants. What about just extending the set_derministic API to accept a hash type? Suggested patch:
|
…erministic sign or verify.
I'm happy with that change. |
wolfcrypt/src/ecc.c
Outdated
} | ||
} | ||
|
||
/* For deterministic k only SHA2-256, SHA2-384 and SHA2-512 are supported */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SparkiDev do we need this restriction? Seems like any supported HMAC algo would be fine. As long as we properly fail later if the hash type is unsupported or invalid. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. We can remove this now.
retest this please |
Description
Added support for ECDSA deterministric K signing for all curves with SHA256, SHA384, and SHA512.
The tests for
ecc_test_deterministic_k
,ecc384_test_deterministic_k
, andecc521_test_deterministic_k
were not run becauseFIPS_VERSION_GE
was always defined.Added
wc_ecc_set_deterministic_ex
to support custom hash type for deterministic sign or verify. By default it will detect hash type based on input hash size.Feature request for ZD 14235
Testing