VRF Selection Keys - Algorand Specifications
Keyboard shortcuts
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
- Auto
- Light
- Dark
Algorand Specifications
To check the validity of a voting message, its VRF Selection key needs to be verified. Algorand uses Verifiable Random Function (VRF) to generate selection keys.
More specifically, an unverified vote (UnauthenticatedVoteUnauthenticatedVote) has the following fields:
Raw Vote (RR), an inner struct contains SenderSender, RoundRound, PeriodPeriod, StepStep, and ProposalProposal.
Unverified Credential (CredCred) contains a single field ProofProof, which is a VRF proof.
Signature (SignatureSignature), one-time signature of the vote.
Important
IMPLEMENTATION:
Unauthenticated vote reference implementation.
Once receiving an unverified vote (UnauthenticatedVoteUnauthenticatedVote) from the network, an Algorand node verifies its VRF selection key by checking the validity of the VRF Proof (in CredCred), the committee membership parameters that it is conditioned on, and the voter’s voting stake.
If verified, the result of this verification is wrapped in a CredentialCredential struct, containing the following fields:
Unverifed Credential (UnauthenticatedCredentialUnauthenticatedCredential), the unverified selection key from the VRF proof.
Weight (WeightWeight), the weight of the vote.
VRF Output (VrfOutVrfOut), the cached output of VRF verification.
Domain Separation Enabled (DomainSeparationEnabledDomainSeparationEnabled, domain separation flag, now must be true by the protocol.
Hashable (HashableHashable), the original credential.
And this verified credential is wrapped in a VoteVote struct with Raw Vote (RR), Verified Credential (CredentialCredential), and Signature (SignatureSignature).
Important
IMPLEMENTATION:
Vote struct reference implementation.