-
Notifications
You must be signed in to change notification settings - Fork 125
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 Zeroize
to private key
#1770
Conversation
Docker tags |
Benchmark for 8ab6d83Click to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx! But I need it on Secp256k1PrivateKey as well :)
@CyonAlexRDX |
@CyonAlexRDX I did some implementation which uses |
All ones is not a valid Secp256k1PrivateKey. It is larger than the order of the curve. So best replace the key with the key 31 zeroes followed by 1, i.e the key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Maybe add a unit tests that calls zeroize()
on a non 1
private key and assert that it becomes SecretKeyWrapper::default()
?
Summary
Added derive of
Zeroize
andZeroizeOnDrop
toEd25519PrivateKey
. This is required by Sargon project (will be used thorught RET).