babelouest / rhonabwy

Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT
https://babelouest.github.io/rhonabwy/
GNU Lesser General Public License v2.1
45 stars 21 forks source link

Bugfix: Generate JWKS with Ed25519 does not work #14

Closed wbangna closed 3 years ago

wbangna commented 3 years ago

The tool rnbyc expected the key type EDDSA instead Ed25519 which lead to the error message: "Invalid key typeError jwk_generate".

babelouest commented 3 years ago

Thanks @wbangna ,

I'll also change the ECDSA??? options values to EC??? to make it more clear (ECDSA is the signature algorithm), do you concur?

wbangna commented 3 years ago

I'm not sure enough to answer your question. I just wanted to make it work and since "Ed25519" appears in your README.md in the "Digital Signature or MAC Algorithm" column as the others (e.g. ECDSA), I thought "Ed25519" would be right.

babelouest commented 3 years ago

I was referring to the -g option value you need when you generate an ECC key pair.

The previous option value was like ECDSA256, I changed it to EC256 to avoid confusion:

$ rnbyc -j -g ec256

I've committed this change here