Skip to content

🌊 Wave-20: handshake fingerprint + concurrent Add/Remove#724

Merged
gHashTag merged 1 commit into
mainfrom
feat/trios-chat-wave20
May 11, 2026
Merged

🌊 Wave-20: handshake fingerprint + concurrent Add/Remove#724
gHashTag merged 1 commit into
mainfrom
feat/trios-chat-wave20

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Closes #723

🌊 Trinity Chat β€” Wave-20

Two new threat-model lanes shipped per the W19 ROADMAP forward plan:

  • Lane A β€” L-CHAT-1-handshake (CR-CHAT-01) β€” handshake_fingerprint.rs
    (343 lines). HandshakeFingerprint::compute(initiator_lt, responder_lt, initiator_pre, responder_pre, kem_ciphertext, suite_and_version) -> Result<Self, HandshakeError>,
    HSF_LEN = 32, HSF_DOMAIN = b"trios-chat-handshake-fingerprint-v1\0",
    constant-time eq_ct via subtle::ConstantTimeEq, length-prefixed
    absorb_tagged per-field domain separator. 10 tests HSF-01..10
    (responder-swap, role-flip, suite-downgrade, truncation, length-shift,
    empty-field rejection, determinism, CT single-bit flip, length const, green).

  • Lane B β€” L-CHAT-3-add (CR-CHAT-03) β€” concurrent_add_remove.rs
    (419 lines). apply_concurrent(base_members, proposals) with
    deterministic priorities PRI_UPDATE = 0 < PRI_REMOVE = 1 < PRI_ADD = 2,
    ties broken by (priority, hash_id, sort_key). Errors
    RemoveNonMember | AddExisting | UpdateNonMember | DuplicateSortKey.
    10 tests CAR-01..10 (add-after-remove ghost, remove-after-add
    resurrection, dup-add, dup-remove, self-remove+update, empty-set,
    order-independence, tie-break, dup sort-key, green).

Coq Wave-20

Section TrinityChatWave20 adds INV-CHAT-110..116 plus 2 helper
lemmas (all_nonzero_valid_20, update_before_add_20). All proofs
constructive over PropClass20::{PUpdate20, PRemove20, PAdd20},
records TranscriptLens20 and Delta20, with variable
hsf_of_20 : nat -> nat -> nat -> nat -> nat -> nat -> nat.

10 new Qed. β†’ 158 Qed. total, 0 Admitted., 0 new axioms
(cumulative 5 axioms unchanged: ss_kp_injective, dh_step_fresh,
dh_post_history_independent, hybrid_kem_non_degenerate, sn_hash_sym).

Falsifier 1800 β†’ 1900

+50 handshake_fingerprint (PI-HSF-001..050) + +50 concurrent_add_remove
(PI-CAR-001..050). 38 attack categories all at 100 %, G-C10 thresholds
met for every category (β‰₯95 % non-direct, β‰₯90 % direct). DENY_PATTERNS
in CR-CHAT-06/src/injection.rs extended with ~360 W20 keywords.

Anchor extended

φ² + φ⁻² = 3 Β· TRINITY Β· CHAT Β· … Β· KEM-DECAP-ORACLE Β· TAG-STRIPPING
 Β· HANDSHAKE-FINGERPRINT Β· CONCURRENT-ADD-REMOVE

Verified [VERIFIED]

Gate Result
cargo test (12 chat crates + harness) 310 / 0 βœ“
cargo run -q -p trios-chat --bin e2e_chat_25 25 / 25 pass βœ“
cargo run -q -p trios-chat --bin falsifier_runner 1900 / 1900, 38 cats @ 100 % βœ“
cargo clippy --all-targets -- -D warnings clean βœ“
coqc crates/trios-chat/proofs/chat/Trinity_Chat.v silent, exit 0 βœ“
grep -cE "Qed\." Trinity_Chat.v 158 βœ“
grep -cE "^\s*Admitted\." Trinity_Chat.v 0 βœ“
New axioms vs W19 0 βœ“

Compliance

  • L-ARCH-001 preserved β€” all new code under crates/trios-chat/rings/CR-CHAT-NN/.
  • L1 β€” 0 .sh files anywhere in crates/trios-chat/.
  • L2 β€” PR body opens with bare Closes #723.
  • R3 β€” 0 unsafe, clippy -D warnings clean, coqc silent.
  • R5 β€” all claims tagged; counts above are [VERIFIED].
  • SeaORM only β€” no other ORM introduced; no monoliths.

ROADMAP.md updated: status β†’ 310 tests Β· 25/25 e2e Β· 1900/1900 falsifier Β· 38 categories Β· 158 Coq Qed / 0 Admitted. W20 row promoted (bold),
W19 demoted. Wave-20 detail section added before Wave-19.
ASPIRATIONAL window slides to W21..W25.

Branched from d601a58 (post-W19 main HEAD); commit on this branch tip
is 8116c0b.

…move

Lane A β€” L-CHAT-1-handshake (CR-CHAT-01): handshake_fingerprint.rs (343 lines)
  + 10 tests HSF-01..10 (responder-swap, role-flip, suite-downgrade,
  truncation, length-shift, empty-field, determinism, CT flip, len const, green).

Lane B β€” L-CHAT-3-add (CR-CHAT-03): concurrent_add_remove.rs (419 lines)
  + 10 tests CAR-01..10 (add-after-remove ghost, remove-after-add
  resurrection, dup-add, dup-remove, self-remove+update, empty-set,
  order-independence, tie-break, dup sort-key, green).

Coq Wave-20: Section TrinityChatWave20 with INV-CHAT-110..116 + 2 helpers
  β†’ 158 Qed total / 0 Admitted / 0 new axioms (5 cumulative unchanged).

Falsifier 1800 β†’ 1900: +50 handshake_fingerprint + +50 concurrent_add_remove,
  38 categories all at 100%.

DENY_PATTERNS in CR-CHAT-06/src/injection.rs extended with ~360 W20 keywords.

ROADMAP.md updated: status β†’ 310 tests Β· 25/25 e2e Β· 1900/1900 falsifier Β· 38 cats
  Β· 158 Coq Qed. W20 row promoted (bold), W19 demoted. Wave-20 detail section
  added before Wave-19. ASPIRATIONAL window slides to W21..W25.

Verified [VERIFIED]:
- cargo test          β†’ 310 / 0
- e2e_chat_25         β†’ 25 / 25 pass
- falsifier_runner    β†’ 1900 / 1900, 38 cats @ 100%
- cargo clippy        β†’ clean
- coqc Trinity_Chat.v β†’ silent exit 0; grep -cE 'Qed\.' β†’ 158; Admitted β†’ 0

R5: 0 unsafe Β· 0 monoliths Β· 0 .sh Β· 0 new axioms Β· L-ARCH-001 preserved.
@gHashTag gHashTag merged commit e556075 into main May 11, 2026
13 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.

🌊 Wave-20 sub-tracker β€” handshake fingerprint + concurrent Add/Remove

1 participant