FiloSottile / edwards25519

filippo.io/edwards25519 — A safer, faster, and more powerful low-level edwards25519 Go implementation.
https://filippo.io/edwards25519
BSD 3-Clause "New" or "Revised" License
139 stars 30 forks source link

Point method to check for low-order points #34

Open Wollac opened 2 years ago

Wollac commented 2 years ago

For various applications where out of compatibility/specification reasons a switch to Ristretto is not feasible, it is important to check whether a point $P$ is of low order, i.e. $8P = O$. Currently, this can be done manually using MultByCofactor() and Equal(). However, having a dedicated method for this could be more intuitive and efficient. This is somewhat related to #33 and probably the most performant implementation follows Pornin 2022, Section 3, Low-order points.

If such a method is relevant, I could prepare a PR.