You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MacOS RSA DER / OpenSSL 3.4.0 RSA256 EncodingKey::from_rsa_der broken #426
The exact same issue exists when trying to parse ed25519 keys. This is a structural bug whereby the der encoding is used as is, whereas the pem-codepath extracts the first bitstring it finds in the der-encoding.
I just tried Ed25519 keys (loading with from_ed_der) on v10 and it's able to encode and results in a valid JWT with both aws_lc_rs and rust_crypto, but decoding/validation is failing with rust_crypto. I'm working on adding some tests and will see if I can track down the source of the issue.
Activity
d-s-d commentedon Sep 12, 2025
The exact same issue exists when trying to parse
ed25519keys. This is a structural bug whereby thederencoding is used as is, whereas thepem-codepath extracts the first bitstring it finds in the der-encoding.Keats commentedon Sep 12, 2025
Does someone has a patch?
dsykes16 commentedon Oct 9, 2025
@ben-kaye, I was unable to reproduce the issue after tweaking your openssl command to generate proper PKCS1 DER RSA keys.
Add
-traditionalto youropensslcommand to output keys in PKCS1 format.With proper RSA key inputs, this was validated as working on v9.3.1 and on v10 w/
rust_cryptoandaws_lc_rs. This is not a bug injsonwebtoken.@Keats, this can probably be closed?
Keats commentedon Oct 9, 2025
Let's wait to see if @d-s-d has a reproduction on v10
dsykes16 commentedon Oct 9, 2025
I just tried Ed25519 keys (loading with
from_ed_der) on v10 and it's able to encode and results in a valid JWT with bothaws_lc_rsandrust_crypto, but decoding/validation is failing withrust_crypto. I'm working on adding some tests and will see if I can track down the source of the issue.