Skip to content

Commit

Permalink
fix(zk): proof compatiblity between 32/64b platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarlin-zama committed Oct 30, 2024
1 parent 4ce8b5e commit 047ad05
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tfhe-zk-pok/src/proofs/pke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ pub fn prove<G: Curve>(

let x_bytes = &*[
q.to_le_bytes().as_slice(),
d.to_le_bytes().as_slice(),
(d as u64).to_le_bytes().as_slice(),
b_i.to_le_bytes().as_slice(),
t.to_le_bytes().as_slice(),
msbs_zero_padding_bit_count.to_le_bytes().as_slice(),
Expand Down Expand Up @@ -1027,7 +1027,7 @@ pub fn verify<G: Curve>(

let x_bytes = &*[
q.to_le_bytes().as_slice(),
d.to_le_bytes().as_slice(),
(d as u64).to_le_bytes().as_slice(),
b_i.to_le_bytes().as_slice(),
t.to_le_bytes().as_slice(),
msbs_zero_padding_bit_count.to_le_bytes().as_slice(),
Expand Down
4 changes: 2 additions & 2 deletions tfhe-zk-pok/src/proofs/pke_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ pub fn prove<G: Curve>(

let x_bytes = &*[
q.to_le_bytes().as_slice(),
d.to_le_bytes().as_slice(),
(d as u64).to_le_bytes().as_slice(),
B.to_le_bytes().as_slice(),
t_input.to_le_bytes().as_slice(),
msbs_zero_padding_bit_count.to_le_bytes().as_slice(),
Expand Down Expand Up @@ -1859,7 +1859,7 @@ pub fn verify<G: Curve>(

let x_bytes = &*[
q.to_le_bytes().as_slice(),
d.to_le_bytes().as_slice(),
(d as u64).to_le_bytes().as_slice(),
B.to_le_bytes().as_slice(),
t_input.to_le_bytes().as_slice(),
msbs_zero_padding_bit_count.to_le_bytes().as_slice(),
Expand Down
4 changes: 2 additions & 2 deletions tfhe-zk-pok/src/proofs/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ pub fn prove<G: Curve>(
core::slice::from_mut(s),
&[
hash_s,
&i.to_le_bytes(),
&(i as u64).to_le_bytes(),
v_hat.to_le_bytes().as_ref(),
c_hat.to_le_bytes().as_ref(),
c_y.to_le_bytes().as_ref(),
Expand Down Expand Up @@ -336,7 +336,7 @@ pub fn verify<G: Curve>(
core::slice::from_mut(s),
&[
hash_s,
&i.to_le_bytes(),
&(i as u64).to_le_bytes(),
v_hat.to_le_bytes().as_ref(),
c_hat.to_le_bytes().as_ref(),
c_y.to_le_bytes().as_ref(),
Expand Down

0 comments on commit 047ad05

Please sign in to comment.