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

Algorithm ES512 really was named correctly prior to issue #219 #465

Closed
douganger opened this issue Nov 20, 2019 · 3 comments
Closed

Algorithm ES512 really was named correctly prior to issue #219 #465

douganger opened this issue Nov 20, 2019 · 3 comments
Labels
stale Issues without activity for more than 60 days

Comments

@douganger
Copy link

Issue #219 requested that the algorithm ES512 be renamed to ES521, citing RFC4492. The reporter correctly noted that the curve is named P-521, not P-512.

However, RFC4492 addresses the names of standard curves, not algorithm specifications for JSON Web Signatures or JSON Web Tokens.

In RFC7518, the table under section 3.1 on page 6 specifies ES512 as the "alg" Param Value for ECDSA using P-521 and SHA-512.

Currently, both options are accepted, but there is a comment in algorithms.py that ES512 is only left for backward compatibility after a fix. ES512 is in fact the correct value.

@jpadilla
Copy link
Owner

@douganger great catch.

https://tools.ietf.org/html/rfc7518#section-3.1

3.1.  "alg" (Algorithm) Header Parameter Values for JWS

   The table below is the set of "alg" (algorithm) Header Parameter
   values defined by this specification for use with JWS, each of which
   is explained in more detail in the following sections:

   +--------------+-------------------------------+--------------------+
   | "alg" Param  | Digital Signature or MAC      | Implementation     |
   | Value        | Algorithm                     | Requirements       |
   +--------------+-------------------------------+--------------------+
   | HS256        | HMAC using SHA-256            | Required           |
   | HS384        | HMAC using SHA-384            | Optional           |
   | HS512        | HMAC using SHA-512            | Optional           |
   | RS256        | RSASSA-PKCS1-v1_5 using       | Recommended        |
   |              | SHA-256                       |                    |
   | RS384        | RSASSA-PKCS1-v1_5 using       | Optional           |
   |              | SHA-384                       |                    |
   | RS512        | RSASSA-PKCS1-v1_5 using       | Optional           |
   |              | SHA-512                       |                    |
   | ES256        | ECDSA using P-256 and SHA-256 | Recommended+       |
   | ES384        | ECDSA using P-384 and SHA-384 | Optional           |
   | ES512        | ECDSA using P-521 and SHA-512 | Optional           |
   | PS256        | RSASSA-PSS using SHA-256 and  | Optional           |
   |              | MGF1 with SHA-256             |                    |
   | PS384        | RSASSA-PSS using SHA-384 and  | Optional           |
   |              | MGF1 with SHA-384             |                    |
   | PS512        | RSASSA-PSS using SHA-512 and  | Optional           |
   |              | MGF1 with SHA-512             |                    |
   | none         | No digital signature or MAC   | Optional           |
   |              | performed                     |                    |
   +--------------+-------------------------------+--------------------+

   The use of "+" in the Implementation Requirements column indicates
   that the requirement strength is likely to be increased in a future
   version of the specification.

jpadilla added a commit that referenced this issue Jan 6, 2020
jpadilla added a commit that referenced this issue Apr 6, 2020
@jpadilla
Copy link
Owner

jpadilla commented Apr 8, 2020

Addressing this for v2 #470

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Issues without activity for more than 60 days label Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues without activity for more than 60 days
Projects
None yet
Development

No branches or pull requests

2 participants