Skip to content

3.2.0 line: comnet building blocks incl. pq_cascade, RustSec dependency updates, contract drafts for keystore/KMS and pyo3 - #25

Draft
mm9942 wants to merge 14 commits into
mainfrom
ccr-50f7ab7d-1b6835
Draft

mm9942 wants to merge 14 commits into
mainfrom
ccr-50f7ab7d-1b6835

Conversation

@mm9942

@mm9942 mm9942 commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

Supersedes #24: contains its commits (M0-min/M0-ext building blocks and the reviewed pq_cascade state a29b8b6 from the comnet workflow) plus the fixes needed to build, the RustSec dependency updates, and the plan documents for the next crates. GitHub Actions in this repository currently fails every job after about one second without reaching a runner (runner_id 0, see the comment below), so verification was done locally.

Build fixes

  • tests/ml_dsa_seed_context.rs: gated on ml-dsa-backend (the legacy-pqclean lane builds without it).
  • crates/core/src/lib.rs: rustfmt module order.
  • .gitignore: track docs/**/*.md.
  • The intermediate revert of pq_multi (993f714) is superseded by the merge of a29b8b6, which ships pq_cascade.rs together with the cascade functions of pq_multi.

Dependency updates (cargo deny, RustSec)

  • p256/p384 =0.13 → =0.14.0 (ecdh feature, ToSec1Point): the hybrid PQ KEMs leave crypto-bigint 0.5 (RUSTSEC-2026-0387). Wire bytes and pinned vectors unchanged.
  • zip 2 → 9 (feature zip): RUSTSEC-2026-0367/0368/0369; via it zstd 0.14.3/zstd-safe 8.2.0 (RUSTSEC-2026-0391/0398/0403). ZipFile::name now returns a Result; archive tests adapted.
  • Lockfile: tokio 1.54.1 (RUSTSEC-2026-0386), ctutils 0.4.7 (RUSTSEC-2026-0385), zstd-sys 2.1.2 (RUSTSEC-2026-0410).
  • deny.toml: bzip2-1.0.6 licence allowed (libbz2-rs-sys behind zip); RUSTSEC-2026-0387 accepted only for the remaining path hpke 0.13 → p256/p384 0.13 (classical DHKEM suites), reason recorded. Clearing it needs the hpke 0.15 migration (rand_core 0.10, aead 0.6, sha2 0.11, x25519-dalek 3), documented as open in CHANGELOG and SECURITY.md.

Plans (docs only, nothing implemented)

  • docs/plans/crypt-guard-pyo3-contract.md: Python bindings crate.
  • docs/plans/crypt-guard-kms-contract.md: crypt_guard_keystore (handle-based Kek/KekProvider, OS backends for Linux/macOS/Windows) and crypt_guard_kms (CGKS container with rollback guard, SealedProvider, HTTP API, streamable-HTTP MCP, mTLS, UNIX-socket identity via SO_PEERCRED+SO_PEERPIDFD+cgroup v2, public-key directory, optional arti). Aligned with the comnet and Harwness sessions.
  • docs/decisions/DEC-101: layout and lint contract for the new crates.

Open decision for the maintainer

  • polyval = { features = ["zeroize"] } for the AES-256-GCM-SIV layer of pq_cascade (helps only the portable backend, see SECURITY.md). Not set in this PR.

Verification (local, Rust 1.97, head a67a570 code / 6a3b3c4 docs)

All 19 lanes pass: cargo fmt --check; clippy -D warnings with --all-features and with default features; the 10 cargo test lanes of rust.yml (including tests/pq_cascade_kats.rs, the module's unit tests and doctests); per-feature cargo check matrix; examples; fuzz-target check; scripts/check_dep_gates.sh; vector provenance; cargo deny check (advisories, bans, licences, sources all ok).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Uh7jkDG5sDvfZRz5J21a2N

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
…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

mm9942 commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

CI status on 8b97e77: red, but not because of this PR.

All 14 jobs of run 41313938409 were created and marked failed within one second (started_at 13:59:55, completed_at 13:59:56, runner_id 0, no log available). The same pattern hit every run on #24 since 2026-11-01 02:04 (runs 109 to 112), while the last main run (108, 2026-09-27) was green with the same workflow file. The workflow never reached a runner, so this is a GitHub Actions account/billing or runner-availability problem of the repository, not a build failure. It cannot be fixed from a PR, and I have no way to re-run jobs from this session.

What was verified instead, locally on this head with Rust 1.97: every lane of rust.yml passes: cargo fmt --check, clippy -D warnings with --all-features and with default features, the ten cargo test lanes, the per-feature cargo check matrix, examples, fuzz-target check, scripts/check_dep_gates.sh, and the vector provenance script. cargo deny check result follows in the PR description once it finishes.

Action needed from the repository owner: check Settings → Billing → Actions (spending limit / payment) or Settings → Actions → General (runners enabled). As soon as runs start reaching a runner, the next push or a re-run will show the real status.


Generated by Claude Code

…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
- p256/p384 =0.13 -> =0.14.0 (ecdh feature, ToSec1Point): the hybrid PQ
  KEMs leave crypto-bigint 0.5 (RUSTSEC-2026-0387). Wire bytes and pinned
  vectors unchanged.
- zip 2 -> 9 (feature `zip`): RUSTSEC-2026-0367/0368/0369, and via it
  zstd 0.14.3 / zstd-safe 8.2.0 (RUSTSEC-2026-0391/0398/0403).
  `ZipFile::name` returns a Result now; archive tests adapted.
- Lockfile: tokio 1.54.1 (RUSTSEC-2026-0386), ctutils 0.4.7
  (RUSTSEC-2026-0385), zstd-sys 2.1.2 (RUSTSEC-2026-0410).
- deny.toml: allow the bzip2-1.0.6 licence (libbz2-rs-sys behind zip);
  accept RUSTSEC-2026-0387 for the remaining hpke 0.13 -> p256 0.13 path
  with the reason recorded; CHANGELOG and SECURITY.md document the open
  hpke 0.15 migration.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uh7jkDG5sDvfZRz5J21a2N
Brings in crates/core/src/pq_cascade.rs, the cascade functions of
pq_multi, tests/pq_cascade_kats.rs and the KAT reference model from
claude/enterprise-pqc-comnet-bklgym. Compiles and passes clippy
-D warnings (all features) and the default test lane unchanged.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uh7jkDG5sDvfZRz5J21a2N
… rules, Harwness alignment

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uh7jkDG5sDvfZRz5J21a2N
@mm9942 mm9942 changed the title Green build of the comnet building blocks + contract drafts for keystore/KMS and pyo3 3.2.0 line: comnet building blocks incl. pq_cascade, RustSec dependency updates, contract drafts for keystore/KMS and pyo3 Nov 1, 2026
Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uh7jkDG5sDvfZRz5J21a2N
Same model as Harwness: the push/pull_request triggers stay in the
workflow as comments and can be switched back on. Runs are started on
purpose, after the local lane run, on the pushed revision. Adds the
per-ref concurrency group.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uh7jkDG5sDvfZRz5J21a2N
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.

2 participants