Skip to content

Implement Zeroize for NonIdentity #1832

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

Merged
merged 1 commit into from
Apr 27, 2025

Conversation

daxpedda
Copy link
Contributor

This PR implements Zeroize for NonIdentity setting it to G to prevent breaking any invariants.

I just realized that elliptic-curve accepts G as a valid PublicKey, which seems a bit dangerous to me. I guess 1 is also a valid SecretKey. I have no idea if other libraries take these cases into account.

@tarcieri
Copy link
Member

I just realized that elliptic-curve accepts G as a valid PublicKey, which seems a bit dangerous to me.

The only disallowed value currently is the additive identity. You could potentially propose restricting some other values which clearly shouldn't be valid public keys.

@tarcieri tarcieri merged commit 515c951 into RustCrypto:master Apr 27, 2025
12 checks passed
daxpedda added a commit to khonsulabs/traits that referenced this pull request May 15, 2025
This PR implements `Zeroize` for `NonIdentity` setting it to `G` to
prevent breaking any invariants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants