arkworks-rs / algebra

Libraries for finite field, elliptic curve, and polynomial arithmetic
https://arkworks.rs
Apache License 2.0
630 stars 246 forks source link

`ark-vesta` uses a different point encoding than `pasta_curves` #768

Open mmaker opened 9 months ago

mmaker commented 9 months ago

This test at line 92:

    assert_eq!(&ark_generator_bytes, &group_generator_bytes.as_ref());

fails with:


---- plugins::tests::test_compatible_pallas stdout ----
thread 'plugins::tests::test_compatible_pallas' panicked at src/plugins/tests.rs:92:5:
assertion `left == right` failed
  left: [0, 0, 0, 0, 33, 235, 70, 140, 221, 168, 148, 9, 252, 152, 70, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0]
 right: [0, 0, 0, 0, 33, 235, 70, 140, 221, 168, 148, 9, 252, 152, 70, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64]
slumber commented 9 months ago

Doesn't https://github.com/arkworks-rs/algebra/pull/639 fix it?

mmaker commented 9 months ago

I think the issue that you're point out concerns representation in memory, but here I'm trying to make sure that the byte representation is identical!

it seems the reason is similar, but over the serialize implementation.