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

bug: Generating EC-512 keys #31

Closed
2 tasks done
Artenuvielle opened this issue Jul 10, 2019 · 1 comment
Closed
2 tasks done

bug: Generating EC-512 keys #31

Artenuvielle opened this issue Jul 10, 2019 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@Artenuvielle
Copy link

Describe the bug
When generating EC-512 keys intuitively you would want to use JWK.generate('EC','P-512'). However if you look at the evaluation of the second parameter (crvToDSA) in the file /lib/jwk/key/ec.js (line 29) you have to use P-521. Not sure if it's a typo or a bug.

To Reproduce
Try running JWK.generate('EC','P-512'). It will give this exception: JOSENotSupported: unsupported EC key curve: P-512

Environment:

  • @panva/jose version: v1.2.0

  • node version: v12.4.0

  • the bug is happening on latest @panva/jose too.

  • i have searched the issues tracker on github for similar issues and couldn't find anything related.

@Artenuvielle Artenuvielle added the bug Something isn't working label Jul 10, 2019
@panva
Copy link
Owner

panva commented Jul 10, 2019

No that's intended, the curve name is P-521, there is no "P-512" curve - see https://tools.ietf.org/html/rfc7518#section-6.2.1.1

@panva panva added the invalid This doesn't seem right label Jul 10, 2019
@panva panva closed this as completed Jul 10, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants