#jwk #signature-verification #jwk-set #jwt #first-class #jws #openssl #cache #exp #private-key

jwtk

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

10 releases

0.5.0 Mar 11, 2026
0.4.0 Mar 11, 2025
0.3.0 Aug 21, 2023
0.2.4 Jun 24, 2022
0.1.1 Aug 10, 2021

#392 in Cryptography

Download history 5773/week @ 2026-04-17 4523/week @ 2026-04-24 5895/week @ 2026-05-01 7087/week @ 2026-05-08 5284/week @ 2026-05-15 6514/week @ 2026-05-22 9611/week @ 2026-05-29 6498/week @ 2026-06-05 8414/week @ 2026-06-12 8801/week @ 2026-06-19 12595/week @ 2026-06-26 19716/week @ 2026-07-03 16759/week @ 2026-07-10 16810/week @ 2026-07-17 19074/week @ 2026-07-24 16777/week @ 2026-07-31

73,946 downloads per month
Used in 3 crates

MIT license

100KB
2.5K SLoC

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

Algorithms

  • RS256, RS384, RS512, PS256, PS384, PS512 (verification: aws-lc or openssl; signing: openssl)
  • HS256, HS384, HS512 (feature: openssl)
  • ES256, ES384, ES512, ES256K (feature: openssl)
  • Ed25519 (feature: openssl)

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 JWK. PEM support is available when the openssl feature is enabled. Supports working with generic keys (where the algorithm is determined at runtime), i.e. SomePrivateKey/SomePublicKey.

Features

Feature Default Description
aws-lc Yes RSA signature verification via aws-lc-rs.
openssl No Full algorithm support (RSA signing & verification, HMAC, ECDSA, EdDSA) via OpenSSL. When enabled, RSA uses OpenSSL instead of aws-lc-rs.
remote-jwks Yes RemoteJwksVerifier for fetching and caching remote JWK Sets.

With the default features (aws-lc + remote-jwks), RSA JWT verification works out of the box.

Examples

See the examples folder for usage examples.

Dependencies

~2–18MB
~424K SLoC