Skip to content

Commit 381bc74

Browse files
committed
Update calls in R1CS code.
1 parent 28b22bb commit 381bc74

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/r1cs/prover.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ impl<'a, 'b> ProverCS<'a, 'b> {
325325

326326
// Commit the blinding factors for the input wires
327327
for v_b in &self.v_blinding {
328-
builder = builder.commit_witness_bytes(b"v_blinding", v_b.as_bytes());
328+
builder = builder.rekey_with_witness_bytes(b"v_blinding", v_b.as_bytes());
329329
}
330330

331331
use rand::thread_rng;

tests/r1cs.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ impl ShuffleProof {
7070
R1CSError,
7171
> {
7272
// Apply a domain separator with the shuffle parameters to the transcript
73+
// XXX should this be part of the gadget?
7374
let k = input.len();
74-
transcript.commit_bytes(b"dom-sep", b"ShuffleProof");
75-
transcript.commit_bytes(b"k", Scalar::from(k as u64).as_bytes());
75+
transcript.append_message(b"dom-sep", b"ShuffleProof");
76+
transcript.append_u64(b"k", k as u64);
7677

7778
let mut prover = Prover::new(&bp_gens, &pc_gens, transcript);
7879

@@ -111,9 +112,10 @@ impl ShuffleProof {
111112
output_commitments: &Vec<CompressedRistretto>,
112113
) -> Result<(), R1CSError> {
113114
// Apply a domain separator with the shuffle parameters to the transcript
115+
// XXX should this be part of the gadget?
114116
let k = input_commitments.len();
115-
transcript.commit_bytes(b"dom-sep", b"ShuffleProof");
116-
transcript.commit_bytes(b"k", Scalar::from(k as u64).as_bytes());
117+
transcript.append_message(b"dom-sep", b"ShuffleProof");
118+
transcript.append_u64(b"k", k as u64);
117119

118120
let mut verifier = Verifier::new(&bp_gens, &pc_gens, transcript);
119121

0 commit comments

Comments
 (0)