Documentation
¶
Overview ¶
Package identity holds the peer's ed25519 keypair and the secret seed behind the rotating pseudonymous evidence IDs (goal.md §8.6, plan C10). The seed never leaves the machine; only HMAC-derived, epoch-scoped buckets appear in uploads, so the server can dedupe within an epoch but cannot link across epochs or recover paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Identity is the loaded local identity. The zero value is unusable; obtain one via LoadOrCreate.
func LoadOrCreate ¶
LoadOrCreate reads home/identity.json, generating and persisting a new identity (file mode 0600) if none exists.
func (*Identity) AnonID ¶
AnonID derives the rotating anonymous evidence ID for one daily epoch ("2026-08-13"): hex(HMAC-SHA256(seed, "anon|"+epochDay))[:16].
func (*Identity) PeerID ¶
PeerID is the persistent public identity: "ed25519:" + hex(sha256(pubkey))[:16].
func (*Identity) ProjectBucket ¶
ProjectBucket derives the rotating per-project dedup bucket for one monthly epoch ("2026-08"): hex(HMAC-SHA256(seed, "proj|"+path+"|"+month))[:12]. The absolute path stays inside the HMAC input; it is never recoverable from the 12-hex output.