Skip to content

fix: handle malformed signature keys - #15

Merged
royalpinto007 merged 2 commits into
AgentPostmortem:mainfrom
be-student:codex/9-malformed-signature-key
Sep 6, 2026
Merged

fix: handle malformed signature keys#15
royalpinto007 merged 2 commits into
AgentPostmortem:mainfrom
be-student:codex/9-malformed-signature-key

Conversation

@be-student

Copy link
Copy Markdown
Contributor

What & why

Malformed public keys embedded in a receipt raised decoding or cryptography exceptions. Verification now reports them as a failed signature check so untrusted receipts always produce a structured verdict.

Changes

  • catch malformed Ed25519 public keys at the signature verification boundary
  • cover invalid base64, valid base64 with the wrong key length, and non-ASCII input
  • document the fix in the changelog

Checklist

  • Focused change with a clear description
  • Ran format / lint / tests (see README)
  • Updated docs or CHANGELOG if relevant
  • Linked any related issue

Closes #9

Validation: pytest -q; ruff check .; python examples/demo_rag.py; git diff --check.

@royalpinto007
royalpinto007 merged commit 88d04bf into AgentPostmortem:main Sep 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

verify_signature throws on malformed keys instead of a failed check

2 participants