You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, to_bytes is implemented for secp256k1's Fp but not for pasta's Fp. Is there a reason for this? To illustrate this consider the following example that fails to build.
use halo2curves::{
pasta::Fp as PallasScalar,
secp256k1::Fp as SecpScalar,
};
fn main() {
let pallas_scalar = PallasScalar::from(42);
let secp_scalar = SecpScalar::from(42);
println!("pallas scalar: {:?}", pallas_scalar);
println!("secp scalar: {:?}", secp_scalar);
println!("pallas scalar: {:?}", pallas_scalar.to_bytes());
println!("secp scalar: {:?}", secp_scalar.to_bytes());
}
To avoid this discrepancy, a pending PR on Nova uses a hack:
Fp types in secp256k1 and pasta are implemented similarly using the same macro:
However, to_bytes is implemented for secp256k1's Fp but not for pasta's Fp. Is there a reason for this? To illustrate this consider the following example that fails to build.
To avoid this discrepancy, a pending PR on Nova uses a hack:
We would like to avoid this hack and use a uniform implementation. Can you help?
The text was updated successfully, but these errors were encountered: