ZenGo-X / curv

Rust language general purpose elliptic curve cryptography.
MIT License
264 stars 111 forks source link

Fix curv25519 coordinates #162

Closed elichai closed 1 year ago

elichai commented 2 years ago

The current code had the following bugs:

I generated test vectors using https://github.com/dalek-cryptography/curve25519-dalek and fixed the issues making the test pass.

references: https://ed25519.cr.yp.to/python/ed25519.py https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.3 https://github.com/dalek-cryptography/curve25519-dalek/blob/076cf34/src/edwards.rs#L193 https://github.com/dalek-cryptography/curve25519-dalek/blob/076cf34/src/edwards.rs#L518 https://github.com/dalek-cryptography/curve25519-dalek/blob/076cf34/src/field.rs#L229