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

Typo in the AlgorithmId.ES256X? #545

Closed
olivier-spinelli opened this issue Feb 16, 2021 · 4 comments · Fixed by #547
Closed

Typo in the AlgorithmId.ES256X? #545

olivier-spinelli opened this issue Feb 16, 2021 · 4 comments · Fixed by #547
Labels
bug Something isn't working

Comments

@olivier-spinelli
Copy link
Contributor

olivier-spinelli commented Feb 16, 2021

AlgorithmId defines:

        /// <summary>
        /// 'ES256X'
        /// https://tools.ietf.org/html/draft-ietf-cose-webauthn-algorithms-05
        /// </summary>
        ES256X = -46,

Shouldn't it be ES256K as defined here?
https://tools.ietf.org/html/rfc8812#section-3.3

(Sorry if I miss something here... But if it's the case, a comment may be a good idea.)

@ycrumeyrolle
Copy link
Collaborator

You're right, this is an error

@ycrumeyrolle ycrumeyrolle added the bug Something isn't working label Feb 16, 2021
@ycrumeyrolle
Copy link
Collaborator

The PR that implement this algorithm was named correctly #494, not the code.
I have not clue of the origin of the typo error...
Will be fixed with #547

@olivier-spinelli
Copy link
Contributor Author

The fact is that X/K, under some fonts can easily be exchanged...

Since, I'm here (don't want to open an issue for a stupid question). I'm having a hard time figuring out the "defaultAlgorithm" here:

TokenValidationPolicyBuilder RequireSignature(string issuer, Jwks keys, SignatureAlgorithm defaultAlgorithm)

Because the "alg" header parameter (https://tools.ietf.org/html/rfc7515#section-4.1.1):

This Header Parameter MUST be present and MUST be understood and processed by implementations.

... default here seems rather strange to me. Is it a way to REQUIRE a given algorithm? In this case, how does this fit with the multiple keys that could be associated to the "kid"?

(This defaultAlgorithm is not optional... just like the "alg" parameter.)

Sorry to ask but I'll appreciate some explanations about this... Thanks in advance.

@ycrumeyrolle
Copy link
Collaborator

I really appreciates this feedbacks.
I opened a new issue at #548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants