-
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
Curve x448 has wrong order value #5810
Comments
I think this is a bug in |
That's the point. Actually it "affects" to all curves, since |
Note: the "needs: backports" is to let us know that the backport needs to be reviewed and approved |
Summary
When curve x448 is loaded via
mbedtls_ecp_group_load
, theN
value is wrong. Instead of being set to2^446 - 0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d
is set to2^446 + 0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d
(note sign), giving another different number.It does not seem to break anything important, since curve x448 does not use
N
for arithmetics (EdDSA does!), but in any case, it takes a wrong value. This is produced becausembedtls_ecp_group_load
frees the mpi and the bit sign is not set up later.System information
Mbed TLS version (number or commit id): 2d89b40
Operating system and version: all
Configuration (if not default, please attach
mbedtls_config.h
): defaultCompiler and options (if you used a pre-built binary, please indicate how you obtained it): just
make
Additional environment information:
Expected behavior
N
should be2^446 - 0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d
Actual behavior
N
is2^446 + 0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d
Steps to reproduce
Additional information
The text was updated successfully, but these errors were encountered: