transmute-industries / did-key.js

A DID Key Implementation in TypeScript
https://did.key.transmute.industries/
Apache License 2.0
54 stars 15 forks source link

Naming issue with Ed25519 and Curve25519 #15

Open gjgd opened 4 years ago

gjgd commented 4 years ago

https://github.com/transmute-industries/did-key.js/tree/713cbd19a034f221e0ee937d1fb86d2323961dd1/packages/ed25519/src

OR13 commented 4 years ago

The convention for these is loosely modeled off of:

The modules might be better named JWS not ES256K and EdDSA... since secp256k1 both support Schnorr and ECDSA....

The term "Curve25519KeyPair" is probably not a good choice for normal "Ed25519KeyPair", given this:

https://w3c-ccg.github.io/did-method-key/#key-derivation-lacks-proof

and in fact we also have a key class that just does ECDH... https://github.com/transmute-industries/did-key.js/blob/master/packages/x25519/src/X25519KeyPair.ts#L222

^ which you would probably have a similar naming objection too, since X25519 is for key agreement, not for curve naming.

In general, we (and digital bazaar) appear to be following the lib sodium conventions here... https://libsodium.gitbook.io/doc/advanced/ed25519-curve25519

But I am open to exploring improvemnets.