Skip to content

Commit

Permalink
mastic: Make the evaluation proof pseudorandom
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpatton committed Jan 16, 2025
1 parent 2a31ed1 commit bbb9e04
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 74 deletions.
6 changes: 2 additions & 4 deletions src/vdaf/mastic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,8 @@ impl<T: Type> Aggregator<32, NONCE_SIZE> for Mastic<T> {
};

let eval_proof = {
let mut eval_proof_xof = XofTurboShake128::from_seed_slice(
&[],
&[&dst_usage(USAGE_EVAL_PROOF), &self.id, ctx],
);
let mut eval_proof_xof =
XofTurboShake128::init(verify_key, &[&dst_usage(USAGE_EVAL_PROOF), &self.id, ctx]);
eval_proof_xof.update(&onehot_check);
eval_proof_xof.update(&counter_check);
eval_proof_xof.update(&payload_check);
Expand Down
4 changes: 2 additions & 2 deletions src/vdaf/test_vec/mastic/04/MasticCount_0.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
],
"prep_shares": [
[
"2f82f72d65d285b4d41551667bc8d1832ed2212b211bec5bf0e228302bbcd23282518600b8bd84150c9df3154968eb00fd6949610bbaa838f528e845e9b134bf",
"2f82f72d65d285b4d41551667bc8d1832ed2212b211bec5bf0e228302bbcd2327fae79ff46427bea6814d366e7d3bd95781ac4b7ab90e6a99f6399ebb8914e6d"
"e5633260ecd70036482bbf2c93887bf4347c130f587247d63fe537250bb3c49382518600b8bd84150c9df3154968eb00fd6949610bbaa838f528e845e9b134bf",
"e5633260ecd70036482bbf2c93887bf4347c130f587247d63fe537250bb3c4937fae79ff46427bea6814d366e7d3bd95781ac4b7ab90e6a99f6399ebb8914e6d"
]
],
"public_share": "0e30118b55bf77ff34817d80025c5c736b1ee2188425350e71cc1dc5a779de3e6ff0676312c362381937b2713cf2d65c6bfd5e3a8400fe1b3f71da0726d672f55f893f521233758b42d37212b7a0c5d64e450af652ace0e50986026a123de440e13432801b02eeda044017d8cc739b4f93ea6360a4887c1b1f4e688c4a6b02a111",
Expand Down
4 changes: 2 additions & 2 deletions src/vdaf/test_vec/mastic/04/MasticCount_1.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
],
"prep_shares": [
[
"ca98c5aa7a21e337c3feb5e936676af3169f0b4e524da401bc107bb92447b98382518600b8bd8415522695511228b9228a6b0a9d88a7f97af0b1b62107f08c47",
"ca98c5aa7a21e337c3feb5e936676af3169f0b4e524da401bc107bb92447b9837fae79ff46427beaf79ffb3f48d217d30f4b40b400becf0407f72fed209095f2"
"da7b578f9408c348b22ae735a3693ba6911b45de47b0a3502055735eddf5c85382518600b8bd8415522695511228b9228a6b0a9d88a7f97af0b1b62107f08c47",
"da7b578f9408c348b22ae735a3693ba6911b45de47b0a3502055735eddf5c8537fae79ff46427beaf79ffb3f48d217d30f4b40b400becf0407f72fed209095f2"
]
],
"public_share": "0e30118b55bf77ff34817d80025c5c736b1ee2188425350e71cc1dc5a779de3e6ff0676312c362381937b2713cf2d65c6bfd5e3a8400fe1b3f71da0726d672f55f893f521233758b42d37212b7a0c5d64e450af652ace0e50986026a123de440e13432801b02eeda044017d8cc739b4f93ea6360a4887c1b1f4e688c4a6b02a111",
Expand Down
32 changes: 16 additions & 16 deletions src/vdaf/test_vec/mastic/04/MasticCount_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
],
"prep_shares": [
[
"a06b0fd0b5da2b6170bf8b83542427cccb6d0ecddf143dfd1554717d7a5a3f012c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"a06b0fd0b5da2b6170bf8b83542427cccb6d0ecddf143dfd1554717d7a5a3f01d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
"b3cd0aed8a950172f79946eb28e09d9620dbe29c46e043069eab50900f1b8a4f2c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"b3cd0aed8a950172f79946eb28e09d9620dbe29c46e043069eab50900f1b8a4fd59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
]
],
"public_share": "8d038031b3e41fc4b2fe2a3f77de06db7fe0806225f5601afc6f1578ceb8a6d174c50c4eecaffdf4f2310f168d03c5a4cbfc4c3ed6bc04479d05151e4f21be576a880c8ec3143a6b9fb9509d7d0658fc05dc149b0a3cb2046aef8e96793a0ac548f123fcc6eebe7973c8a4500651955a500673e19649c10909b051ef18c08828de79e178096261b4c3169c50015389bba0478bf97610f7213fc164c370974ff59af7ee93800b487bd2d95f87686634e4c74723ab3aa3d8e288a63d584e3ce60d95195d8a6ed1b06313abfd68aed8386c912daf717fa863f9be15f7deed160398a19baaaf1d852effaecf38087b1f17ad19b1e80e4d3db60256766001b0a4c38a898a85aa6f8e3232ffd494468e9fb68a47adaf0c8208509e03347be29702fece293d8af82c3d087c30ea20ac9bb6d0f2d87c22beaa9561bff4925c071d452e2d774d",
Expand Down Expand Up @@ -132,8 +132,8 @@
],
"prep_shares": [
[
"a06b0fd0b5da2b6170bf8b83542427cccb6d0ecddf143dfd1554717d7a5a3f012c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"a06b0fd0b5da2b6170bf8b83542427cccb6d0ecddf143dfd1554717d7a5a3f01d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
"b3cd0aed8a950172f79946eb28e09d9620dbe29c46e043069eab50900f1b8a4f2c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"b3cd0aed8a950172f79946eb28e09d9620dbe29c46e043069eab50900f1b8a4fd59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
]
],
"public_share": "8d038031b3e41fc4b2fe2a3f77de06db7fe0806225f5601afc6f1578ceb8a6d174c50c4eecaffdf4f2310f168d03c5a4cbfc4c3ed6bc04479d05151e4f21be576a880c8ec3143a6b9fb9509d7d0658fc05dc149b0a3cb2046aef8e96793a0ac548f123fcc6eebe7973c8a4500651955a500673e19649c10909b051ef18c08828de79e178096261b4c3169c50015389bba0478bf97610f7213fc164c370974ff59af7ee93800b487bd2d95f87686634e4c74723ab3aa3d8e288a63d584e3ce60d95195d8a6ed1b06313abfd68aed8386c912daf717fa863f9be15f7deed160398a19baaaf1d852effaecf38087b1f17ad19b1e80e4d3db60256766001b0a4c38a898a85aa6f8e3232ffd494468e9fb68a47adaf0c8208509e03347be29702fece293d8af82c3d087c30ea20ac9bb6d0f2d87c22beaa9561bff4925c071d452e2d774d",
Expand Down Expand Up @@ -194,8 +194,8 @@
],
"prep_shares": [
[
"1b2c1279cbb20661f5ab2be4932d729c303a47668fff4e305d4a2501a7bc19412c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"1b2c1279cbb20661f5ab2be4932d729c303a47668fff4e305d4a2501a7bc1941d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
"c9d0da8cfc02347b2b1d9045be754e283d2141b33d77a38a2666ad6329566c482c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"c9d0da8cfc02347b2b1d9045be754e283d2141b33d77a38a2666ad6329566c48d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
]
],
"public_share": "7d038031b3e41fc4b2fe2a3f77de06db7fe0806225f5601afc6f1578ceb8a6d174c5848d58535ab915bafb428087a2f62dbc76138f52a253028dda7eae3b502b33a9e821410b02d88a837bc1be5f59b920e4149b0a3cb2046aef8e96793a0ac548f123fcc6eebe7973c8a4500651955a5006024a26201bd34c0c4a4cdc45998b19adf4c9f946b4430a94eee7e5347e4fd8ca08c7752a400682f85f764f00e454aa8eee93800b487bd2d95f87686634e4c74723ab3aa3d8e288a63d584e3ce60d95195d8a6ed1b06313abfd68aed8386c912daf717fa863f9be15f7deed160398a19bf9f059a1bd2f7dc042c265cc3a3996d66a9c40e98baee3afa152bf3409e125d8d198350d02b43d48d2d0107db1d8852adf97fcd85574b13921482e2aac8dc9f4445b323b3f134362290326a68932ff3074c171f37827428c61790656b82b9815",
Expand Down Expand Up @@ -256,8 +256,8 @@
],
"prep_shares": [
[
"430b3d19e1bd81c0431e5777404c3baf778bdd9b51301295ed0c8c84e6f7d8002c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"430b3d19e1bd81c0431e5777404c3baf778bdd9b51301295ed0c8c84e6f7d800d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
"7216b1776a3e04a2ac0b7e6d28cc25ebec003be7fe6a43141c10e352df5299232c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"7216b1776a3e04a2ac0b7e6d28cc25ebec003be7fe6a43141c10e352df529923d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
]
],
"public_share": "7d008031b3e41fc4b2fe2a3f77de06db7fe0806225f5601afc6f1578ceb8a6d174c5848d58535ab915bafb428087a2f62dbc76138f52a253028dda7eae3b502b33a916e5a7207c22876c3e8651e6ec087889149b0a3cb2046aef8e96793a0ac548f123fcc6eebe7973c8a4500651955a5006024a26201bd34c0c4a4cdc45998b19adf4c9f946b4430a94eee7e5347e4fd8ca85fb7348903670f480514fbeb9082d79ee93800b487bd2d95f87686634e4c74723ab3aa3d8e288a63d584e3ce60d95195d8a6ed1b06313abfd68aed8386c912daf717fa863f9be15f7deed160398a19bf9f059a1bd2f7dc042c265cc3a3996d66a9c40e98baee3afa152bf3409e125d8d198350d02b43d48d2d0107db1d8852adf97fcd85574b13921482e2aac8dc9f4dd4a100279307c773f9edeccc2e2326af46998f278998fa21f7e0219e2fa7bf4",
Expand Down Expand Up @@ -318,8 +318,8 @@
],
"prep_shares": [
[
"d75698175382ef7dd2072aef0341fec47772bc07c9c4658ce3c49fa6e8ceba092c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"d75698175382ef7dd2072aef0341fec47772bc07c9c4658ce3c49fa6e8ceba09d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
"66e2a7759d077c408a12e7d051cc184d1836e2e9d0a9519a200da0997ca41e662c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"66e2a7759d077c408a12e7d051cc184d1836e2e9d0a9519a200da0997ca41e66d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
]
],
"public_share": "f1008031b3e41fc4b2fe2a3f77de06db7fe06eb6ffd9b0e2083236efcc45c94d7ca7c061c2d66fafdc0b34509f1ee246cbb15e5ac395c89a2db8dbb05470e32bb53f2e5dce6ec3fc1614aeae2cc0abde9ed7149b0a3cb2046aef8e96793a0ac548f162d5e495135c2e58052f8f36198892949f86b8b81414971f05f924425ae428b5a936fed7a48b510d19fd09bbfab24426f53efa61f0150248095da69d5a7c1f4fee93800b487bd2d95f87686634e4c74723ab3aa3d8e288a63d584e3ce60d951995ab0e635ea4fedf3caa17b706f31176ecf46fb2e546968cacd3a14cc0d62fa67c6a09c7f01c16d806cec200dc627740e5f34a4a7ea2e9e55e3194a8652a67860743cae347ccd1d6500674997f9434c2b9d10c2045b0334a5f6011d684811832b216b9c711ae4a9c4cb19fce661cfadaa821b51f5fbf87fc26694836ce0248e9",
Expand Down Expand Up @@ -380,8 +380,8 @@
],
"prep_shares": [
[
"0e16acbb2223be8795db7d711e7c663b90d44abeff37bb901ca4b6c8ef6a4c912c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"0e16acbb2223be8795db7d711e7c663b90d44abeff37bb901ca4b6c8ef6a4c91d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
"1d12dfd5d8e831d525bcbe038a44a9a93bc63c7a7bb7e20cf65e699723c961ea2c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"1d12dfd5d8e831d525bcbe038a44a9a93bc63c7a7bb7e20cf65e699723c961ead59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
]
],
"public_share": "31028031b3e41fc4b2fe2a3f77de06db7fe06eb6ffd9b0e2083236efcc45c94d7ca7c061c2d66fafdc0b34509f1ee246cbb18481284d0d1422caa93c58f805ae12fc96571eb833cf5d83fb68cbb285da472b149b0a3cb2046aef8e96793a0ac548f162d5e495135c2e58052f8f36198892949f86b8b81414971f05f924425ae428b556e4139b9825e7e74c4196275f57f2fc35eb52f72c55e93e3193770130eeba06ee93800b487bd2d95f87686634e4c74723ab3aa3d8e288a63d584e3ce60d951995ab0e635ea4fedf3caa17b706f31176ecf46fb2e546968cacd3a14cc0d62fa67c6a09c7f01c16d806cec200dc627740e5f34a4a7ea2e9e55e3194a8652a6786e7470ead40be1b247b55d606b969ae0c3d0360c532198dcad4e005bf46c41a53dba6144791872eda1df638dddb9611af728d28038b36219984799f53979b99c7",
Expand Down Expand Up @@ -442,8 +442,8 @@
],
"prep_shares": [
[
"0e16acbb2223be8795db7d711e7c663b90d44abeff37bb901ca4b6c8ef6a4c912c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"0e16acbb2223be8795db7d711e7c663b90d44abeff37bb901ca4b6c8ef6a4c91d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
"1d12dfd5d8e831d525bcbe038a44a9a93bc63c7a7bb7e20cf65e699723c961ea2c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"1d12dfd5d8e831d525bcbe038a44a9a93bc63c7a7bb7e20cf65e699723c961ead59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
]
],
"public_share": "31028031b3e41fc4b2fe2a3f77de06db7fe06eb6ffd9b0e2083236efcc45c94d7ca7c061c2d66fafdc0b34509f1ee246cbb18481284d0d1422caa93c58f805ae12fc96571eb833cf5d83fb68cbb285da472b149b0a3cb2046aef8e96793a0ac548f162d5e495135c2e58052f8f36198892949f86b8b81414971f05f924425ae428b556e4139b9825e7e74c4196275f57f2fc35eb52f72c55e93e3193770130eeba06ee93800b487bd2d95f87686634e4c74723ab3aa3d8e288a63d584e3ce60d951995ab0e635ea4fedf3caa17b706f31176ecf46fb2e546968cacd3a14cc0d62fa67c6a09c7f01c16d806cec200dc627740e5f34a4a7ea2e9e55e3194a8652a6786e7470ead40be1b247b55d606b969ae0c3d0360c532198dcad4e005bf46c41a53dba6144791872eda1df638dddb9611af728d28038b36219984799f53979b99c7",
Expand Down Expand Up @@ -504,8 +504,8 @@
],
"prep_shares": [
[
"0e16acbb2223be8795db7d711e7c663b90d44abeff37bb901ca4b6c8ef6a4c912c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"0e16acbb2223be8795db7d711e7c663b90d44abeff37bb901ca4b6c8ef6a4c91d59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
"1d12dfd5d8e831d525bcbe038a44a9a93bc63c7a7bb7e20cf65e699723c961ea2c6d7e029fcf988f10f9095c548f022766f44bd80f2e0313d1f3468b15732930",
"1d12dfd5d8e831d525bcbe038a44a9a93bc63c7a7bb7e20cf65e699723c961ead59281fd5f30677010fb3c8ed88093515d94632fceae87396146dd9ef6cad681"
]
],
"public_share": "31028031b3e41fc4b2fe2a3f77de06db7fe06eb6ffd9b0e2083236efcc45c94d7ca7c061c2d66fafdc0b34509f1ee246cbb18481284d0d1422caa93c58f805ae12fc96571eb833cf5d83fb68cbb285da472b149b0a3cb2046aef8e96793a0ac548f162d5e495135c2e58052f8f36198892949f86b8b81414971f05f924425ae428b556e4139b9825e7e74c4196275f57f2fc35eb52f72c55e93e3193770130eeba06ee93800b487bd2d95f87686634e4c74723ab3aa3d8e288a63d584e3ce60d951995ab0e635ea4fedf3caa17b706f31176ecf46fb2e546968cacd3a14cc0d62fa67c6a09c7f01c16d806cec200dc627740e5f34a4a7ea2e9e55e3194a8652a6786e7470ead40be1b247b55d606b969ae0c3d0360c532198dcad4e005bf46c41a53dba6144791872eda1df638dddb9611af728d28038b36219984799f53979b99c7",
Expand Down
Loading

0 comments on commit bbb9e04

Please sign in to comment.