specs/voting/shared/v0_1/voting
library
Classes
-
Answer
-
The answer to one question. Exactly one member besides
question is present,
matching the question's type, or abstain for an optional question left
unanswered.
-
Ballot
-
An open ballot: one answer per question of the manifest, in any order. The bytes a
cast's proof binds are the RFC 8785 (JCS) canonicalization of this object as
received.
-
BoardHead
-
A board's tree head (RFC 9162 §2.1). A head is signed by being carried in a
document the ballot box signs; whoever keeps a head keeps that whole document.
-
Cast
-
A ballot and the PCS attestation that admits it (VTI-VOT-030).
attestation is the
suite's canonical encoding of the attestation made for the election point with the
ballot context bound in (CONVENTIONS §3); tag repeats its tag so a ballot box can
refuse a duplicate before the pairing check.
-
Dealing
-
A trustee's contribution to the election key: Feldman commitments to its
polynomial, a proof of knowledge of the constant term, and one share per trustee
sealed to that trustee's transport key (CONVENTIONS §9.6).
-
DecryptionTarget
-
What a partial decryption decrypts: the sealed cast at a board leaf, or the total
of one option of one question.
-
Disclosure
-
The statement a community publishes, and shows a member before they request a
ticket, about how one election is run (VTI-VOT-090). Generated from the election's
manifest and the community's configuration, never written by hand.
-
ElectionKey
-
The election key and each trustee's public verification key, computed from the
qualified dealings (CONVENTIONS §9.6). Anyone can recompute it from the board.
-
ElectionKeyVerificationItem
-
ElectionKeyVerificationItem, generated from its schema.
-
ElectionResult
-
An election's result, computable by anyone who can read its board from the board
and the registration alone (VTI-VOT-070).
-
ElectionSummary
-
A ballot box's view of one election.
-
ElGamalCiphertext
-
(a, b) = (r·G, M + r·Y) under the election key Y (CONVENTIONS §9.2).
-
EncryptedBallot
-
A tallied-encrypted ballot: one EncryptedQuestion per manifest question, in the
manifest's order. Never decrypted (VTI-VOT-064).
-
EncryptedCast
-
A cast of a sealed or tallied-encrypted election: exactly one of
sealed (the
Ballot's JCS bytes sealed to the election key) or encrypted, with the tag and the
attestation over the JCS bytes of whichever is present (CONVENTIONS §3.6, §9.5).
-
EncryptedOption
-
EncryptedOption
-
EncryptedQuestion
-
One choice question of a tallied-encrypted ballot: per option, in the manifest's
order, an encryption of 0 or 1 with its proof; and a proof that the selections sum
to a count the question admits (CONVENTIONS §9.5).
-
Manifest
-
What an election asks and how it is decided (VTI-VOT-010). Its digest
(
manifestDigest) is the SHA-256 multihash of its RFC 8785 (JCS) canonicalization,
and every cast is bound to it (VTI-VOT-011).
-
ManifestBoard
-
ManifestBoard, generated from its schema.
-
PartialDecryption
-
Trustee
trustee's share of one decryption, d = x_j·a, with a Chaum–Pedersen
proof against its verification key (CONVENTIONS §9.7).
-
QuestionOption
-
QuestionOption
-
QuestionResult
-
One question's totals.
choice: selections per option. ranking: per option, how
many ballots placed it at each position (index 0 = first). score: per option, the
sum and the number of ballots that scored it. text: the answers, in board order,
withheld (withheld: true) below the manifest's textReleaseThreshold.
abstained counts ballots that left the question unanswered.
-
QuestionResultScoreValue
-
QuestionResultScoreValue, generated from its schema.
-
RollRule
-
Who may be issued a ticket (VTI-VOT-021): the community's active members, its
active members and the parties
listed names, or only the parties listed names.
-
SealedPayload
-
Bytes sealed to a key: a random group element encrypted as
kem, and the bytes
under ChaCha20-Poly1305 with a key derived from it, multibase base58btc
(CONVENTIONS §9.4).
-
SealedShare
-
SealedShare
-
SigmaProof
-
A non-interactive sigma proof as its challenge and response
(c, z) (Schnorr or
Chaum–Pedersen; CONVENTIONS §9.3).
-
TransportKey
-
The group element a trustee's shares are sealed to, with a Schnorr proof of
knowledge of its discrete log (CONVENTIONS §9.6).
-
Trustees
-
The trustees of a sealed or tallied-encrypted election and the number of them
decryption needs (VTI-VOT-062). Neither the community nor the ballot box may be
one.
-
VotingParameters
-
The community's published voting parameters: the PCS suite and the voting
verification key tickets are issued under (VTI-VOT-020). Distinct from its
hidden-vetting helper key.
Extension Types
-
BoardVisibility
-
public: anyone reads the board. private: the community, the auditors the
manifest names and, for one cast's inclusion, the holder of its receipt
(VTI-VOT-052).
-
ElectionState
-
ElectionState is a closed set of string values defined by this specification's
schema.
-
Revote
-
What a later, different ballot under one ticket does:
replace the earlier one, or
be refused (refuse) (VTI-VOT-041).
-
RollRuleRule
-
RollRuleRule is a closed set of string values defined by this specification's
schema.
-
SecrecyLevel
-
open: ballots are recorded on the board as cast. sealed: ballots are encrypted
to a jointly generated election key and decrypted after voting closes.
talliedEncrypted: ballots are encrypted and only the totals are ever decrypted
(VTI-VOT-060). The encrypted levels are cast with
voting/ballot/cast-encrypted/0.1, under an election key the trustees generate
with voting/trustees/* (CONVENTIONS §9).
-
TrusteePhase
-
enrolling: transport keys are being published. dealing: dealings are.
confirming: each trustee confirms or complains. keyed: the election key is
formed. decrypting: voting has closed and partial decryptions are being
published. done: every target is decrypted. failed: the key could not be formed
in time.
Typedefs
-
BoardEntry
= Object?
-
One leaf of a board. A leaf's hash is the RFC 9162 leaf hash of the JCS
canonicalization of this object. Entries carry no time of arrival: the order is the
board's, and a timestamp would hand anyone who reads the board the timing the
registrar's log would need to pair a ticket with its cast.
-
DigestMultibase
= String
-
A cryptographic digest as a multibase-encoded multihash — the encoding the W3C
Verifiable Credentials Data Model 2.0 defines for
digestMultibase, and the one
did:webvh uses for its SCID and entry hashes. Multihash carries the hash
algorithm in-band, so the value is self-describing and the wire format survives an
algorithm change without a schema revision; multibase does the same for the base
encoding, so a verifier never infers base58 from base64url by context. A bare hex
string or a sha-256:-style prefix hard-codes one algorithm into the wire contract
and is non-conforming here. This definition constrains the encoding only. What
the digest is computed over is stated by each referencing field, because it differs
legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS)
canonicalization, while a digest over an opaque artifact is taken over its bytes. A
field whose input is a JSON document and which does not name a canonicalization is
not reproducible. Restricted to the two multibase headers W3C Controlled
Identifiers 1.0 §2.4 normatively requires — z (base58btc) and u
(base64url-no-pad). CID permits others but states that "interoperability is not
guaranteed between implementations using such values", and a registry whose purpose
is interoperability should not mint digests a conforming verifier may be unable to
read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I
and l, and an earlier permissive pattern let three published examples carry digests
that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with
did:key and did:webvh.
-
DisjunctiveProof
= List<SigmaProof>
-
A disjunctive proof that a ciphertext encrypts one value of a public list: one
(c, z) per value, in the list's order (CONVENTIONS §9.3).
-
ElectionId
= String
-
An election's identifier, unique within its community. A closed alphabet: it
appears in the ticket class label
voter/<electionId> and is framed into every
hash a cast is bound to.
-
GroupElement
= String
-
A Ristretto group element: its 32-byte compression, multibase base58btc. Never the
identity (CONVENTIONS §9.1).
-
GroupScalar
= String
-
A scalar mod the Ristretto group order: 32 canonical little-endian bytes, multibase
base58btc (CONVENTIONS §9.1).
-
Key
= String
-
A question or option key, unique within its manifest or question.
-
MerklePath
= List<DigestMultibase>
-
An RFC 9162 audit or consistency path: the node hashes, in the order §2.1.3 /
§2.1.4 define.
-
Multibase
= String
-
A binary value, multibase base58btc over the suite's canonical (compressed)
encoding.
-
Question
= Object?
-
One question. Tagged union over
type.
-
TrusteeIndex
= int
-
A trustee's index: its position in the manifest's
trustees.dids, counting from 1.