-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[Backport 2.28] Add test for ECP group metadata #6204
Conversation
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
83ec0bd
to
e5c06ae
Compare
Test cases added to check curve parameters and information for each curve supported. Expected parameters are taken from references: SEC 2 for NIST, RFC 5639 for Brainpool, and RFC 7748 for curve25519/curve448. Signed-off-by: Werner Lewis <werner.lewis@arm.com>
e5c06ae
to
60b50e1
Compare
Spec values are now always used for test data, and conversion to internal representation is done in the test function. Signed-off-by: Werner Lewis <werner.lewis@arm.com>
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
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.
This is a faithful backport.
Please note that the original PR has been merged and this backport has not. |
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.
LGTM as a backport of #6203
return 1; | ||
if( grp1->T_size != grp2->T_size ) | ||
return 1; | ||
if( grp1->T != grp2->T ) |
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.
This looks wrong: all the other embedded data is compared by value, but this field is compared by reference. However, it's evidently enough for what this function is used for, and it's the same in development
, so that's ok for now. Filed for later
Description
Trivial backport of #6203, with additional commit to include
mbedtls_ecp_group_cmp
, taken from development branch.Test cases added to check curve parameters and information for each
curve supported. Expected parameters are taken from references: SEC 2
for NIST, RFC 5639 for Brainpool, and RFC 7748 for curve25519/curve448.
Status
READY