#jwk-set #jws #first-class #validation #private-key #exp #public-private #key-set #nbf

jwtk

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

9 releases

0.4.0 Mar 11, 2025
0.3.0 Aug 21, 2023
0.2.4 Jun 24, 2022
0.2.3 Apr 29, 2022
0.1.1 Aug 10, 2021

#1195 in Cryptography

Download history 1421/week @ 2025-10-07 2176/week @ 2025-10-14 1490/week @ 2025-10-21 1697/week @ 2025-10-28 2327/week @ 2025-11-04 1671/week @ 2025-11-11 2333/week @ 2025-11-18 1634/week @ 2025-11-25 2120/week @ 2025-12-02 1507/week @ 2025-12-09 1896/week @ 2025-12-16 510/week @ 2025-12-23 932/week @ 2025-12-30 1244/week @ 2026-01-06 1519/week @ 2026-01-13 2145/week @ 2026-01-20

5,963 downloads per month
Used in 3 crates

MIT license

88KB
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–18MB
~203K SLoC