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

Use Public/SecretKey for the elliptic-curve implementation #300

Open
daxpedda opened this issue Dec 16, 2022 · 1 comment
Open

Use Public/SecretKey for the elliptic-curve implementation #300

daxpedda opened this issue Dec 16, 2022 · 1 comment

Comments

@daxpedda
Copy link
Contributor

daxpedda commented Dec 16, 2022

Currently we are using ProjectivePoint and Scalar directly instead of PublicKey and SecretKey respectively.

The reason was that curve25519_dalek::Scalar supports Zeroize but not ZeroizeOnDrop.
But elliptic_curve::SecretKey supports ZeroizeOnDrop but not Zeroize.
(this was one of the main reasons I worked on introducing ZeroizeOnDrop in the first place)

The best solution here would be to introduce a SecretKey for Ristretto255, which currently doesn't exist, we could introduce this type ourselves in opaque-ke though.

Not sure what to do about elliptic_curve::PublicKey, as it implements neither. Is not zeroing out the public key acceptable?

This is analogous to facebook/voprf#57 and is mainly for code improvement and cleaner deserialization, it doesn't actually change anything.

@kevinlewi
Copy link
Contributor

Hmm, I see. Yes, not zeroing out the public key should be fine in this case.

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

No branches or pull requests

2 participants