Repository: cloudflare/daphne
Pull request #450 (2023-12-01 01:24:35)

Add test vectors for Prio3SumVecField64MultiproofHmacSha256Aes128
Stacked on #449.
WIP: This requires a change to libprio: https://github.com/divviup/libprio-rs/pull/862


Patch:
diff --git a/Cargo.lock b/Cargo.lock
index 05c9fd8..7b95f77 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1582,15 +1582,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
 [[package]]
 name = "prio"
 version = "0.15.3"
-source = "git+https://github.com/divviup/libprio-rs?rev=f067f384df127bdbd5e35116bbf437e765238eb2#f067f384df127bdbd5e35116bbf437e765238eb2"
+source = "git+https://github.com/divviup/libprio-rs?rev=d0168336bbad1805231a69181b329e37ee962203#d0168336bbad1805231a69181b329e37ee962203"
 dependencies = [
  "aes 0.8.3",
  "byteorder",
  "ctr 0.9.2",
  "getrandom",
+ "hex",
  "hmac 0.12.1",
+ "rand",
  "rand_core",
  "serde",
+ "serde_json",
  "sha2 0.10.8",
  "sha3",
  "subtle",
diff --git a/Cargo.toml b/Cargo.toml
index a831f7a..6b6d695 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -32,7 +32,7 @@ hpke-rs-crypto = "=0.1.1"
 hpke-rs-rust-crypto = "=0.1.1"
 matchit = "0.7.3"
 paste = "1.0.14"
-prio = { git = "https://github.com/divviup/libprio-rs", rev = "f067f384df127bdbd5e35116bbf437e765238eb2" }
+prio = { git = "https://github.com/divviup/libprio-rs", rev = "d0168336bbad1805231a69181b329e37ee962203" }
 prometheus = "0.13.3"
 rand = "0.8.5"
 rand_core = "0.6.4"
diff --git a/daphne/Cargo.toml b/daphne/Cargo.toml
index 555730a..a7372dc 100644
--- a/daphne/Cargo.toml
+++ b/daphne/Cargo.toml
@@ -44,6 +44,7 @@ matchit.workspace = true
 paste.workspace = true
 rand_core.workspace = true
 regex = "1.10.2"
+prio = { workspace = true, features = ["test-util"] }
 tokio.workspace = true
 
 [features]
diff --git a/daphne/src/vdaf/mod.rs b/daphne/src/vdaf/mod.rs
index 895ca6c..6a5c9c8 100644
--- a/daphne/src/vdaf/mod.rs
+++ b/daphne/src/vdaf/mod.rs
@@ -73,6 +73,8 @@ enum PingPongMessageType {
     Finish = 2,
 }
 
+// This is essentially a re-implementation of a method in the `messages` module. However the goal
+// here is to make it zero-copy. See https://github.com/cloudflare/daphne/issues/15.
 fn decode_ping_pong_framed(
     bytes: &[u8],
     expected_type: PingPongMessageType,
diff --git a/daphne/src/vdaf/prio3.rs b/daphne/src/vdaf/prio3.rs
index 0f85e93..7b40948 100644
--- a/daphne/src/vdaf/prio3.rs
+++ b/daphne/src/vdaf/prio3.rs
@@ -608,8 +608,11 @@ pub(crate) fn prio3_unshard<M: IntoIterator<Item = Vec<u8>>>(
 #[cfg(test)]
 mod test {
 
+    use prio::vdaf::prio3_test::check_test_vec;
+
     use crate::{
-        async_test_versions, hpke::HpkeKemId, testing::AggregationJobTest, DapAggregateResult,
+        async_test_versions, hpke::HpkeKemId, testing::AggregationJobTest,
+        vdaf::prio3::new_prio3_sum_vec_field64_multiproof_hmac_sha256_aes128, DapAggregateResult,
         DapMeasurement, DapVersion, Prio3Config, VdafConfig,
     };
 
@@ -720,4 +723,28 @@ mod test {
     }
 
     async_test_versions! { roundtrip_sum_vec_field64_multiproof_hmac_sha256_aes128 }
+
+    #[test]
+    fn test_vec_sum_vec_field64_multiproof_hmac_sha256_aes128() {
+        for test_vec_json_str in [
+            include_str!("test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_0.json"),
+            include_str!("test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_1.json"),
+            include_str!("test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_2.json"),
+        ] {
+            check_test_vec(test_vec_json_str, |json_params, num_aggregators| {
+                assert_eq!(num_aggregators, 2);
+                new_prio3_sum_vec_field64_multiproof_hmac_sha256_aes128(
+                    json_params["bits"].as_u64().unwrap().try_into().unwrap(),
+                    json_params["length"].as_u64().unwrap().try_into().unwrap(),
+                    json_params["chunk_length"]
+                        .as_u64()
+                        .unwrap()
+                        .try_into()
+                        .unwrap(),
+                    json_params["proofs"].as_u64().unwrap().try_into().unwrap(),
+                )
+                .unwrap()
+            });
+        }
+    }
 }


Test patch:
diff --git a/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_0.json b/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_0.json
new file mode 100644
index 0000000..1d78bf8
--- /dev/null
+++ b/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_0.json
@@ -0,0 +1,139 @@
+{
+    "agg_param": null,
+    "agg_result": [
+        0,
+        2,
+        4,
+        6,
+        0,
+        2,
+        4,
+        6,
+        0,
+        2
+    ],
+    "agg_shares": [
+        "569d73b301242a5a3ae8b6af9d2b194b5cf77c4c902a6baed75e7ec8c158ad3970762d0e3e6bf05cbf619b59403c0a91057c2191c8d4158eedc84db8dac8f0c516aee1c2d9ce773a23be72b015d1f505",
+        "ab628c4cfddbd5a5c917495061d4e6b4a90883b36ed5945130a181373da752c69189d2f1c0940fa3449e64a6bec3f56e0084de6e362bea711a37b24724370f3aeb511e3d253188c5e0418d4fe92e0afa"
+    ],
+    "bits": 3,
+    "chunk_length": 4,
+    "length": 10,
+    "prep": [
+        {
+            "input_shares": [
+                "0bdc5fbacf0addd675d4e770aad7f3db6f92628ff51594e7798aceefe0163a637b0de19021735563acb392312ae6e93e1c151628cce194db966f907739d14980dae1c1c34144c31eac3d4cb600f34dd53419e0f73cdb895bd7af8c6fb8401dc447d3dd4d4c7abb94a0193bc01f9c1c032dad300ec4e0e0a4d22113d6d6cb6104775cb72a9871aa4288f55220c69bb30f0dbe1e429b05780af87648cb5b393d668244f8bb831c067c00ddb87b27a30f4e50dbd12324bf101936943206bfd0b15813e5f2bf3d7ecc7ac40841aa251bc5021df83ef3b74c39e7ad5fe57d9b3be16d37e69c95147be301be8cc62bb1ad5444873e3a3debcaa9b23626a8db71d1364bbdc1fe87d3f32264fd53458110d0e4536e1bccaea8f28134588bb5ee523ab2c907c418ca4c38ca6714d4be46e97c770f85f700b1f174bcd3323277ab38b21b43be286f619aae38020afa2bb73c47992f45f87e2a913791adcd6e590a85ec62d08db5441991815ef88094155f0322ca02fdfaf5fb448b29c5b18ca936c89d797fdd6fe9acd3ba5cb90289a361a276dd8b2fcb3863ca93369251f9fc6594b157f0278242855b59bee39216f8c7d8f9a185c9e583a8147b3ef4d99aeae7dd4f6bdd8a2693ddc9a3dfda198273c22e2c15125e246b666dc8881018c5cbde3f2520510b39c973981521b4fc8e2e1ef6680a7d191abb21ad6ce191ff1e1db786baf5bfa1f6bd39e667496abe0a96a190413f121fa40c0cd05d1f82802887f8b169e2d41131eec552ca4573606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f",
+                "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f"
+            ],
+            "measurement": [
+                0,
+                1,
+                2,
+                3,
+                0,
+                1,
+                2,
+                3,
+                0,
+                1
+            ],
+            "nonce": "000102030405060708090a0b0c0d0e0f",
+            "out_shares": [
+                [
+                    "abceb9d90012152d",
+                    "1d74dbd7ce958c25",
+                    "ae7b3e2648953557",
+                    "6c2f3f6460acd69c",
+                    "38bb16079f35782e",
+                    "e0b0cdac1f1e85c8",
+                    "03be90c863ea0ac7",
+                    "77e426dc6c64f8e2",
+                    "0bd770e16ce73b1d",
+                    "125f39588ae8fa82"
+                ],
+                [
+                    "56314626feedead2",
+                    "e58b2428306a73da",
+                    "5584c1d9b66acaa8",
+                    "98d0c09b9e532963",
+                    "c944e9f85fca87d1",
+                    "224f3253dfe17a37",
+                    "00426f379b15f538",
+                    "8d1bd923929b071d",
+                    "f6288f1e9218c4e2",
+                    "f0a0c6a77417057d"
+                ]
+            ],
+            "prep_messages": [
+                "9d5bb208cbb8731365ae1e94d0ae728a720759c50fd9c850e748af58cadc89e9"
+            ],
+            "prep_shares": [
+                [
+                    "7d9a80a08a28a7bd09396af9420c2e13e6fdedace8129ee20b7c27791074e5a389b5741286a75ff9b5de9af258ca79ba78f5f53ec1476d941578e1684f8e7476257325fc3c0f55f11a10619dbff44d7120e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7f",
+                    "84657f5f74d758422148db4692cfa77c89152f9f40533aa4461ff8cec194c431e6372873a8bd71cc7aca20af96eb6f7ce375e4caaed31ab57d29c37ddb12035d583ea3dc18a5c42f1e06a0ed65296921f093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4"
+                ]
+            ],
+            "public_share": "20e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7ff093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4",
+            "rand": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f"
+        },
+        {
+            "input_shares": [
+                "0bdc5fbacf0addd675d4e770aad7f3db6f92628ff51594e7798aceefe0163a637b0de19021735563acb392312ae6e93e1c151628cce194db966f907739d14980dae1c1c34144c31eac3d4cb600f34dd53419e0f73cdb895bd7af8c6fb8401dc447d3dd4d4c7abb94a0193bc01f9c1c032dad300ec4e0e0a4d22113d6d6cb6104775cb72a9871aa4288f55220c69bb30f0dbe1e429b05780af87648cb5b393d668244f8bb831c067c00ddb87b27a30f4e50dbd12324bf101936943206bfd0b15813e5f2bf3d7ecc7ac40841aa251bc5021df83ef3b74c39e7ad5fe57d9b3be16d37e69c95147be301be8cc62bb1ad5444873e3a3debcaa9b23626a8db71d1364bbdc1fe87d3f32264fd53458110d0e4536e1bccaea8f28134588bb5ee523ab2c907c418ca4c38ca6714d4be46e97c770f85f700b1f174bcd3323277ab38b21b43be286f619aae38020afa2bb73c47992f45f87e2a913791adcd6e590a85ec62d08db5441991815ef88094155f0322ca02fdfaf5fb448b29c5b18ca936c89d797fdd6fe9acd3ba5cb90289a361a276dd8b2fcb3863ca93369251f9fc6594b157f0278242855b59bee39216f8c7d8f9a185c9e583a8147b3ef4d99aeae7dd4f6bdd8a2693ddc9a3dfda198273c22e2c15125e246b666dc8881018c5cbde3f2520510b39c973981521b4fc8e2e1ef6680a7d191abb21ad6ce191ff1e1db786baf5bfa1f6bd39e667496abe0a96a190413f121fa40c0cd05d1f82802887f8b169e2d41131eec552ca4573606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f",
+                "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f"
+            ],
+            "measurement": [
+                0,
+                1,
+                2,
+                3,
+                0,
+                1,
+                2,
+                3,
+                0,
+                1
+            ],
+            "nonce": "000102030405060708090a0b0c0d0e0f",
+            "out_shares": [
+                [
+                    "abceb9d90012152d",
+                    "1d74dbd7ce958c25",
+                    "ae7b3e2648953557",
+                    "6c2f3f6460acd69c",
+                    "38bb16079f35782e",
+                    "e0b0cdac1f1e85c8",
+                    "03be90c863ea0ac7",
+                    "77e426dc6c64f8e2",
+                    "0bd770e16ce73b1d",
+                    "125f39588ae8fa82"
+                ],
+                [
+                    "56314626feedead2",
+                    "e58b2428306a73da",
+                    "5584c1d9b66acaa8",
+                    "98d0c09b9e532963",
+                    "c944e9f85fca87d1",
+                    "224f3253dfe17a37",
+                    "00426f379b15f538",
+                    "8d1bd923929b071d",
+                    "f6288f1e9218c4e2",
+                    "f0a0c6a77417057d"
+                ]
+            ],
+            "prep_messages": [
+                "9d5bb208cbb8731365ae1e94d0ae728a720759c50fd9c850e748af58cadc89e9"
+            ],
+            "prep_shares": [
+                [
+                    "7d9a80a08a28a7bd09396af9420c2e13e6fdedace8129ee20b7c27791074e5a389b5741286a75ff9b5de9af258ca79ba78f5f53ec1476d941578e1684f8e7476257325fc3c0f55f11a10619dbff44d7120e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7f",
+                    "84657f5f74d758422148db4692cfa77c89152f9f40533aa4461ff8cec194c431e6372873a8bd71cc7aca20af96eb6f7ce375e4caaed31ab57d29c37ddb12035d583ea3dc18a5c42f1e06a0ed65296921f093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4"
+                ]
+            ],
+            "public_share": "20e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7ff093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4",
+            "rand": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f"
+        }
+    ],
+    "proofs": 1,
+    "shares": 2,
+    "verify_key": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"
+}
diff --git a/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_1.json b/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_1.json
new file mode 100644
index 0000000..490dea7
--- /dev/null
+++ b/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_1.json
@@ -0,0 +1,139 @@
+{
+    "agg_param": null,
+    "agg_result": [
+        0,
+        2,
+        4,
+        6,
+        0,
+        2,
+        4,
+        6,
+        0,
+        2
+    ],
+    "agg_shares": [
+        "569d73b301242a5a3ae8b6af9d2b194b5cf77c4c902a6baed75e7ec8c158ad3970762d0e3e6bf05cbf619b59403c0a91057c2191c8d4158eedc84db8dac8f0c516aee1c2d9ce773a23be72b015d1f505",
+        "ab628c4cfddbd5a5c917495061d4e6b4a90883b36ed5945130a181373da752c69189d2f1c0940fa3449e64a6bec3f56e0084de6e362bea711a37b24724370f3aeb511e3d253188c5e0418d4fe92e0afa"
+    ],
+    "bits": 3,
+    "chunk_length": 4,
+    "length": 10,
+    "prep": [
+        {
+            "input_shares": [
+                "0bdc5fbacf0addd675d4e770aad7f3db6f92628ff51594e7798aceefe0163a637b0de19021735563acb392312ae6e93e1c151628cce194db966f907739d14980dae1c1c34144c31eac3d4cb600f34dd53419e0f73cdb895bd7af8c6fb8401dc447d3dd4d4c7abb94a0193bc01f9c1c032dad300ec4e0e0a4d22113d6d6cb6104775cb72a9871aa4288f55220c69bb30f0dbe1e429b05780af87648cb5b393d668244f8bb831c067c00ddb87b27a30f4e50dbd12324bf101936943206bfd0b15813e5f2bf3d7ecc7ac40841aa251bc5021df83ef3b74c39e7ad5fe57d9b3be16d37e69c95147be301be8cc62bb1ad5444407b76c06c27810ea2c87ebbfdebb82ad84d42f90f5681ea6be9f4d513b33a8f3bf57b66798ef891216cbe38f3a159c79e92defdcba80ca29b24d6285c987b1b142fc5e07ee5b4ed52adf2bfeb0ee7ce142fd63ad1e7dc5442009377348a2310f411d260bcda4210011925d28133ea2c8ce58727797dc3992447fb0641039366e6af2fae72093fd7de4c9df94f0c0271f62f44fe66b0448e663ae1dd21eb4b4e23ab2ae93d67fe9fa27be0fa19f52bec6d606e854da5651f66907161a2f32c2ad3dac7d069a3be3e937afccf3fbab634e90866f587b7113a8a816202efa3e7b623369e5a25ae96041ee803d4fd54d855fe882033602d5ecaec159629afb272e46baa347593ab8090a4cd9758d97fe5ae4abed0ce579dc322f2f8e37a2f630431277c05a3be4a506816643e701118694a9b2508a104a970debf2cf0f9f9adfe999266f9a31da56dfb23b31ac6b8d3759ad6324a54224863657cfd801f81d2ed3366207c61ca4bdf618a9eed91df0fb0bd9897d6088e9ff6fa760111f9fd5929f8f69a0c2bdfcac0051bcf9c9abd439bf4791420a2385544b8efb0b36e08c4d4dceeeeb43d1c78ce108e68bbd8ba64ab55f2a29af63840664f68593676adfc102361260cd52a865583b8b5169a6be1275161ebb83a53a47c6734b0dfd4059fb9f229ce43983776985223eb5f7c061146a883913da7d7d7ade091dcc32937ca3410183c0d2892c9a349753ecb438627429e3d6617947e5e7bd0371f5024a66a95d7f8dc47c34d46aa9cd511e1f18da4e35f3382d57c5b9058d172e07ca4962b2a3cc3839a8b5ae7d915af5b637396bdf818c8e13ccc9548d66697c833687c852b749534e4f94305bb555e7162bcbe64fe5e606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f",
+                "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f"
+            ],
+            "measurement": [
+                0,
+                1,
+                2,
+                3,
+                0,
+                1,
+                2,
+                3,
+                0,
+                1
+            ],
+            "nonce": "000102030405060708090a0b0c0d0e0f",
+            "out_shares": [
+                [
+                    "abceb9d90012152d",
+                    "1d74dbd7ce958c25",
+                    "ae7b3e2648953557",
+                    "6c2f3f6460acd69c",
+                    "38bb16079f35782e",
+                    "e0b0cdac1f1e85c8",
+                    "03be90c863ea0ac7",
+                    "77e426dc6c64f8e2",
+                    "0bd770e16ce73b1d",
+                    "125f39588ae8fa82"
+                ],
+                [
+                    "56314626feedead2",
+                    "e58b2428306a73da",
+                    "5584c1d9b66acaa8",
+                    "98d0c09b9e532963",
+                    "c944e9f85fca87d1",
+                    "224f3253dfe17a37",
+                    "00426f379b15f538",
+                    "8d1bd923929b071d",
+                    "f6288f1e9218c4e2",
+                    "f0a0c6a77417057d"
+                ]
+            ],
+            "prep_messages": [
+                "9d5bb208cbb8731365ae1e94d0ae728a720759c50fd9c850e748af58cadc89e9"
+            ],
+            "prep_shares": [
+                [
+                    "d08272d7b3a80a35779e8819767d4ddcb747c1c09cad3a1bf07e66770f2f6d460a6cf8a000f8649efc009d20d37929554abb7c1c97782a69e735accbf0bdfb473b1e0662f229b3825ead60bbf16e8bb88312c92287501de0d9d051c526d416eb3b68618587a936f2a5ac3b5672969099364f02c68521f4d14287113d14753177a342ba931bd149f738609c536495c15c0e1d35d5b461c7efcc64ffb3025c9a9020e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7f",
+                    "317d8d284b57f5caa7ca8a3f13b3c1c98d5a98a35eee8d1a9675c624d6bc0f10059f2167ff588986abf1ad90d0c5963c9a7bcabe046bbb8b3389e3ba909662f29fb479c98d01d47eae52c9de08bb00cf7eed36dd77afe21fe21c4ab2b4fd2f9e387c65515aa04e650c9a42999287bd4594df8efecbe21ac4cd010c2507c7fa7d45f3cff44f7b7e4fb88ff98df109c1999b1ea78ca05f1fa864150eed920f3288f093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4"
+                ]
+            ],
+            "public_share": "20e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7ff093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4",
+            "rand": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f"
+        },
+        {
+            "input_shares": [
+                "0bdc5fbacf0addd675d4e770aad7f3db6f92628ff51594e7798aceefe0163a637b0de19021735563acb392312ae6e93e1c151628cce194db966f907739d14980dae1c1c34144c31eac3d4cb600f34dd53419e0f73cdb895bd7af8c6fb8401dc447d3dd4d4c7abb94a0193bc01f9c1c032dad300ec4e0e0a4d22113d6d6cb6104775cb72a9871aa4288f55220c69bb30f0dbe1e429b05780af87648cb5b393d668244f8bb831c067c00ddb87b27a30f4e50dbd12324bf101936943206bfd0b15813e5f2bf3d7ecc7ac40841aa251bc5021df83ef3b74c39e7ad5fe57d9b3be16d37e69c95147be301be8cc62bb1ad5444407b76c06c27810ea2c87ebbfdebb82ad84d42f90f5681ea6be9f4d513b33a8f3bf57b66798ef891216cbe38f3a159c79e92defdcba80ca29b24d6285c987b1b142fc5e07ee5b4ed52adf2bfeb0ee7ce142fd63ad1e7dc5442009377348a2310f411d260bcda4210011925d28133ea2c8ce58727797dc3992447fb0641039366e6af2fae72093fd7de4c9df94f0c0271f62f44fe66b0448e663ae1dd21eb4b4e23ab2ae93d67fe9fa27be0fa19f52bec6d606e854da5651f66907161a2f32c2ad3dac7d069a3be3e937afccf3fbab634e90866f587b7113a8a816202efa3e7b623369e5a25ae96041ee803d4fd54d855fe882033602d5ecaec159629afb272e46baa347593ab8090a4cd9758d97fe5ae4abed0ce579dc322f2f8e37a2f630431277c05a3be4a506816643e701118694a9b2508a104a970debf2cf0f9f9adfe999266f9a31da56dfb23b31ac6b8d3759ad6324a54224863657cfd801f81d2ed3366207c61ca4bdf618a9eed91df0fb0bd9897d6088e9ff6fa760111f9fd5929f8f69a0c2bdfcac0051bcf9c9abd439bf4791420a2385544b8efb0b36e08c4d4dceeeeb43d1c78ce108e68bbd8ba64ab55f2a29af63840664f68593676adfc102361260cd52a865583b8b5169a6be1275161ebb83a53a47c6734b0dfd4059fb9f229ce43983776985223eb5f7c061146a883913da7d7d7ade091dcc32937ca3410183c0d2892c9a349753ecb438627429e3d6617947e5e7bd0371f5024a66a95d7f8dc47c34d46aa9cd511e1f18da4e35f3382d57c5b9058d172e07ca4962b2a3cc3839a8b5ae7d915af5b637396bdf818c8e13ccc9548d66697c833687c852b749534e4f94305bb555e7162bcbe64fe5e606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f",
+                "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f"
+            ],
+            "measurement": [
+                0,
+                1,
+                2,
+                3,
+                0,
+                1,
+                2,
+                3,
+                0,
+                1
+            ],
+            "nonce": "000102030405060708090a0b0c0d0e0f",
+            "out_shares": [
+                [
+                    "abceb9d90012152d",
+                    "1d74dbd7ce958c25",
+                    "ae7b3e2648953557",
+                    "6c2f3f6460acd69c",
+                    "38bb16079f35782e",
+                    "e0b0cdac1f1e85c8",
+                    "03be90c863ea0ac7",
+                    "77e426dc6c64f8e2",
+                    "0bd770e16ce73b1d",
+                    "125f39588ae8fa82"
+                ],
+                [
+                    "56314626feedead2",
+                    "e58b2428306a73da",
+                    "5584c1d9b66acaa8",
+                    "98d0c09b9e532963",
+                    "c944e9f85fca87d1",
+                    "224f3253dfe17a37",
+                    "00426f379b15f538",
+                    "8d1bd923929b071d",
+                    "f6288f1e9218c4e2",
+                    "f0a0c6a77417057d"
+                ]
+            ],
+            "prep_messages": [
+                "9d5bb208cbb8731365ae1e94d0ae728a720759c50fd9c850e748af58cadc89e9"
+            ],
+            "prep_shares": [
+                [
+                    "d08272d7b3a80a35779e8819767d4ddcb747c1c09cad3a1bf07e66770f2f6d460a6cf8a000f8649efc009d20d37929554abb7c1c97782a69e735accbf0bdfb473b1e0662f229b3825ead60bbf16e8bb88312c92287501de0d9d051c526d416eb3b68618587a936f2a5ac3b5672969099364f02c68521f4d14287113d14753177a342ba931bd149f738609c536495c15c0e1d35d5b461c7efcc64ffb3025c9a9020e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7f",
+                    "317d8d284b57f5caa7ca8a3f13b3c1c98d5a98a35eee8d1a9675c624d6bc0f10059f2167ff588986abf1ad90d0c5963c9a7bcabe046bbb8b3389e3ba909662f29fb479c98d01d47eae52c9de08bb00cf7eed36dd77afe21fe21c4ab2b4fd2f9e387c65515aa04e650c9a42999287bd4594df8efecbe21ac4cd010c2507c7fa7d45f3cff44f7b7e4fb88ff98df109c1999b1ea78ca05f1fa864150eed920f3288f093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4"
+                ]
+            ],
+            "public_share": "20e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7ff093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4",
+            "rand": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f"
+        }
+    ],
+    "proofs": 2,
+    "shares": 2,
+    "verify_key": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"
+}
diff --git a/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_2.json b/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_2.json
new file mode 100644
index 0000000..942e523
--- /dev/null
+++ b/daphne/src/vdaf/test_vec/Prio3SumVecField64MultiproofHmacSha256Aes128_2.json
@@ -0,0 +1,139 @@
+{
+    "agg_param": null,
+    "agg_result": [
+        0,
+        2,
+        4,
+        6,
+        0,
+        2,
+        4,
+        6,
+        0,
+        2
+    ],
+    "agg_shares": [
+        "569d73b301242a5a3ae8b6af9d2b194b5cf77c4c902a6baed75e7ec8c158ad3970762d0e3e6bf05cbf619b59403c0a91057c2191c8d4158eedc84db8dac8f0c516aee1c2d9ce773a23be72b015d1f505",
+        "ab628c4cfddbd5a5c917495061d4e6b4a90883b36ed5945130a181373da752c69189d2f1c0940fa3449e64a6bec3f56e0084de6e362bea711a37b24724370f3aeb511e3d253188c5e0418d4fe92e0afa"
+    ],
+    "bits": 3,
+    "chunk_length": 4,
+    "length": 10,
+    "prep": [
+        {
+            "input_shares": [
+                "0bdc5fbacf0addd675d4e770aad7f3db6f92628ff51594e7798aceefe0163a637b0de19021735563acb392312ae6e93e1c151628cce194db966f907739d14980dae1c1c34144c31eac3d4cb600f34dd53419e0f73cdb895bd7af8c6fb8401dc447d3dd4d4c7abb94a0193bc01f9c1c032dad300ec4e0e0a4d22113d6d6cb6104775cb72a9871aa4288f55220c69bb30f0dbe1e429b05780af87648cb5b393d668244f8bb831c067c00ddb87b27a30f4e50dbd12324bf101936943206bfd0b15813e5f2bf3d7ecc7ac40841aa251bc5021df83ef3b74c39e7ad5fe57d9b3be16d37e69c95147be301be8cc62bb1ad5444e5e0eb4898aaa0dab852c4afa29f3e4c098a289c0d43db96b27bb46eaf66fe01aae1a1c4cfeec6fc5cdfd03765308a202be021ac69ad8a4c1b759da16d5ca1d0eec079b5c8680c4f88afcea287b3f4fe06e6e660acbb6e4cda0402414a0b6fe2149fb4c7cd21b94db0763589d42073b3dec166282d9e6f9c8fedc5417e691de40ca84484d8960928ab0eb04290e990f490af6bcfc5caef90cf887785ab953b0671b4442d5990cf6c695d6a31b4085e8b07e861e7c68646bf5393e3ba8af0074a31e3024a6a2d3a393ecb4650b00629feec5631b18d2d265459b13e674fbabf2030f63f117e6609d8d5693f10615deb8fcc2a4cc55bc799ee566f42e73017138d70d1bf492d362d7f9596bba9eb8456079b3ea342e946f13f34b01755bf4292dc1c563e45430e4f7f46730704b5c68d6a56bd846786c19f9b7647e011aed9ac33ea699f52a4f4787f5253509c1febd2587cf8e89e10cda618a0758a298820d1b6bcf7da44ac432f042bd1ad103cea2a2cf4b7e6c4ce2f9734cd66e784095656987d742304ce2c9a1495de3d195b93e6f557cc1691d05acff15d8e8ea41e02afc6522c5602e668b9449490ea1533173916755ab9cc58412de3b8015169d0dfe9dc2f5ffdb0171201e3ad6727138de08d3d3c5762ccf9dbd17b41804386773396a113c7b1116e89abc6f9ba9fed5324bba962ab2e266e7b4cfefd0ba238a5484cfb3c02ba8e4d32e35cdfc050d40186dbbd4db0da01331f87821ac267c1f791d3c7daec9c61c05f2b18c22cd143a900ca24227e12590e0a507df89edb8988d0f1d004bfa53f589f7ae7abfcfb43237096f6a2859d3a35bd5844ae7b031c7ca46b2b7bf0f0866417bf8384ab8dad48d25fdb333c2df79648d47e85cfab2a43660b72c4b5d5eb7d16f1b0ecc5fe912f67498e4f7ff7daa3d32459836e1c43b7eb3e46ef6d08324d80d946f264e12a15aa314dc7c0e55ffb3edcb861c9f773be9725bdd35f9aec1b719b6718d4c3809028d1d0ffb80c706f58d595ffc30b3334de72a8ea89f40e529eef4586e953a680262306eff75a8464d7fda1f4167a6b376452fcb1844f16ae9cc97ae6239c3b6df7087a5fc7e1376a01b803c90d9e74335b15bcb08468a61ae8a13362c468468a8a8dec1b93cd90eb02e356346b3367a1de586be67c4e03a48d12ed101dce398f76760da9d653709813fb7b915b9f739a75b69d11069ea312b7a54d8bdde2942fe344435f616e63a7f68a791d09b370ee1bb20639a31ccf83d608b85dce1f446dfe027d66f8311d0bcb53b9e21da2014849c970d02d832ce9420ef7606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f",
+                "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f"
+            ],
+            "measurement": [
+                0,
+                1,
+                2,
+                3,
+                0,
+                1,
+                2,
+                3,
+                0,
+                1
+            ],
+            "nonce": "000102030405060708090a0b0c0d0e0f",
+            "out_shares": [
+                [
+                    "abceb9d90012152d",
+                    "1d74dbd7ce958c25",
+                    "ae7b3e2648953557",
+                    "6c2f3f6460acd69c",
+                    "38bb16079f35782e",
+                    "e0b0cdac1f1e85c8",
+                    "03be90c863ea0ac7",
+                    "77e426dc6c64f8e2",
+                    "0bd770e16ce73b1d",
+                    "125f39588ae8fa82"
+                ],
+                [
+                    "56314626feedead2",
+                    "e58b2428306a73da",
+                    "5584c1d9b66acaa8",
+                    "98d0c09b9e532963",
+                    "c944e9f85fca87d1",
+                    "224f3253dfe17a37",
+                    "00426f379b15f538",
+                    "8d1bd923929b071d",
+                    "f6288f1e9218c4e2",
+                    "f0a0c6a77417057d"
+                ]
+            ],
+            "prep_messages": [
+                "9d5bb208cbb8731365ae1e94d0ae728a720759c50fd9c850e748af58cadc89e9"
+            ],
+            "prep_shares": [
+                [
+                    "3f68c1b93167360387fa2249b322925b81b0eddb79d4db09cd024292b8e0f0c87d0b6a9189352e4d7a7541f677c67a0a79aebf49b6bbf9029d9b5c6dbfb9e385ec87c17e7edfb387479dd6ca1b8ec2f584d5901101106ff04af0af8d63048aa465293bc71065bd6f9945dc428ca90b4088e6ec66e150cc181adad96e1c25f23c8b1f16860f028663d9325e532ffa664bff6562fc8e9f21d86d2e15fa53cf6468906356a0a3435252ad13f2b2036a4cf7a7ab69c9bb7e459028c9aa7b5346d35d6633563ad5b790a613dfa5051d49052a7d2ce79b4c4dc4960ca1ca9c4333b18e8d8e8cfbb22fc7f9d3fbc315a77ef05c20e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7f",
+                    "c2973e46cd98c9fcb93ad6e57e99a906ec57b85b54cbab356f7b14b1e5290728bfb0763bcfa9f558aa96518720dd424458e871cca35b1ed2944017e2995db7c4c9fbd7aa3f199629c052c23ec50722eb7d2a6feefdef900f601dabc24a8b7723c19bef5441335cf543c6308d27043d2ed953cdc48ff82b77b9048339ebf8a5abc955bffa589c6b9bf66f24af269cda3f93976cb13b41dd89808ee6bfc2645a80719ca95f5bbcadadbcfbc7b77f003d757a2ed60936b44f8a45a3c01b18b4398caaf0fd174c077e1fe56070eb401492f05ea6f4797fcb8240153755c8140d6e834d66e9a9f78c3b3807f666fcd1b58fb5f093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4"
+                ]
+            ],
+            "public_share": "20e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7ff093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4",
+            "rand": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f"
+        },
+        {
+            "input_shares": [
+                "0bdc5fbacf0addd675d4e770aad7f3db6f92628ff51594e7798aceefe0163a637b0de19021735563acb392312ae6e93e1c151628cce194db966f907739d14980dae1c1c34144c31eac3d4cb600f34dd53419e0f73cdb895bd7af8c6fb8401dc447d3dd4d4c7abb94a0193bc01f9c1c032dad300ec4e0e0a4d22113d6d6cb6104775cb72a9871aa4288f55220c69bb30f0dbe1e429b05780af87648cb5b393d668244f8bb831c067c00ddb87b27a30f4e50dbd12324bf101936943206bfd0b15813e5f2bf3d7ecc7ac40841aa251bc5021df83ef3b74c39e7ad5fe57d9b3be16d37e69c95147be301be8cc62bb1ad5444e5e0eb4898aaa0dab852c4afa29f3e4c098a289c0d43db96b27bb46eaf66fe01aae1a1c4cfeec6fc5cdfd03765308a202be021ac69ad8a4c1b759da16d5ca1d0eec079b5c8680c4f88afcea287b3f4fe06e6e660acbb6e4cda0402414a0b6fe2149fb4c7cd21b94db0763589d42073b3dec166282d9e6f9c8fedc5417e691de40ca84484d8960928ab0eb04290e990f490af6bcfc5caef90cf887785ab953b0671b4442d5990cf6c695d6a31b4085e8b07e861e7c68646bf5393e3ba8af0074a31e3024a6a2d3a393ecb4650b00629feec5631b18d2d265459b13e674fbabf2030f63f117e6609d8d5693f10615deb8fcc2a4cc55bc799ee566f42e73017138d70d1bf492d362d7f9596bba9eb8456079b3ea342e946f13f34b01755bf4292dc1c563e45430e4f7f46730704b5c68d6a56bd846786c19f9b7647e011aed9ac33ea699f52a4f4787f5253509c1febd2587cf8e89e10cda618a0758a298820d1b6bcf7da44ac432f042bd1ad103cea2a2cf4b7e6c4ce2f9734cd66e784095656987d742304ce2c9a1495de3d195b93e6f557cc1691d05acff15d8e8ea41e02afc6522c5602e668b9449490ea1533173916755ab9cc58412de3b8015169d0dfe9dc2f5ffdb0171201e3ad6727138de08d3d3c5762ccf9dbd17b41804386773396a113c7b1116e89abc6f9ba9fed5324bba962ab2e266e7b4cfefd0ba238a5484cfb3c02ba8e4d32e35cdfc050d40186dbbd4db0da01331f87821ac267c1f791d3c7daec9c61c05f2b18c22cd143a900ca24227e12590e0a507df89edb8988d0f1d004bfa53f589f7ae7abfcfb43237096f6a2859d3a35bd5844ae7b031c7ca46b2b7bf0f0866417bf8384ab8dad48d25fdb333c2df79648d47e85cfab2a43660b72c4b5d5eb7d16f1b0ecc5fe912f67498e4f7ff7daa3d32459836e1c43b7eb3e46ef6d08324d80d946f264e12a15aa314dc7c0e55ffb3edcb861c9f773be9725bdd35f9aec1b719b6718d4c3809028d1d0ffb80c706f58d595ffc30b3334de72a8ea89f40e529eef4586e953a680262306eff75a8464d7fda1f4167a6b376452fcb1844f16ae9cc97ae6239c3b6df7087a5fc7e1376a01b803c90d9e74335b15bcb08468a61ae8a13362c468468a8a8dec1b93cd90eb02e356346b3367a1de586be67c4e03a48d12ed101dce398f76760da9d653709813fb7b915b9f739a75b69d11069ea312b7a54d8bdde2942fe344435f616e63a7f68a791d09b370ee1bb20639a31ccf83d608b85dce1f446dfe027d66f8311d0bcb53b9e21da2014849c970d02d832ce9420ef7606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f",
+                "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f"
+            ],
+            "measurement": [
+                0,
+                1,
+                2,
+                3,
+                0,
+                1,
+                2,
+                3,
+                0,
+                1
+            ],
+            "nonce": "000102030405060708090a0b0c0d0e0f",
+            "out_shares": [
+                [
+                    "abceb9d90012152d",
+                    "1d74dbd7ce958c25",
+                    "ae7b3e2648953557",
+                    "6c2f3f6460acd69c",
+                    "38bb16079f35782e",
+                    "e0b0cdac1f1e85c8",
+                    "03be90c863ea0ac7",
+                    "77e426dc6c64f8e2",
+                    "0bd770e16ce73b1d",
+                    "125f39588ae8fa82"
+                ],
+                [
+                    "56314626feedead2",
+                    "e58b2428306a73da",
+                    "5584c1d9b66acaa8",
+                    "98d0c09b9e532963",
+                    "c944e9f85fca87d1",
+                    "224f3253dfe17a37",
+                    "00426f379b15f538",
+                    "8d1bd923929b071d",
+                    "f6288f1e9218c4e2",
+                    "f0a0c6a77417057d"
+                ]
+            ],
+            "prep_messages": [
+                "9d5bb208cbb8731365ae1e94d0ae728a720759c50fd9c850e748af58cadc89e9"
+            ],
+            "prep_shares": [
+                [
+                    "3f68c1b93167360387fa2249b322925b81b0eddb79d4db09cd024292b8e0f0c87d0b6a9189352e4d7a7541f677c67a0a79aebf49b6bbf9029d9b5c6dbfb9e385ec87c17e7edfb387479dd6ca1b8ec2f584d5901101106ff04af0af8d63048aa465293bc71065bd6f9945dc428ca90b4088e6ec66e150cc181adad96e1c25f23c8b1f16860f028663d9325e532ffa664bff6562fc8e9f21d86d2e15fa53cf6468906356a0a3435252ad13f2b2036a4cf7a7ab69c9bb7e459028c9aa7b5346d35d6633563ad5b790a613dfa5051d49052a7d2ce79b4c4dc4960ca1ca9c4333b18e8d8e8cfbb22fc7f9d3fbc315a77ef05c20e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7f",
+                    "c2973e46cd98c9fcb93ad6e57e99a906ec57b85b54cbab356f7b14b1e5290728bfb0763bcfa9f558aa96518720dd424458e871cca35b1ed2944017e2995db7c4c9fbd7aa3f199629c052c23ec50722eb7d2a6feefdef900f601dabc24a8b7723c19bef5441335cf543c6308d27043d2ed953cdc48ff82b77b9048339ebf8a5abc955bffa589c6b9bf66f24af269cda3f93976cb13b41dd89808ee6bfc2645a80719ca95f5bbcadadbcfbc7b77f003d757a2ed60936b44f8a45a3c01b18b4398caaf0fd174c077e1fe56070eb401492f05ea6f4797fcb8240153755c8140d6e834d66e9a9f78c3b3807f666fcd1b58fb5f093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4"
+                ]
+            ],
+            "public_share": "20e61117817dd7cfb739ffc5172737aabb2bbaa54ae3ca8704804c9d91205b7ff093ce5bee54abc0fca8e427e143105a5b66daaf27fd9607eb02547f887956c4",
+            "rand": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f"
+        }
+    ],
+    "proofs": 3,
+    "shares": 2,
+    "verify_key": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"
+}