Open mmaker opened 1 year ago
solve with
~/faest-rs$ git diff | tee
diff --git a/src/fiat_shamir.rs b/src/fiat_shamir.rs
index 41c35f8..75d8416 100644
--- a/src/fiat_shamir.rs
+++ b/src/fiat_shamir.rs
@@ -43,8 +43,8 @@ where
pub fn to_bytes(&self) -> Vec<u8> {
let bincode_cfg = bincode::config::standard()
.with_little_endian()
- .with_fixed_int_encoding()
- .skip_fixed_array_length();
+ .with_fixed_int_encoding();
+ // .skip_fixed_array_length();
bincode::encode_to_vec(self, bincode_cfg).unwrap()
}
}
@@ -103,8 +103,8 @@ where
fn sign(mut self, message: &[u8]) -> Self::Signature {
let bincode_cfg = bincode::config::standard()
.with_little_endian()
- .with_fixed_int_encoding()
- .skip_fixed_array_length();
+ .with_fixed_int_encoding();
+ // .skip_fixed_array_length();
let commitment = self.prover.commit();
let h1 = {
@@ -178,8 +178,8 @@ where
fn verify(mut self, signature: &Self::Signature, message: &[u8]) -> bool {
let bincode_cfg = bincode::config::standard()
.with_little_endian()
- .with_fixed_int_encoding()
- .skip_fixed_array_length();
+ .with_fixed_int_encoding();
+ // .skip_fixed_array_length();
let Self::Signature {
commitment,
diff --git a/src/voleith.rs b/src/voleith.rs
index 6a78771..9865ba5 100644
--- a/src/voleith.rs
+++ b/src/voleith.rs
@@ -215,13 +215,13 @@ impl<F: Clone, H: Digest> Clone for Response<F, H> {
}
}
-impl<F: bincode::Encode, H: Digest> bincode::Encode for Response<F, H> {
+impl<F: bincode::Encode + 'static, H: Digest> bincode::Encode for Response<F, H> {
fn encode<E: bincode::enc::Encoder>(
&self,
encoder: &mut E,
) -> core::result::Result<(), bincode::error::EncodeError> {
bincode::Encode::encode(&self.hash.as_slice(), encoder)?;
- bincode::Encode::encode(&self.vector.as_slice(), encoder)?;
+ bincode::Encode::encode(&self.vector.as_slice(), encoder).unwrap();
Ok(())
}
}```