-
Notifications
You must be signed in to change notification settings - Fork 211
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
VRF crate #1794
base: master
Are you sure you want to change the base?
VRF crate #1794
Conversation
For a crate name, |
We could ask in the |
Yes, the maintainers seem active on github. If we decide to try getting the name |
Otherwise, we could abuse the |
@@ -0,0 +1,26 @@ | |||
use digest::{Output, OutputSizeUser}; | |||
|
|||
pub trait Proof<H> |
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.
If this is intended to be pi
in RFC9381 parlance it would be nice to note that in the rustdoc and also, what about serializing/deserializing pi
itself?
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.
Yes, I did not write any doc comments yet, because I'm not sure about the design and I want my ideas to mature a bit. But indeed, this is pi
, which means we should be able to serialize and deserialize it. This would be similar to SignatureEncoding
in the signature
crate.
Having both crates being so similar makes we wonder whether we really need a new crate for this. Using the Signer
trait to serve as a Prover
is an abuse of language, but both traits are the same semantically and the Verifier
trait would be identical in both crates. SignatureEncoding
also maps to vrfs because we need encoding/decoding for the proof. The only thing we are missing from the signature
crate would be a way of hashing the proof (VRF_proof_to_hash
in RFC9381).
Yes, traits from the The nice thing about a separate crate is it could have stricter bounds which would make things a bit easier to use. Instead of having to bound on |
Adding traits for Verifiable Random Functions. See #1728.
The
vrf
name oncrates.io
is taken. The current crate under this name seems unmaintained, the last commit being 3 years ago.The exact structure of the traits is not defined yet, I'm mostly looking for some input until we resolve the crate name and have some confidence that we have a good interface.