agentdiff icon indicating copy to clipboard operation
agentdiff copied to clipboard

feat: key format versioning (agentdiff-ed25519-v1 header)

Open codeprakhar25 opened this issue 6 months ago • 0 comments

What

Add a format identifier to the private key file — a first line of agentdiff-ed25519-v1 before the base64 payload.

Why

~/.agentdiff/keys/private.key is currently a bare base64 string with no header. When Phase 2 introduces new key types (sigstore keyless), load_signing_key() has no way to detect the format programmatically. Migration is trivial now and painful later.

How

  • load_signing_key() strips the header line if present (backwards-compatible with old bare base64 keys)
  • generate_keypair() writes the header on new key generation
  • Detect old-format keys on load and emit a one-time migration prompt

Effort

~10 min. Should be done before any sigstore/Phase 2 signing work starts.

codeprakhar25 avatar May 12 '26 12:05 codeprakhar25