Skip to content

Implement Zeroize for NonIdentity#1832

Merged
tarcieri merged 1 commit into
RustCrypto:masterfrom
khonsulabs:zeroize-non-identity
Apr 27, 2025
Merged

Implement Zeroize for NonIdentity#1832
tarcieri merged 1 commit into
RustCrypto:masterfrom
khonsulabs:zeroize-non-identity

Conversation

@daxpedda
Copy link
Copy Markdown
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
Copy Markdown
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