Expand description
Public data types exchanged across the API boundary.
All four types in this module are thin wrappers around their underlying curve / scalar representation. They exist so that:
- the public API never leaks
curve25519_dalektypes directly, which would force every caller to take a dependency on the same version of that crate; - every value has exactly one canonical byte and hex encoding;
- the type system stops you from accidentally passing, say, a
KeyImagewhere aPublicKeyis expected — they are both 32-byte Ristretto points, but they mean different things in the protocol.
Everything serialises to a fixed-size byte array (or a Vec<u8> for
signatures whose size depends on the ring). The encoding is the
curve25519-dalek canonical encoding for points (compressed Ristretto)
and the little-endian canonical encoding for scalars.
Structs§
- KeyImage
- The protocol’s “linking tag” — what the host stores to prevent double voting.
- Nonce
- A verifier-chosen nonce for an ownership proof (Operation D).
- Ownership
Proof - A proof of ownership of a
KeyImage, produced bycrate::prove_ownershipand checked bycrate::verify_ownership. - Public
Key - A voter’s public identity. Safe to publish.
- Secret
Key - A voter’s secret key.
- Signature
- A ring signature produced by
crate::sign_vote. - Vote
Proof - The full bundle returned by
crate::sign_vote: the proof and the linking tag.