o1-labs / proof-systems

The proof systems used by Mina
https://o1-labs.github.io/proof-systems/
Apache License 2.0
413 stars 96 forks source link

improve serialization for elliptic curve points in the pasta curves #987

Closed mimoo closed 1 year ago

mimoo commented 1 year ago

Once https://github.com/o1-labs/proof-systems/issues/980 is in, we can override the serialization for the pasta curves.

Currently the serialization of a point compressed it to a single x coordinate (so 32 bytes) and add an extra byte for flags where:

For the pasta curves the canonical serialization is usually over 32 bytes and encoded as such:

This would effectively save 1 byte for every point we serialize, but not only that, it would also be compatible with other implementations implementing this canonical serialization

mimoo commented 1 year ago

One example: https://github.com/arkworks-rs/curves/pull/129/files

imikushin commented 1 year ago

I'm going to look into this.

github-actions[bot] commented 1 year ago

Stale issue message