Skip to content

Add PS256 etc algorithm support into docs. #1102

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

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/supported-algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,20 @@ They're usually recommended for scenarios where creation is handled by a compone
| `RS512` | RSASSA-PKCS1-v1_5 using SHA-512 | `\Lcobucci\JWT\Signer\Rsa\Sha512` | `>= 2048 bits` |
| `EdDSA` | EdDSA signature algorithms | `\Lcobucci\JWT\Signer\Eddsa` | `>= 256 bits` |

The following algorithms are implemented in a separate package `lcobucci/jwt-rsassa-pss` in order to keep dependencies low in the main package.
Please see the installation instructions in the [RSASSA-PSS readme].

| Name | Description | Class | Key length req. |
|---------|---------------------------------|--------------------------------------|-----------------|
| `PS256` | RSASSA-PSS using SHA-256 | `\Lcobucci\JWT\Signer\RsaPss\Sha256` | `>= 2048 bits` |
| `PS384` | RSASSA-PSS using SHA-384 | `\Lcobucci\JWT\Signer\RsaPss\Sha384` | `>= 2048 bits` |
| `PS512` | RSASSA-PSS using SHA-512 | `\Lcobucci\JWT\Signer\RsaPss\Sha512` | `>= 2048 bits` |

## `none` algorithm

The `none` algorithm as described by [JWT standard] is intentionally not implemented and not supported.
The risk of misusing it is too high, and even where other means guarantee the token validity a symmetric algorithm
shouldn't represent a computational bottleneck with modern hardware.

[JWT standard]: https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms
[RSASSA-PSS readme]: https://github.com/lcobucci/jwt-rsassa-pss
Loading