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

Add error/keypair modules and documentation for VRF crate (based on #1794) #1796

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

omibo
Copy link

@omibo omibo commented Mar 14, 2025

Summary

This pull request adds the following to the draft proposed by @carloskiki in #1794 to the issue [#1728]:

  • Error Module: Introduced a dedicated error type and improved error handling for VRF operations.
  • Keypair Module: Added a keypair structure to encapsulate private/public keys more cleanly.
  • Documentation: Wrote additional comments and high-level documentation explaining how to use the VRF traits and keypair functions.

Notes

  • All commits from #1794 are included, retaining the original authorship by @carloskiki.

@carloskiki
Copy link

carloskiki commented Mar 14, 2025

signature already contains the Keypair and KeypairRef traits, I don't think we should duplicate them.

I am not in favor of having an error type. Proving, verifying and hashing are all defined as infallible in RFC9381. Except for ECVRF proof to hash, where it can fail because of proof string deserialization. This is not a concern for us because we implement Proof for a concrete type that is already deserialized. I understand that signature does have an error type so if someone is able to prove any benefit of having it then I am fine with it.

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