Skip to content

Commit

Permalink
Add test vector exercising multiple proofs (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
divergentdave authored Dec 6, 2024
1 parent a57cc40 commit c0e76dc
Show file tree
Hide file tree
Showing 3 changed files with 370 additions and 1 deletion.
29 changes: 28 additions & 1 deletion poc/gen_test_vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os

from vdaf_poc.common import print_wrapped_line
from vdaf_poc.field import Field128
from vdaf_poc.field import Field64, Field128
from vdaf_poc.idpf import Idpf
from vdaf_poc.test_utils import gen_test_vec_for_vdaf, test_vec_gen_rand
from vdaf_poc.xof import Xof
Expand Down Expand Up @@ -180,6 +180,33 @@ def gen_test_vec_for_xof(cls: type[Xof]) -> None:
1,
)

# Prio3SumVec with a different field and multiple proofs
gen_test_vec_for_vdaf(
vdaf_test_vec_path,
vdaf_prio3.Prio3SumVecWithMultiproof(2, Field64, 3, 10, 8, 9),
None,
ctx,
[
list(range(10)),
[1] * 10,
[255] * 10
],
0,
)

gen_test_vec_for_vdaf(
vdaf_test_vec_path,
vdaf_prio3.Prio3SumVecWithMultiproof(3, Field64, 3, 3, 16, 7),
None,
ctx,
[
[10000, 32000, 9],
[19342, 19615, 3061],
[15986, 24671, 23910]
],
1,
)

# Prio3Histogram
gen_test_vec_for_vdaf(
vdaf_test_vec_path,
Expand Down
Loading

0 comments on commit c0e76dc

Please sign in to comment.