-
Notifications
You must be signed in to change notification settings - Fork 79
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
Crypto: Implement secp256r1 in constant time #245
Comments
No need to implement it, just use P256 from |
roman-khimov
added a commit
that referenced
this issue
Aug 26, 2019
It's the same implementation that we have in pkg/crypto (based on https://github.com/vsergeev/btckeygenie) but with tests preserved. I don't see any reason to port tests from it because even the pkg/crypto copy should go away to fix #245.
roman-khimov
added a commit
that referenced
this issue
Sep 4, 2019
As NEO uses P256 we can use standard crypto/elliptic library for almost everything, the only exception being decompression of the Y coordinate. For some reason the standard library only supports uncompressed format in its Marshal()/Unmarshal() functions. elliptic.P256() is known to have constant-time implementation, so it fixes #245 (and the decompression using big.Int operates on public key, so nobody really cares about that part being constant-time).
roman-khimov
added a commit
that referenced
this issue
Sep 4, 2019
As NEO uses P256 we can use standard crypto/elliptic library for almost everything, the only exception being decompression of the Y coordinate. For some reason the standard library only supports uncompressed format in its Marshal()/Unmarshal() functions. elliptic.P256() is known to have constant-time implementation, so it fixes #245 (and the decompression using big.Int operates on public key, so nobody really cares about that part being constant-time).
roman-khimov
added a commit
that referenced
this issue
Sep 5, 2019
As NEO uses P256 we can use standard crypto/elliptic library for almost everything, the only exception being decompression of the Y coordinate. For some reason the standard library only supports uncompressed format in its Marshal()/Unmarshal() functions. elliptic.P256() is known to have constant-time implementation, so it fixes #245 (and the decompression using big.Int operates on public key, so nobody really cares about that part being constant-time).
roman-khimov
added a commit
that referenced
this issue
Sep 5, 2019
As NEO uses P256 we can use standard crypto/elliptic library for almost everything, the only exception being decompression of the Y coordinate. For some reason the standard library only supports uncompressed format in its Marshal()/Unmarshal() functions. elliptic.P256() is known to have constant-time implementation, so it fixes #245 (and the decompression using big.Int operates on public key, so nobody really cares about that part being constant-time). New decompress function is inspired by https://stackoverflow.com/questions/46283760, even though the previous one really did the same thing just in a little less obvious way.
roman-khimov
added a commit
that referenced
this issue
Sep 5, 2019
Really simplifies our crypto library and fixes #245.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: