-
Notifications
You must be signed in to change notification settings - Fork 166
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
Support verifying JWT signatures, which use different encodings from ASN.1 #237
Comments
I think we should:
For RSA and ED25519 there would be no difference in the values of the WDYT? |
Also, I don't know if/where the JOSE specification says which EKU, KU, etc. should be used for such certificates, but presumably you also need a new API for building/verifying the certificate chain using the proper EKU, instead of the EKUs for TLS clients/servers. |
I've generalized this issue to be about adding JWT support. Here's what I expect to see from others before we make progress on this issue:
|
Hi,
I have been trying to verify JSON Web Tokens' signature with
webpki
and it appears to be more complicated than it should be.Quoting jwt.io :
Mainly, JWT are used as part of authentication systems (OpenID Connect, OAuth2, ...) for Web applications, but not only.
RFC7515 (RFC for JSON Web Signature) describes how signature works for a JWT. Mainly, it states at page 45 (Appendix A, §3.1 that :
where
||
denotes the concatenation of two values.Upon examination of
ring
's source code, it seems to me that this encoding method matches the expected input for *_FIXED signature algorithms. See functionsplit_rs_fixed
inring
.However webpki only exposes the *_ASN1 version of such algorithms, meaning that one has to first encode R, S to a DER sequence of unsigned integers before trying to call
verify_signature
. That seems like a unnecessary step as it adds unneeded complexity. It is also prone to error if one is not familiar with DER encoding.As such it would be nice if webpki would expose _FIXED versions of signature algorithms.
Thanks in advance,
Regards,
The text was updated successfully, but these errors were encountered: