fix(crypto): authenticate braid vault, signature and RWP2 paths - #2859
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Layer 11 Coherence Gate
SCBE-AETHERMOORE Governance Layer |
Contributor
Layer 11 Coherence Gate
SCBE-AETHERMOORE Governance Layer |
Contributor
Layer 11 Coherence Gate
SCBE-AETHERMOORE Governance Layer |
issdandavis
disabled auto-merge
September 19, 2026 01:02
issdandavis
enabled auto-merge (squash)
September 19, 2026 01:08
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.
Legacy signature verification accepted fabricated marker bytes and could ignore a backend's false verdict. The custom braid vault returned unauthenticated XOR plaintext, and connected RWP2/Aethercode authentication paths used public demo keys or always-true verification. This change requires actual message/key verification and authenticated vault entries while retaining the existing experimental master derivation.
Both shipped signing/SS1 copies are covered. Unsupported signed/hybrid requests in the legacy SS1 format now reject instead of dropping security fields. Vault rotation validates and stages every entry before updating state; original expiry survives rotation. Old unauthenticated entries require an explicit, separately reviewed recovery procedure; there is no automatic downgrade or deletion.
RWP2 now requires explicitly provisioned keys, authenticates canonical typed fields including tier/key ID/version, separates tongue MAC domains, and enforces each tier's minimum signers. Its process-local replay cache authenticates first, records atomically, and rejects capacity overflow instead of evicting live receipts. Aethercode uses a real HMAC and verifies a message plus tag; ordinary non-signing interpretation still works without keys. Old delimiter-based tags and public demo keys are deliberately rejected; peers must be updated together.
Validation: 102 focused security/vault tests, 416 compatibility/tri-bundle/core-runner tests and 39 RWP2/caller/full-system checks passed (one pre-existing large-allocation test is skipped). Before repair, initial regressions exposed the signing/vault defects and a separate baseline reproduced eight RWP2/Aethercode authentication failures. Ruff, Black and diff checks pass. CI includes the new regressions and real ML-DSA-65 tests through both signature adapters, including wrong key/message, truncation and the old fake prefix. The native CI dependency was corrected after an initial missing-cryptography setup failure; the final native run must pass before merging.
The review document separates custom composition, fingerprints, reversible indexing and geometry from authentication. Remaining limits include custom-derivation cryptanalysis, operator key custody, shared durable replay state, and the distinction between a signed trace and proof of correct execution. No new cryptographic hardness, quantum security, FIPS validation or NIST certification is claimed. Reverting this repair reintroduces authentication defects and is not a safe downgrade path.