-
Notifications
You must be signed in to change notification settings - Fork 708
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 support for verifying P-521 signatures with SHA-512 and SHA-384 #1771
Comments
Regarding the test case data generation: I created a branch |
Regarding benchmarks: It turns out that the agreement (ECDH) benchmarks are sufficient for the private key operation side, as base point multiplication is handled by |
Here is the original version of |
I think most of the plan is now addressed. |
Work plan:
compute_public_key
(covers base point multiplication), ECDHagree_ephemeral
, (covers variable point multiplication), and ECDSA verification (covers twin point multiplication). We will use these benchmarks to verify that expanding the size ofPoint
,Elem
, andScalar
insrc/ec/suite_b/ops
does not negatively affect non-P-521 performance.mk/generate_curves.py
to also generate the boilerplate code in gfp_p384.c, in particular the definitions of the curve-specific constants.mk/generate_curves.py
to also generate the test input files p{256,384}elem{div_by_2,mul,neg,sum}_tests.txt. (Not strictly needed if we end up modifying and usinggenerate_tests.cc
to (re)generate test data files.)p{256,384}_point_mul_base_tests.txt
so that the points are NOT Montgomery-encoded. I started this in PR EC: Avoid Montgomery encoding in point arithmetic test data files. #1770 by creating a new test data file generator that generates non-Montgomery-encoded test data. Once the rest of the changes are made, this code generator can be run to generate the correct data files.consume_elem
,consume_point
, etc. insrc/ec/suite_b/ops.rs
so that when we read a not-Montgomery-encoded field element or point from a data file, the test scaffolding does the Montgomery-encoding itself before returning it.p{256,384}_point_{double,sum}_tests.txt
with tests that aren't sensitive to the Montgomery encoding. Whoever picks this up, let's make a plan for doing this beforehand.p521_elem_{div_by_2,mul,neg,sum}_test
,p521_elem_{div_by_2,mul,neg,sum}_test
, andp521_point_mul_test
.Work that was already done to support this:
PRIVATE_SCALAR_OPS.oneRR_mod_n.limbs
#1755, PR EC: Use only array types when crossing Rust<->C boundary #1758, and PR Replace limbs initializer with const from_hex #1702 improved the existing code to serve as a better model for the P-521 code.The text was updated successfully, but these errors were encountered: