Browse Source

Fix `to_non_unique_bytes` for `BLS12::G1Prepared`

master
Pratyush Mishra 3 years ago
parent
commit
1e935b0b94
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/groups/curves/short_weierstrass/bls12/mod.rs

+ 3
- 3
src/groups/curves/short_weierstrass/bls12/mod.rs

@ -90,9 +90,9 @@ impl ToBytesGadget for G1PreparedVar

{

#[tracing::instrument(target = "r1cs")] #[tracing::instrument(target = "r1cs")]
fn to_non_unique_bytes(&self) -> Result<Vec<UInt8<P::Fp>>, SynthesisError> { fn to_non_unique_bytes(&self) -> Result<Vec<UInt8<P::Fp>>, SynthesisError> {
let mut bytes = self.0.x.to_bytes()?;
let y_bytes = self.0.y.to_bytes()?;
let inf_bytes = self.0.infinity.to_bytes()?;
let mut bytes = self.0.x.to_non_unique_bytes()?;
let y_bytes = self.0.y.to_non_unique_bytes()?;
let inf_bytes = self.0.infinity.to_non_unique_bytes()?;
bytes.extend_from_slice(&y_bytes); bytes.extend_from_slice(&y_bytes);
bytes.extend_from_slice(&inf_bytes); bytes.extend_from_slice(&inf_bytes);
Ok(bytes) Ok(bytes)

Loading…
Cancel
Save