Generate RSA key pair
Create public.pem and private.pem in a folder; keep the private key protected. Existing keys stop the step, or are replaced or kept as a backup (key rotation).
Command in the Hash and encrypt toolkit · id ooa.crypto/rsa_generate_keys · 3 inputs (1 required), 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Folder | File | Yes | Folder for the key files. | |
| If keys exist | String | No | error | When the folder already has keys: error stops with CRYPTO.KEY_EXISTS; rotate renames them to *.pem.<date-time>.bak first; overwrite replaces them (the old private key is lost). |
| Key size | Number | No | 3072 | Key length in bits; 3072 or more is recommended. |
Outputs
| Output | Type | What it is |
|---|---|---|
| public_key | File | Public key path. |
| private_key | File | Private key path. |
| backup_private_key | File | With if_keys_exist = rotate: where the previous private key was moved; empty otherwise. |