Score:0

EC implementation on Edward curves : what modulo is used in implementation?

cn flag

I'm trying to implement EC scalar multiplication in the fastest way possible (but still with a good curve) on a GPU.
I'm specifically looking to implement it based on https://github.com/Chair-for-Security-Engineering/ecmongpu and trying to use other curves like Curve25519 (or Edwards25519, I believe it's a representation difference).
I noticed all calculations on x and y coordinates are done modulo some number n (I believe it's the number that the code is meant to brute-force factor).
If I'm not looking to brute-force factor a number but simply to implement EC scalar multiplication using this code, what number should I use for modulus calculations ?

(NB: I'm still a beginner in EC cryptography, so links to the appropriate resources are welcome)

Bonus question: should I use extended or inverted coordinates ?

kelalaka avatar
in flag
$n$ is the prime number that curve is defined. It is $2^{255}-19$ where the name comes. [EdDSA](https://en.wikipedia.org/wiki/EdDSA#Ed25519)
fgrieu avatar
ng flag
And that prime number $2^{255}-19$ is generally noted $p$, not $n$.
kelalaka avatar
in flag
And [RFC 8032](https://datatracker.ietf.org/doc/html/rfc8032) is your guide.
knaccc avatar
es flag
See https://eprint.iacr.org/2014/198.pdf which is a Curve25519 GPU implementation
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.