Commit ed949d7
authored
Mastic clean up (#1187)
* mastic: Remove `verify_key` from tests that don't use it
Some tests in the `mastic` module generate verification keys that aren't
actually used by the test. Incidentally, the same tests were
generating keys of the wrong length.
* mastic: De-duplicate agg share length computation
Add a function that computes the length of the aggregate share in field
elements as a function of the aggregation parameter.
* vidpf: Improve `VidpfPublicShare::encoded_len()`
Avoid iterating over the weights to compute the length of the encoded
public share; just take the length of the first weight and multiply by
the number of correction words.
This computation assumes the length of each weight is equal to the
weight parameter at ever level of the VIDPF tree. This certainly is
true, but add a test to validate this assumption anyway.
* vidpf: Move `eval_prefix_tree_with_siblings()` to `impl<W: VidpfValue>`
This method is currently implemented for `Vidpf<VidpfWeight<F>>`, but it
applies to the more general `Vidpf<W>`.
* vdaf: Remove `domain_separation_tag()` from `Vdaf` trait
This method is used in Prio3 and Poplar1 for domain separation with the
version of the document that specifies them. This version control is not
applicable to future VDAFs defined by future documents.
Remove the method from the trait and add it to implementations of
`Prio3` and `Poplar1`.
* vidpf: Rename `weight_parameter` to `weight_len`
The associated type `ValueParameter` is likely always going to be a
`usize` that expresses the length. In the future we might consider
hardcoding this change in the API.1 parent 48bf7c6 commit ed949d7
5 files changed
+138
-139
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | 200 | | |
213 | 201 | | |
214 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
161 | | - | |
| 166 | + | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
| |||
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
255 | | - | |
256 | | - | |
| 260 | + | |
257 | 261 | | |
258 | 262 | | |
259 | 263 | | |
| |||
268 | 272 | | |
269 | 273 | | |
270 | 274 | | |
271 | | - | |
272 | | - | |
| 275 | + | |
273 | 276 | | |
274 | 277 | | |
275 | 278 | | |
| |||
425 | 428 | | |
426 | 429 | | |
427 | 430 | | |
428 | | - | |
| 431 | + | |
429 | 432 | | |
430 | 433 | | |
431 | | - | |
| 434 | + | |
432 | 435 | | |
433 | 436 | | |
434 | 437 | | |
| |||
774 | 777 | | |
775 | 778 | | |
776 | 779 | | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
| 780 | + | |
785 | 781 | | |
786 | 782 | | |
787 | 783 | | |
| |||
803 | 799 | | |
804 | 800 | | |
805 | 801 | | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
| 802 | + | |
810 | 803 | | |
811 | 804 | | |
812 | 805 | | |
| |||
866 | 859 | | |
867 | 860 | | |
868 | 861 | | |
869 | | - | |
870 | | - | |
871 | 862 | | |
872 | 863 | | |
873 | 864 | | |
| |||
947 | 938 | | |
948 | 939 | | |
949 | 940 | | |
950 | | - | |
951 | | - | |
952 | 941 | | |
953 | 942 | | |
954 | 943 | | |
| |||
1000 | 989 | | |
1001 | 990 | | |
1002 | 991 | | |
1003 | | - | |
1004 | | - | |
1005 | 992 | | |
1006 | 993 | | |
1007 | 994 | | |
| |||
1023 | 1010 | | |
1024 | 1011 | | |
1025 | 1012 | | |
1026 | | - | |
1027 | | - | |
1028 | 1013 | | |
1029 | 1014 | | |
1030 | 1015 | | |
| |||
1102 | 1087 | | |
1103 | 1088 | | |
1104 | 1089 | | |
1105 | | - | |
1106 | | - | |
1107 | 1090 | | |
1108 | 1091 | | |
1109 | 1092 | | |
| |||
1122 | 1105 | | |
1123 | 1106 | | |
1124 | 1107 | | |
1125 | | - | |
1126 | | - | |
1127 | 1108 | | |
1128 | 1109 | | |
1129 | 1110 | | |
| |||
1144 | 1125 | | |
1145 | 1126 | | |
1146 | 1127 | | |
1147 | | - | |
1148 | | - | |
1149 | 1128 | | |
1150 | 1129 | | |
1151 | 1130 | | |
| |||
1234 | 1213 | | |
1235 | 1214 | | |
1236 | 1215 | | |
1237 | | - | |
1238 | | - | |
1239 | 1216 | | |
1240 | 1217 | | |
1241 | 1218 | | |
| |||
1265 | 1242 | | |
1266 | 1243 | | |
1267 | 1244 | | |
1268 | | - | |
1269 | | - | |
1270 | 1245 | | |
1271 | 1246 | | |
1272 | 1247 | | |
| |||
1298 | 1273 | | |
1299 | 1274 | | |
1300 | 1275 | | |
1301 | | - | |
1302 | | - | |
1303 | 1276 | | |
1304 | 1277 | | |
1305 | 1278 | | |
| |||
1323 | 1296 | | |
1324 | 1297 | | |
1325 | 1298 | | |
1326 | | - | |
1327 | | - | |
1328 | 1299 | | |
1329 | 1300 | | |
1330 | 1301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
865 | 877 | | |
866 | 878 | | |
867 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
551 | 563 | | |
552 | 564 | | |
553 | 565 | | |
| |||
0 commit comments