Repository navigation
feat(identity): pin trusted keys in verify_signatures; stop claiming attribution without them - #9
Merged
Merged
Conversation
…attribution without them verify_signatures only checked that the key written in each entry signed it. A ledger rewritten and re-signed with a fresh key passed, yet the result said "Attribution proven" and the README said impersonation was caught. New load_trusted_keys() and am verify-sig --trusted-keys FILE (<agent> <pubkey> lines, * for any agent): a signature by a key not trusted for the entry's agent FAILs, and so does an unsigned entry from an agent with a trusted key. Without trusted keys the OK message now says the keys are not pinned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Aq8kkjKAMDjSSK54hcWnuc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 범후연이 · project thread
Problem
verify_signaturesonly checked that the key written inside each entry signed it. If someone rewrote a ledger and signed every entry with a fresh key, it still passed. The result nonetheless said "Attribution proven", and the README and GUIDE said impersonation ("signed with the wrong key") was caught. Without knowing which key is expected, it is not.Change
load_trusted_keys(path): reads lines of<agent> <pubkey_hex>, with*meaning any agent and#starting a comment. It validates that each key is a 32-byte Ed25519 key and reports the file and line on errors.verify_signatures(ledger, trusted_keys=...)andam verify-sig --trusted-keys FILE:agent→ FAIL (impersonation).load_trusted_keysis exported. CHANGELOG updated.Tests
tests/test_am.py:cryptographyis installed locally, so the signing tests actually ran rather than being skipped.Generated by Claude Code