Add CLI verifier and epoch-based key rotation (v1.3.0)#10
Merged
bradleygauthier merged 2 commits intomainfrom Mar 9, 2026
Merged
Add CLI verifier and epoch-based key rotation (v1.3.0)#10bradleygauthier merged 2 commits intomainfrom
bradleygauthier merged 2 commits intomainfrom
Conversation
Introduces the `capsule` CLI for verification, inspection, and key management, plus an epoch-based keyring system for automated Ed25519 key rotation aligned with NIST SP 800-57. New modules: cli.py, keyring.py with full test suites. Epoch-aware signature verification in Seal. Updated docs, spec, and changelog for v1.3.0.
- test_protocol_structure: assert "ts-v*" to match actual TypeScript release workflow tag prefix (was asserting "v*") - storage.py: fix import order (ruff I001), accept **engine_kwargs forwarded to create_async_engine - conftest: add autouse fixture that closes stale event loops left by pytest-asyncio before sync tests can orphan them via asyncio.run(); use NullPool for test storage to avoid pooled connection leaks
82239d2 to
32f980d
Compare
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.
Summary
Adds the
capsuleCLI tool and epoch-based key rotation system, bumping the release to v1.3.0.CLI (
cli.py) — command-line tool installed ascapsulevia pip:capsule verify <source>— structural, full (SHA3-256 recomputation), and signature (Ed25519) verification from JSON or SQLite. Output: colored terminal,--json, or--quiet(exit code only).capsule inspect— display a capsule's full 6-section content by--seqor--id.capsule keys info | rotate | export-public— keyring management.capsule hash <file>— SHA3-256 utility.Epoch-based key rotation (
keyring.py) — NIST SP 800-57 aligned key lifecycle. Keyring at~/.quantumpipes/keyring.jsonwith atomic writes. Backward-compatible verification across rotations via fingerprint lookup. Seamless migration from single-key installations.Epoch-aware signature verification —
Seal(keyring=kr)resolves the correct epoch's public key fromsigned_byfingerprint.Zero new dependencies (stdlib
argparse+ existingpynacl).Type of Change
Checklist
Python reference (
reference/python/)cd reference/python && pytest tests/cd reference/python && ruff check src/ tests/cd reference/python && mypy src/qp_capsule/cd reference/python && pytest tests/test_golden_fixtures.pyTypeScript reference (
reference/typescript/)cd reference/typescript && npm testcd reference/typescript && npx tsc --noEmitcd reference/typescript && npm run conformanceGeneral
Protocol Impact