Constant tobytes of Fp is in the wrong direction (#108)
onewayfunc 56660958+onewayfunc@users.noreply.github.com
Sun, 30 Oct 2022 15:03:44 -0700
2 files changed,
3 insertions(+),
3 deletions(-)
M
src/fields/fp/mod.rs
→
src/fields/fp/mod.rs
@@ -920,7 +920,7 @@ #[tracing::instrument(target = "r1cs")]
fn to_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError> { match self { Self::Constant(c) => Ok(UInt8::constant_vec( - c.into_bigint().to_bytes_be().as_slice(), + c.into_bigint().to_bytes_le().as_slice(), )), Self::Var(v) => v.to_bytes(), }@@ -930,7 +930,7 @@ #[tracing::instrument(target = "r1cs")]
fn to_non_unique_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError> { match self { Self::Constant(c) => Ok(UInt8::constant_vec( - c.into_bigint().to_bytes_be().as_slice(), + c.into_bigint().to_bytes_le().as_slice(), )), Self::Var(v) => v.to_non_unique_bytes(), }
M
src/pairing/bls12/mod.rs
→
src/pairing/bls12/mod.rs
@@ -8,7 +8,7 @@ groups::bls12::{G1AffineVar, G1PreparedVar, G1Var, G2PreparedVar, G2Var},
}; use ark_ec::bls12::{Bls12, Bls12Parameters, TwistType}; use ark_ff::BitIteratorBE; -use core::marker::PhantomData; +use ark_std::marker::PhantomData; /// Specifies the constraints for computing a pairing in a BLS12 bilinear group. pub struct PairingVar<P: Bls12Parameters>(PhantomData<P>);