Key Generation
Dugite CLI supports generating all key types needed for Cardano operations.
Payment Keys
Generate an Ed25519 key pair for payments:
dugite-cli key generate-payment-key \
--signing-key-file payment.skey \
--verification-key-file payment.vkey
Output files:
payment.skey— Payment signing key (keep secret)payment.vkey— Payment verification key (safe to share)
Stake Keys
Generate an Ed25519 key pair for staking:
dugite-cli key generate-stake-key \
--signing-key-file stake.skey \
--verification-key-file stake.vkey
Output files:
stake.skey— Stake signing keystake.vkey— Stake verification key
Verification Key Hash
Compute the Blake2b-224 hash of any verification key:
dugite-cli key verification-key-hash \
--verification-key-file payment.vkey
This outputs the 28-byte key hash in hexadecimal, used in addresses and certificates.
DRep Keys
Generate keys for a Delegated Representative (Conway governance):
dugite-cli governance drep key-gen \
--signing-key-file drep.skey \
--verification-key-file drep.vkey
Get the DRep ID:
# Bech32 format (default)
dugite-cli governance drep id \
--drep-verification-key-file drep.vkey
# Hex format
dugite-cli governance drep id \
--drep-verification-key-file drep.vkey \
--output-format hex
Node Keys
Cold Keys
Generate cold keys and an operational certificate issue counter:
dugite-cli node key-gen \
--cold-verification-key-file cold.vkey \
--cold-signing-key-file cold.skey \
--operational-certificate-counter-file opcert.counter
KES Keys
Generate Key Evolving Signature keys (rotated periodically):
dugite-cli node key-gen-kes \
--verification-key-file kes.vkey \
--signing-key-file kes.skey
VRF Keys
Generate Verifiable Random Function keys (for slot leader election):
dugite-cli node key-gen-vrf \
--verification-key-file vrf.vkey \
--signing-key-file vrf.skey
Operational Certificate
Issue an operational certificate binding the cold key to the current KES key:
dugite-cli node issue-op-cert \
--kes-verification-key-file kes.vkey \
--cold-signing-key-file cold.skey \
--operational-certificate-counter-file opcert.counter \
--kes-period 400 \
--out-file opcert.cert
Address Generation
Payment Address
Build a payment address from keys:
# Enterprise address (no staking)
dugite-cli address build \
--payment-verification-key-file payment.vkey \
--testnet-magic 2
# Base address (with staking)
dugite-cli address build \
--payment-verification-key-file payment.vkey \
--stake-verification-key-file stake.vkey \
--testnet-magic 2
# Mainnet address
dugite-cli address build \
--payment-verification-key-file payment.vkey \
--stake-verification-key-file stake.vkey \
--mainnet
Key File Format
All keys are stored in the cardano-node text envelope format:
{
"type": "PaymentSigningKeyShelley_ed25519",
"description": "Payment Signing Key",
"cborHex": "5820a1b2c3d4..."
}
The cborHex field contains the CBOR-encoded key bytes. The type field identifies the key type and is used for validation when loading keys.
Key files generated by Dugite are compatible with cardano-cli and vice versa.
Complete Workflow Example
Generate all keys needed for a basic wallet:
# 1. Generate payment keys
dugite-cli key generate-payment-key \
--signing-key-file payment.skey \
--verification-key-file payment.vkey
# 2. Generate stake keys
dugite-cli key generate-stake-key \
--signing-key-file stake.skey \
--verification-key-file stake.vkey
# 3. Build a testnet address
dugite-cli address build \
--payment-verification-key-file payment.vkey \
--stake-verification-key-file stake.vkey \
--testnet-magic 2
# 4. Get the payment key hash
dugite-cli key verification-key-hash \
--verification-key-file payment.vkey