Create the Ed25519 key pair used to encrypt API responses to you
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.
1
Generate the key pair
ssh-keygen -t ed25519 -C "your_email@example.com"
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.
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
File
Can be shared?
Role
id_ed25519.pub (public)
Yes, upload to the dashboard
The platform encrypts responses with it
id_ed25519 (private)
Never, keep on your server only
Your integration decrypts responses with it
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.