#ed25519 #hs512 #rs512 #ps512

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

#283 in Cryptography

Download history 1502/week @ 2024-12-07 1237/week @ 2024-12-14 329/week @ 2024-12-21 421/week @ 2024-12-28 1406/week @ 2025-01-04 1134/week @ 2025-01-11 1310/week @ 2025-01-18 2057/week @ 2025-01-25 1756/week @ 2025-02-01 1485/week @ 2025-02-08 1664/week @ 2025-02-15 2523/week @ 2025-02-22 2597/week @ 2025-03-01 1840/week @ 2025-03-08 1853/week @ 2025-03-15 2380/week @ 2025-03-22

8,942 downloads per month
Used in 2 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–15MB
~196K SLoC