golang-jwt / jwt

Go implementation of JSON Web Tokens (JWT).
https://golang-jwt.github.io/jwt/
MIT License
6.98k stars 335 forks source link

RSA-PSS (RSASSA-PSS) keys are unusable in Go language #360

Open vault-thirteen opened 10 months ago

vault-thirteen commented 10 months ago

This library can not be used normally in Golang because built-in Go library does not support parsing RSA-PSS (RSASSA-PSS) keys.

Parsing an RSA-PSS (RSASSA-PSS) key throws a following error:

x509: PKCS#8 wrapping contained private key with unknown algorithm: 1.2.840.113549.1.1.10

For more information see this issue: https://github.com/golang/go/issues/48314

This means that such signing methods as PS256, PS384 and PS512 are not working with built-in Golang's libraries.