diff --git a/README.md b/README.md index f020b23..d8fa75c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,44 @@ # [keypairs](https://git.rootprojects.org/root/keypairs) +A cross-platform Command Line Tool and Golang Library that works +with RSA, ECDSA, PEM, DER, JWK, and the JOSE suite. + +# Keypairs CLI + +Generates, signs, and verifies with NIST-strength asymmetric keys. + +```bash +# Generate JSON Web Keys (JWKs) +keypairs gen > key.jwk.json 2> pub.jwk.json + +# Generate PEM (or DER) Keys, by extension +keypairs gen --key key.pem --pub pub.pem + +# Sign a payload +keypairs sign key.jwk.json --exp 1h '{ "sub": "me@example.com" }' > token.jwt 2> sig.jws + +# Verify a signature +keypairs verify pub.jwk.json token.jwt +``` + +Cheat Sheet at . + +### Install + +**Mac**, **Linux**: + +```bash +curl -sS https://webinstall.dev/keypairs | bash +``` + +**Windows 10**: + +```bash +curl.exe -A MS https://webinstall.dev/keypairs | powershell +``` + +# Keypairs Go Library + JSON Web Key (JWK) support and type safety lightly placed over top of Go's `crypto/ecdsa` and `crypto/rsa` Useful for JWT, JOSE, etc. diff --git a/cmd/keypairs/keypairs.go b/cmd/keypairs/keypairs.go index 77ef327..dcb0efa 100644 --- a/cmd/keypairs/keypairs.go +++ b/cmd/keypairs/keypairs.go @@ -34,7 +34,7 @@ func usage() { fmt.Println(" verify") fmt.Println("") fmt.Println("Examples:") - fmt.Println(" keypairs gen -o key.jwk.json [--pub ]") + fmt.Println(" keypairs gen --key key.jwk.json [--pub ]") fmt.Println("") fmt.Println(" keypairs sign --exp 15m key.jwk.json payload.json") fmt.Println(" keypairs sign --exp 15m key.jwk.json '{ \"sub\": \"xxxx\" }'")