[curves] Computing an inverse scalar for Curve25519
Alexey Ermishkin
scratch.net at gmail.com
Tue May 30 11:23:27 PDT 2017
Hello everyone.
I'm trying to implement sphinx password store protocol which needs an
inverse element webee.technion.ac.il/~hugo/sphinx.pdf using 25519
It's all ok with p-256 curve (PoC in Golang is here:
https://gist.github.com/Scratch-net/37ae11e589ea3d17fe104a2630306042), works
like a charm, but nothing helps for Curve25519.
I tried to
1) Remove clamping before second scalarMult
2) Inverse Endianness, convert scalar to BigInt, use the standard
ModInverse, convert back to bytes and reverse byte order once again but that
did not help
I'm obviously missing something but cannot figure out what. I'd love to get
an advice on how to achieve that using ref10 notation or similar existing
code
Thanks in advance,
Alex.
More information about the Curves
mailing list