🔑Key Management
Create, encrypt and manage private keys using the Othentic CLI
Intro
The Othentic Stack supports multiple methods for managing and using keys.
Depending on security requirements, Operators can use a single key for all AVS operations or separate them into a Controller Key and a Consensus Key.
For each method, Operators can interact with the CLI using either raw keys or encrypted Keystore Files, offering an additional layer of security.
Key Separation
Operators can use a Controller Key to register on Eigenlayer contracts and secure the AVS with a delegated economic stake, and a separate Consensus Key to participate in peer-to-peer Consensus within an AVS.
When registering as an Operator using the CLI, users supply both keys separately, encrypted in Keystore files or as raw text.
Users can provide the same key for both Controller Key and Consensus Key, but we strongly recommend that Operators register using encrypted Keystore files.
Controller Key
The Controller Key is used only as an ECDSA key:
Register as Operator in Eigenlayer contracts.
Interact with the AVS as Operator:
Register as Operator in AVSGovernance contract.
Submit proof-of-tasks to AttestationCenter contract.
Request rewards from AttestationCenter contract.
Submit task aggregation result to AttestationCenter contract.
Consensus Key
The Consensus Key is used only as a BLS key. Operators use it to attest task validity/invalidity in the P2P networking layer.
Generating Keys
The othentic-cli
generates new keys and directly encrypts them into keystore files.
If you've previously generated keys using another tool and have them in raw format, you can use either raw private keys or keystore files.
To generate a new set of keystore-encrypted keys, use the command:
PRIVATE_KEY
: raw 32-byte private key to encrypt as keystore. If not supplied, it will auto-generate a new private key and proceed to encrypt it.KEYSTORE_PATH
: path to the JSON-formatted Keystore file. If not supplied, it will auto-generate a UUID for the file and place it under a.keystore
directory.
Using Separate Controller and Consensus Keys
To benefit from the separation of the Controller and Consensus keys, follow these steps:
Generate keys twice using the
othentic-cli wallet encrypt
command; see above.Optionally, name the Controller key
controller.json
and the Consensus keyconsensus.json
Register as Operator for the AVS.
Store the Controller key securely.
Use Consensus key on the machine(s) running the node software.
Key Usage in CLI
You can provide keys either at runtime or through environment variables.
Using Keystore files
At Runtime
KEYSTORE_PATH
: Path to the JSON-formatted Keystore file.DECRYPT_PASSWORD
: Password to decrypt the Keystore file. If not provided, you'll be prompted to enter it at runtime.
Using Environment Variables
In your .env
file:
Using Raw Keys
At Runtime:
Example:
Using Environment Variables
Last updated