Documentation
¶
Overview ¶
Package identity manages Ed25519 keypairs for verified-mode nodes. A node's identity is SHA-256(public_key) — the ID is derived from and bound to the keypair, making it cryptographically unforgeable without the private key.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NodeIDFrom ¶
Types ¶
type Keypair ¶
type Keypair struct {
PublicKey ed25519.PublicKey
PrivateKey ed25519.PrivateKey
NodeID string
TLSCert tls.Certificate
}
Keypair holds an Ed25519 identity. NodeID is SHA-256(PublicKey). TLSCert CN equals NodeID.
func LoadOrGenerate ¶
LoadOrGenerate reads a keypair from path, generating and persisting one if absent (mode 0600).
Click to show internal directories.
Click to hide internal directories.