Skip to content

Commit d4b7eab

Browse files
mathsjamescopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 845299613
1 parent 7965712 commit d4b7eab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

willow/src/zk/linear_ip.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub struct LinearInnerProductParameters {
3636
F: RistrettoPoint,
3737
F_: RistrettoPoint,
3838
G: Vec<RistrettoPoint>,
39+
seed: Vec<u8>,
3940
}
4041

4142
pub fn inner_product(a: &[Scalar], b: &[Scalar]) -> Scalar {
@@ -59,6 +60,7 @@ fn common_setup(length: usize, parameter_seed: &[u8]) -> LinearInnerProductParam
5960
)
6061
})
6162
.collect(),
63+
seed: parameter_seed.to_vec(),
6264
}
6365
}
6466

@@ -67,11 +69,9 @@ fn append_params_to_transcript(
6769
params: &LinearInnerProductParameters,
6870
) {
6971
transcript.append_u64(b"n", params.n as u64);
70-
for G_i in &params.G {
71-
transcript.append_message(b"G_i", G_i.compress().as_bytes());
72-
}
73-
transcript.append_message(b"F", params.F.compress().as_bytes());
74-
transcript.append_message(b"F_", params.F_.compress().as_bytes());
72+
// We append the seed not the resulting params themselves because appending that many params
73+
// more than doubles the run time of both prove and verify.
74+
transcript.append_message(b"seed", &params.seed);
7575
}
7676

7777
fn validate_and_append_point(

0 commit comments

Comments
 (0)