The cNGN API encrypts every response payload to an Ed25519 public key you upload to your dashboard. This guide creates the key pair and copies the public key, on any operating system.
Generate the key pair
The command prompts you for:
- Save location: press Enter to accept the default (
~/.ssh/id_ed25519), or provide a dedicated path such as ~/.ssh/cngn_api_key
- Passphrase: press Enter to skip; see the warning below
This produces two files: the private key (id_ed25519) and the public key (id_ed25519.pub).Do not set a passphrase. A passphrase encrypts the private section of the key file, and the decryption implementations in the Encryption guide read the raw Ed25519 key bytes directly, so they cannot open it. Decryption fails with Unable to find Ed25519 key data.Protect the private key with filesystem permissions and a secrets manager instead. To skip the prompt entirely:To check an existing key, base64-decode the second line of the private key file: an unprotected key reads openssh-key-v1 followed by none, while a passphrase-protected one reads aes256-ctr and bcrypt. Copy the public key
macOS
Linux
Windows (PowerShell)
Or simply print it and copy manually: Upload it to your dashboard
Paste the copied public key into the SSH public key field on the API Key tab of your dashboard settings. Full walkthrough: Generating API Keys.
Public vs. private key
Your private key must remain protected at all times and never be disclosed to anyone. If it’s ever exposed, generate a new pair and update the dashboard immediately.
Next: use the private key to decrypt responses in Encrypting & Decrypting Requests.