paulmillr / noble-curves

Audited & minimal JS implementation of elliptic curve cryptography.
https://paulmillr.com/noble
MIT License
623 stars 56 forks source link

Question about use case #73

Closed CashCode closed 10 months ago

CashCode commented 10 months ago

Hello. First of all, thanks for awesome library.

I want to implement ECC-Еlgаmal thrеshоld (t,n) on сurve25519.

As far as I understand: Ed25519 - signature algorythm Х25519 - DH protocol which uses curve25519 (it's X coordinate) Curve25519 - curve itself

What I need is module operation on curve25519: mulmod / addmod / invmod.

So, is it possible to use operation from x25519 for my tasks ЕСС-TeG calculations or is its beyond the scope of package? Thank you.

paulmillr commented 10 months ago

We don't implement montgomery curve operations (over curve 25519). That means there is no Point addition, multiplication, etc.

Mulmod / addmod / invmod over curve25519 field are available and you can easily do it: fp = mod.Field(2n**255n-19n); fp.inv(1589n) etc