#ed25519 #jwtk #hs512 #es256k #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

#443 in Cryptography

Download history 1113/week @ 2025-01-13 1303/week @ 2025-01-20 2080/week @ 2025-01-27 1761/week @ 2025-02-03 1494/week @ 2025-02-10 1682/week @ 2025-02-17 2533/week @ 2025-02-24 2573/week @ 2025-03-03 1860/week @ 2025-03-10 1836/week @ 2025-03-17 2737/week @ 2025-03-24 1767/week @ 2025-03-31 1903/week @ 2025-04-07 1478/week @ 2025-04-14 2296/week @ 2025-04-21 2323/week @ 2025-04-28

8,026 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–17MB
~196K SLoC