Perf: isSquare
- constant-time Jacobi/Kronecker/Legendre symbol using fast GCD
#199
Labels
isSquare
- constant-time Jacobi/Kronecker/Legendre symbol using fast GCD
#199
According to Pornin we can expect a up to 7.5x speedup (with assembly) over a naive exponentiation by (p-1)/2
See https://github.com/pornin/x25519-cm0/blob/75a53f2/src/x25519-cm0.S#L89-L155
See https://github.com/bitcoin-core/secp256k1/blob/7e1bbef/doc/safegcd_implementation.md#8-from-gcds-to-jacobi-symbol
Python: https://gist.github.com/robot-dreams/ceb00162b80384f2ae1913aaa2b35e75
This will significantly accelerate:
constantine/constantine/hash_to_curve/hash_to_curve.nim
Lines 80 to 85 in e9e7a18
Paper: https://eprint.iacr.org/2021/1271.pdf
Reference code:
The text was updated successfully, but these errors were encountered: