Skip to main content

talos jwk generate rsa

talos jwk generate rsa​

Generate an RSA key pair

Synopsis​

Generate an RSA key pair with the specified key size. Default is 2048 bits. Minimum is 2048 bits, maximum is 8192 bits.

talos jwk generate rsa [flags]

Examples​

# Generate RSA key (default: 2048 bits)
talos jwk generate rsa -o rsa-key.json

# Generate 4096-bit RSA key
talos jwk generate rsa --bits 4096 -o rsa-4096.json

# Generate with custom algorithm
talos jwk generate rsa --alg RS512 -o rsa-rs512.json

# Generate public key only
talos jwk generate rsa --public-only -o rsa-public.json

Options​

--alg string Algorithm override (e.g. RS384, RS512, PS256)
--bits int Key size in bits (minimum 2048, maximum 8192) (default 2048)
-h, --help help for rsa
--jwks Output as JWKS (JSON Web Key Set)
--kid string Key ID (RFC 7638 JWK thumbprint used if not provided)
-o, --output string Output file (writes to stdout if not specified)
--public-only Output public key only
--use string Key usage: 'sig' for signing, 'enc' for encryption (default: sig)

Options inherited from parent commands​

--config string path to a config file (without it, only schema defaults and TALOS_-prefixed env vars apply)
-e, --endpoint string HTTP server base URL including scheme, e.g. http://host:port (for client commands) (default "http://localhost:4420")

See also​