-
Notifications
You must be signed in to change notification settings - Fork 147
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
ECDSA sample code #885
Comments
Hi, and thanks for your interest. If I understand correctly, you are asking about multiplication and inversion modulo the order of the P256 group -- please correct me if I am wrong. We do not have pregenerated code for this, and we haven't tried out this field before (I think), but it may still work out anyway:
|
You will now automatically get divstep code when you invoke the montgomery binary. Examples of turning divstep into inversion via a loop are at, e.g., fiat-crypto/inversion-c/p224_64.c Lines 1 to 9 in 84eba63
|
Thanks for your replies, I'll look into that later this week. A brief note on performance: this is not critical, I'm more interested in the extraction with a constant time behavior (better constant time and safe than fast and sorry). |
The C code our tools generate is intended to be straightforwardly compilable to constant-time machinecode for machines with constant-time multiplication and cmov. As it's C, there is always some chance (and precedent) that a compiler change might optimize our bit manipulation into a branch, so it's best to check. |
Constant time inversion is now available: |
thanks for your kind comments and fixes (e31a36d), I managed to generate code for |
Hi,
thanks for your very nice work on fiat. We are using it (https://github.com/mirage/fiat) - with (not verfied) inversion, point_double and point_add function to compute ECDH P256. Now I've a question for developing ECDSA (P256) support, where I miss some functionality (or: are you aware of third-part C code implementing them - I was not able to sufficiently understand boringssl?):
Thanks again for your time.
The text was updated successfully, but these errors were encountered: