The Key VM runs the K-chain, a dedicated chain for the key lifecycle:
distributed key generation, share distribution, encryption at rest, rotation,
and retirement. It is the cold path of the network's cryptographic state.
The T-chain (Threshold VM) is the hot path that uses these keys for actual
signing.
Precompile address nibble: C=9 (see LP-129 Registry).
secp256k1, Ed25519)
The split is driven by different security properties:
Merging them forces hot-path availability guarantees on cold-path state,
which is both expensive and wrong.
type KeyRecord struct {
ID [32]byte
Scheme KeyScheme // MLKEM | MLDSA | BLS | SECP256K1 | ED25519
Threshold Threshold // (T, N) tuple, or (1,1) for single-party
PublicKey []byte
ShareCommitments [][]byte // One commitment per participating validator
CreatedAt uint64 // Block timestamp
Status Status // Active | Rotating | Retired
Policy UsagePolicy // Max signings per epoch, allowed contexts
}
1. K-chain accepts a CreateKeyTx from an authorized principal
2. K-chain selects the committee (see LP-044 Threshold VM for committee selection)
3. Committee runs DKG off-chain, publishes share commitments on K-chain
4. K-chain verifies commitments, creates KeyRecord, sets Status=Active
5. Key becomes available for use via T-chain signing sessions
Rotation is a fresh DKG that preserves the public key but redistributes shares.
Triggered by:
Every SignSession on T-chain references a KeyRecord.ID. K-chain surfaces
a queryable audit log: which keys signed what, when, at whose request. This
is NOT the hot path — callers read from T-chain for real-time sessions;
K-chain is the archive.
github.com/luxfi/chains/keyvm/ |github.com/luxfi/chains/thresholdvm/ |github.com/luxfi/threshold/protocols/{mldsa,frost,cggmp21,bls,corona} |