-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add secp256r1 support #7
Conversation
add tests for secp256r1 fix secp256r1 test create separated auth programs remove lazy static remove verbose outputs, add more comments add docs for secp256r1
c/secp256r1.h
Outdated
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; | ||
MUST_HAVE(aff_buf_len == affine_buffer_size); |
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.
Add a failed test case to trigger MUST_HAVE
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.
The aff_buf_len
is actually set from
Line 34 in f9d096e
CHECK(secp256r1_verify_signature(signature_ptr, SECP256R1_SIGNATURE_SIZE, pub_key_ptr, SECP256R1_PUBKEY_SIZE, msg, msg_len )); |
aff_buf_len
is always SECP256R1_PUBKEY_SIZE
. I refactor the code to return an error code instead of using MUST_HAVE
. The functionailty of MUST_HAVE
is been checked by manually flipping the condition here Line 96 in f9d096e
MUST_HAVE(ec_name != NULL); |
10410f0
to
c41c999
Compare
No description provided.