Skip to content
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

impl Clone and PartialEq for ring::signature::Ed25519KeyPair #859

jimmycuadra opened this issue Jun 20, 2019 · 2 comments


None yet
3 participants
Copy link

commented Jun 20, 2019

ring::signature::Ed25519KeyPair is used in ruma-signatures in a type that I'd like to implement Clone and PartialEq. I'm wondering if there's a specific reason Ed25519KeyPair doesn't implement these traits, or if it was just never needed before.

I can work around this by keeping the public and private keys and just creating a new Ed25519KeyPair in a manual Clone impl, and comparing the public and private keys in a manual implementation of PartialEq, but I'm not sure if 1) there is some security implication to this 2) there is any sort of random state held in Ed25519KeyPair that would make two values not equal even if they were generated from the same key pair.

If it's in fact okay to implement these traits in ring, I'd be happy to submit a PR.


This comment has been minimized.

Copy link

commented Jun 24, 2019

👍 this would be great for rcgen as well: est31/rcgen#17

Optimally, all KeyPair structs would get Clone and PartialEq (maybe Eq even)


This comment has been minimized.

Copy link

commented Jul 9, 2019

Possibly related prior discussion: #727

jimmycuadra added a commit to ruma/ruma-signatures that referenced this issue Jul 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.