Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Ed25519 signatures #42

Closed
skion opened this issue Oct 12, 2014 · 9 comments
Closed

Adding support for Ed25519 signatures #42

skion opened this issue Oct 12, 2014 · 9 comments

Comments

@skion
Copy link
Contributor

skion commented Oct 12, 2014

Would anyone upstream be interested in adding support for NaCl-style Ed25519 signatures? I have done some preliminary work in here based on PyNaCl. At the moment it includes a fallback (and prohibitively slow) pure-Python implementation as well, but I could easily be persuaded to create a PR without that part and/or based on feedback.

@jpadilla
Copy link
Owner

I have to admit that I don't know much about NaCL so I'd be good to have some feedback from somebody that does.

What's the use case for using Ed25519 signatures?

@skion
Copy link
Contributor Author

skion commented Oct 18, 2014

They essentially offer digital (public key) signatures similar to RS*, yet with keys that are just 32 bytes long. Public keys can thus be stored in a kid header parameter directly making verification of the signature trivial.

@mark-adams
Copy link
Contributor

The JSON Web Algorithms (JWA) draft spec doesn't seem to include anything other than HMAC (HS*), RSASSA-PKCS-v1_5 (RS*), ECDSA (EC*), and RSASSA-PSS (PS*).

I think that the library should focus on implementing the proposed spec as closely as possible and leave non-standard algorithms to others, but that's just my opinion. That being said, there's no reason we shouldn't make it easier by introducing some sort of a pluggable extension mechanism that developers could use to add non-standard algorithms for use in their applications.

Maybe we could rework the existing signing_methods and verifying_methods lookups into more of a object-based architecture using the registry pattern. That way it would be easier for consumers of the library to add new non-standard algorithms such as NaCL for their applications to use. I don't think we'd be looking at any public API changes here with the exception of adding a new public register_algorithm method.

@jpadilla, if you think this sort of a plugin design might be a good idea, let me know and I can create a separate issue for it..

@skion
Copy link
Contributor Author

skion commented Dec 23, 2014

From my angle a plugin model would probably work great.

@jpadilla
Copy link
Owner

Sounds good to me. I also want to start moving this to a v1 stance. It's already being used in production and has been kicking around for a while now.

@wbolster
Copy link
Contributor

wbolster commented Jan 6, 2015

@skion see #70 for more discussion re. extensions.

@mark-adams
Copy link
Contributor

@jpadilla Since we've decided this is best handled by some form of extensibility (like #70), can we go ahead and close this issue?

@skion
Copy link
Contributor Author

skion commented Jan 16, 2015

Most definitely; looking forward to trying the registry stuff soon.

@stela
Copy link

stela commented Jul 21, 2017

Since January 2017, Ed25519 and Ed448 signatures are now standardized by this RFC: https://tools.ietf.org/html/rfc8037 (using alg=EdDSA)
There's a registry of algorithm definitions to use for JOSE implementations at https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants