-
Notifications
You must be signed in to change notification settings - Fork 128
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
check for non-canonical field element representations #11
Comments
Key question - is there a valid case that MODULUS <= value <= MAX_DATA_TYPE_VALUE at the application level. Seems not. So the crypto library should just throw an informative error that it got a value that doesn't fit into MODULUS. This would also help to debug the application. |
I would vote for adding an informative error at the crypto library just because at the application level most of the devs are not that familiar with cryptography. By application level, I mean client level. |
Does this need to happen for the arguments of any other API functions than |
Following the latest specs (after ethereum/consensus-specs@23d3aee) I think the way to do it is put the check in |
Closed by #20 |
Considering the conversation here ethereum/consensus-specs#3057 and ongoing discussion, just want to record that the C library may need to detect and fail on non-canonical inputs (i.e., greater than the modulus).
The text was updated successfully, but these errors were encountered: