Score:0

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

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 ?

\$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)
And that prime number \$2^{255}-19\$ is generally noted \$p\$, not \$n\$.
And [RFC 8032](https://datatracker.ietf.org/doc/html/rfc8032) is your guide.
See https://eprint.iacr.org/2014/198.pdf which is a Curve25519 GPU implementation