Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 764 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 764 Bytes

nano-jwt

A nano JWT(JSON Web Tokens) is a pure Rust implementation focuses on simplicity and easy use.

JWT algorithm name Description
ES256 ECDSA over p256 / SHA-256
... ...

Examples

  1. Generate Elliptic Curve keys

Use the following commands to generate a P-256 Elliptic Curve key pair:

openssl ecparam -genkey -name prime256v1 -noout -out es256_private.pem
openssl ec -in es256_private.pem -pubout -out es256_public.pem
  1. Convert to PKCS#8 format
openssl pkcs8 -topk8 -nocrypt -in es256_private.pem -out es256_private_pkcs8.pem
  1. Run Example
cargo run --example es256_example