#jwt #jwk #jws #key #signing #openssl #verification

jwtk

JWT signing (JWS) and verification, with first class JWK and JWK Set (JWKS) support

8 releases

0.3.0 Aug 21, 2023
0.2.4 Jun 24, 2022
0.2.3 Apr 29, 2022
0.2.2 Jan 26, 2022
0.1.1 Aug 10, 2021

#972 in Cryptography

Download history 1098/week @ 2023-12-16 254/week @ 2023-12-23 836/week @ 2023-12-30 1830/week @ 2024-01-06 1416/week @ 2024-01-13 1750/week @ 2024-01-20 1477/week @ 2024-01-27 1482/week @ 2024-02-03 1289/week @ 2024-02-10 1375/week @ 2024-02-17 1243/week @ 2024-02-24 1689/week @ 2024-03-02 1767/week @ 2024-03-09 1815/week @ 2024-03-16 1441/week @ 2024-03-23 1411/week @ 2024-03-30

6,755 downloads per month
Used in 2 crates

MIT license

86KB
2.5K SLoC

JWT signing (JWS) and verification, with first class JWK and JWK Set (JWKS) support.

Supports almost all JWS algorithms:

  • HS256, HS384, HS512
  • Ed25519
  • ES256, ES384, ES512, ES256K
  • RS256, RS384, RS512
  • PS256, PS384, PS512

Supports exp and nbf validations. (Other validations will not be supported, because they are mostly application specific and can be easily implemented by applications.)

Supports converting public/private keys to/from PEM/JWK. Supports working with generic keys (where the algorithm is determined at runtime), i.e. SomePrivateKey/SomePublicKey.

Uses good old openssl for crypto.

See the examples folder for some examples.

Dependencies

~3–17MB
~230K SLoC