plume-sig / zk-nullifier-sig

Implementation of PLUME: nullifier friendly signature scheme on ECDSA
MIT License
129 stars 22 forks source link

320 bytes used to store Secp256k1 coordinate #18

Closed 0xbok closed 10 months ago

0xbok commented 1 year ago

A point $(x,y)$ on Secp256k1 curve is of 64 bytes in its uncompressed form (32 byte for each coordinate).

hash_to_curve.rs#L45-L62 uses 320 bytes for each coordinate. Arkworks uses 40 bytes to store a coordinate.

Recommendation: Although the test passes, you can use 40 bytes instead of 320:


-let num_field_bytes = 320;
+let num_field_bytes = 40;