Repository navigation
Conversation
Additive, panic-free API for seed-based key management, needed by comnet's
local vault (private keys stay on the device, only 32-byte seeds are stored):
- MlDsa{44,65,87}Impl::generate_seed / keypair_from_seed / try_keypair /
verifying_key_from_seed: no path through the panicking OsRng.
- sign_with_context (hedged FIPS 204 randomized variant via TryOsRng),
sign_with_context_deterministic (KATs only), verify_with_context.
- MlDsa*Impl::fingerprint and RecipientPublicKey::fingerprint: SHA3-256
key ids bound to the parameter set / KEM.
- Known-answer test against the LAMPS / RFC 9881 example keys (seed 00..1f)
and fingerprint KATs computed independently with Python hashlib.
- SECURITY.md is now tracked (it was excluded by `*.md` in .gitignore).
- release_checks.sh requires `cargo semver-checks check-release`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uh7jkEmwFarxC573DQgybd
Owner
Author
|
CI status: every job in
The usual cause is an account-level GitHub Actions limit, such as exhausted minutes or a spending limit, or Actions being disabled for this repository. A code change can't fix that. Before pushing, the same checks passed locally on this head:
Once runners are available again, CI needs to run on this head. Generated by Claude Code |
…n, key lifecycle Additive building blocks for comnet v2 (written without compiling, per the user's directive; needs a CI run once Actions runners are available): core - prf: labelled SHAKE256 PRF/KDF (prf, prf32), output length bound in. - sharing: Shamir over GF(2^8) with constant-time field arithmetic, split / combine, share commitments for attributable bad shares (break-glass M-of-N). - pq_stream: STREAM chunked ChaCha20-Poly1305 (prefix | counter | last flag), detects reordering, truncation, extension; derive_stream_key, random_prefix. - pq_multi: multi-recipient seal bound to the recipient set (seal_multi, open_multi, recipient_set_hash, dummy_wrap for wrap-count padding). - HpkeEnvelope::open_pinned_zeroizing: rejects a substituted wire suite before decapsulation. - sha3 built with `zeroize`. service - try_network_handle: panic-free network_handle (Unavailable without a Tokio runtime, Malformed for unusable bounds). - KeyLifecycle + CryptoOperation::DescribeLifecycle / CryptoResponse::Lifecycle, per-version creation timestamps in InMemoryProvider (with_clock for tests). Docs: CHANGELOG [Unreleased], README recipes, SECURITY.md entropy notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uh7jkEmwFarxC573DQgybd
…, AES-256-GCM-SIV inner) in progress Written without compiling (user directive). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uh7jkEmwFarxC573DQgybd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uh7jkEmwFarxC573DQgybd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uh7jkEmwFarxC573DQgybd
- pq_multi: back to the 10add53 state. The last WIP commit made it depend on a `pq_cascade` module that was never committed, so the whole core crate failed to compile. The pq-cascade KAT vectors stay in place for when the module lands. - tests/ml_dsa_seed_context.rs: gated on `ml-dsa-backend`; the `legacy-pqclean` lane builds without that feature. - core/lib.rs: rustfmt module order. - docs/plans/crypt-guard-pyo3-contract.md: contract draft for the Python bindings crate; .gitignore now tracks docs/**/*.md. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uh7jkDG5sDvfZRz5J21a2N
…rate layout, lints) Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uh7jkDG5sDvfZRz5J21a2N
…l note Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uh7jkEmwFarxC573DQgybd
…s) into the comnet branch pq_multi.rs keeps the cascade functions (seal_multi_cascade, open_multi_cascade, dummy_cascade_wrap): pq_cascade now exists, so the reason for the revert in 993f714 is gone. lib.rs takes the rustfmt module order from 993f714. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uh7jkEmwFarxC573DQgybd
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
This PR adds the crypt_guard building blocks for the comnet v2 post-quantum messenger, in two milestones. All changes are additive: no existing signatures change, and no variants are added to exhaustive enums.
94471f9): seed-based, panic-free ML-DSA key handling; FIPS 204 signing with a context string; key fingerprints;SECURITY.md. This commit is verified locally.10add53): PRF, Shamir secret sharing, STREAM chunked AEAD, a multi-recipient seal bound to the recipient set, pinned-suite open,try_network_handle, and key lifecycle metadata. The user asked for this code to be written without compiling, so it is unverified until CI runs.Changes
M0-min
MlDsa{44,65,87}Implgains:generate_seed,keypair_from_seed,try_keypair,verifying_key_from_seed;sign_with_context(hedged, viaTryOsRng),sign_with_context_deterministic(for KATs),verify_with_context;fingerprintand the constantsPARAMETER_SET_ID,VERIFYING_KEY_LEN,SIGNATURE_LEN.RecipientPublicKey::fingerprint.00..1f), listed inSHA256SUMS.SECURITY.mdis now tracked; it was previously excluded by*.md.release_checks.shrunscargo semver-checks.M0-ext
prf: SHAKE256 PRF with domain label and length prefixes (prf,prf32). The output length is bound into the input.sharing: Shamir over GF(2^8) with constant-time field arithmetic (split,combine). Share commitments make a bad share attributable to whoever submitted it; this is for break-glass M-of-N.pq_stream: STREAM construction over ChaCha20-Poly1305. The nonce isprefix ‖ counter ‖ last-flag, so reordering, truncation and extension are detected. Alsoderive_stream_keyandrandom_prefix.pq_multi:seal_multi/open_multi: one content key, wrapped per recipient with pq_hpke. The info and the body AAD are bound to the hash of the recipient set.dummy_wrap, for padding the wrap count.HpkeEnvelope::open_pinned_zeroizing: rejects a substituted wire suite before decapsulation.sha3is built withzeroize.try_network_handle: returnsUnavailablewhen no runtime is present andMalformedfor unusable bounds.KeyLifecycleandCryptoOperation::DescribeLifecycle/CryptoResponse::Lifecycle.InMemoryProvider, pluswith_clockfor tests.OpSet::READ_PUBLICandALLnow include the newDescribeLifecyclebit. Grants built fromDescribealone must add it. This is recorded in the CHANGELOG under "Changed".Testing
M0-min: all lanes green locally: fmt, clippy
-D warningswith all features and with default features, the facade/core, service and hyper tests, dependency gates, provenance. Details are in the first commit.M0-ext:
tests/m0_ext_primitives.rsand new unit tests:hashlib;try_network_handletests.None of these have been run yet. See the CI note in the PR comments: Actions runners currently are not assigned to any job.
Security notes
SECURITY.md: KEM encapsulation insideHpkeEnvelope::sealstill usesrand::rngs::OsRng, which panics on entropy failure. This affectsseal_multianddummy_wrap.🤖 Generated with Claude Code
https://claude.ai/code/session_01Uh7jkEmwFarxC573DQgybd