Closed luxebeng closed 11 months ago
bn254_arithmetic::from_repr is wrapped with crypto_algebra::deserialize. and which need support 64 byte vector.
public fun from_repr(repr: vector<u8>): Element<Fr> { let e = std::option::extract(&mut crypto_algebra::deserialize<Fr, FormatFrLsb>(&repr)); e }
Fr::from_uniform_bytes() should be supported.
There's some bug in the current implementation. should look into it.
solved by,
let lo = lo % MODULUS; let hi = hi % MODULUS;
bn254_arithmetic::from_repr is wrapped with crypto_algebra::deserialize. and which need support 64 byte vector.