Expand description
Peer identity key management with Ed25519 key rotation support.
This module provides PeerIdentityManager, which handles loading,
generating, rotating, and persisting the node’s Ed25519 keypair.
§Key Rotation
Rotating a peer identity changes the node’s PeerId. The old keypair is
retained in previous_keypairs for a configurable grace period so that
in-flight connections authenticated against the old key can finish cleanly.
Rotation is atomic: the new keypair is written to a temporary file in the same directory as the target file, then renamed into place, which prevents partial writes from corrupting the identity.
§PEM Export
The current public key can be exported as a PKCS#8 SubjectPublicKeyInfo PEM block for out-of-band distribution (e.g., DNS TXT records or well-known files served over HTTPS).
Structs§
- Peer
Identity Manager - Manages the Ed25519 peer identity key with rotation support.
- Previous
Keypair - A historical keypair entry kept for grace-period verification.
- Rotation
Record - A record describing a completed key rotation event.
Enums§
- Identity
Error - Errors produced by
PeerIdentityManager.