Repository navigation
Expand file tree
/
Copy pathplaintext_tally.schema.json
More file actions
156 lines (156 loc) · 4.6 KB
/
Copy pathplaintext_tally.schema.json
File metadata and controls
156 lines (156 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://electionguard.vote/schemas/1.91/plaintext-tally",
"title": "Plaintext Tally",
"description": "",
"type": "object",
"required": [
"tally_id",
"name",
"contests"
],
"definitions": {
"Tally": {
"title": "Vote",
"type": "integer",
"minimum": 0
},
"SequenceOrder": {
"title": "Sequence Order",
"description": "Used for ordering in a ballot to ensure various encryption primitives are deterministic.",
"type": "integer",
"minimum": 1
},
"ElementModP": {
"title": "ElementModP",
"description": "An element of the larger `mod p` space, i.e., in [0, P), where P is a 4096-bit prime.",
"type": "string"
},
"ElementModQ": {
"title": "ElementModQ",
"description": "An element of the smaller `mod q` space, i.e., in [0, Q), where Q is a 256-bit prime.",
"type": "string"
},
"PlaintextTallySelection": {
"title": "Plaintext Tally Selection",
"type": "object",
"required": [
"object_id",
"sequence_order",
"description_hash",
"tally",
"value",
"proof"
],
"properties": {
"object_id": {
"title": "Object Id",
"type": "string"
},
"sequence_order": {
"title": "Sequence Order",
"description": "The sequence order of the selection",
"$ref": "#/definitions/SequenceOrder"
},
"description_hash": {
"title": "Description Hash",
"description": "The hash of the SelectionDescription",
"$ref": "#/definitions/ElementModQ"
},
"tally": {
"title": "Tally",
"description": "The decrypted representation of the sum of all ballots for the selection t in the spec",
"$ref": "#/definitions/Tally"
},
"value": {
"description": "The decrypted representation of the sum of all ballots for the selection K^tally or T in the spec",
"$ref": "#/definitions/ElementModP"
},
"proof": {
"title": "Proofs",
"description": "The proof that the decrypted representation of the sum of all ballots for the selection is correct",
"type": "object",
"required": [
"pad",
"data",
"challenge",
"response"
],
"properties": {
"pad": {
"title": "Pad",
"description": "a in the spec",
"$ref": "#/definitions/ElementModP"
},
"data": {
"title": "Data",
"description": "b in the spec",
"$ref": "#/definitions/ElementModP"
},
"challenge": {
"title": "Challenge",
"description": "c in the spec",
"$ref": "#/definitions/ElementModQ"
},
"response": {
"title": "Response",
"description": "v in the spec",
"$ref": "#/definitions/ElementModQ"
}
}
}
}
},
"PlaintextTallyContest": {
"title": "Plaintext Tally Contest",
"type": "object",
"required": [
"object_id",
"sequence_order",
"description_hash",
"selections"
],
"properties": {
"object_id": {
"title": "Object Id",
"type": "string"
},
"sequence_order": {
"title": "Sequence Order",
"$ref": "#/definitions/SequenceOrder"
},
"description_hash": {
"title": "Description Hash",
"$ref": "#/definitions/ElementModQ"
},
"selections": {
"title": "Selections",
"description": "Represents an individual selection on a ballot",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/PlaintextTallySelection"
}
}
}
}
},
"properties": {
"tally_id": {
"title": "Tally Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string",
"description": "The name of the tally"
},
"contests": {
"title": "Contests",
"description": "Represents the summation of the votes for a specific ContestDescription",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/PlaintextTallyContest"
}
}
}
}