Commit Graph
7 Commits
Author SHA1 Message Date
LeoVasanko 2f8cafaa6d Flip burn policy: remove _Burn, burn on any non-WireError failure
The burn decision now lives solely in the Session dispatch: chab3's
WireError (unauthentic or truncated box) proves no key knowledge and
burns nothing; any other ValueError/struct.error means a peer who
opened the box misbehaved, so the credential burns. handshake.py drops
its try/except wrappers and the _check helper; inner-box WireErrors
are reclassified to plain ValueError since they occur inside an
already valid outer box.
2026-10-07 19:59:56 +00:00
LeoVasanko 326af72a25 Refine chab3 exception types: add WireError(ValueError) for too short or invalid ciphertext, reserving TypeError for caller errors (wrong key/nonce sizes, too small into buffer, non-buffer types). 2026-10-07 19:59:23 +00:00
LeoVasanko 0e1190ffad Cleaner msg struct naming. 2026-10-07 18:40:43 +00:00
LeoVasanko 10b64cbf52 Consistent capitalization in comments 2026-10-07 18:25:40 +00:00
LeoVasanko f035859fd2 Split hybrid public keys into separate wire fields
The packed 1216-byte hybrid public had no consumer that wanted it
whole -- everything unpacked immediately. Message layouts and the
credential record now carry peer_m | peer_x as explicit fields; _PUB
and the unpack-at-use idiom are gone. credential_id values change with
the record layout. Step comments in the exchange methods explain what
each solve/challenge proves.
2026-10-07 17:59:13 +00:00
LeoVasanko 168287ca98 One x25519 ephemeral per party per connection
Each exchange party ships a single x25519 ephemeral public (e_alice in
msg1, e_bob in msg2) and every x25519 leg is a plain DH against those
shipped keys; ML-KEM legs ship as bare ciphertexts. Encapsulation is
split into explicit ML-KEM + DH steps at the call sites, key objects
are kept as members (statics derived once from the persisted idroot,
ephemerals generated directly), and all fixed-width wire layouts are
full-message structs. Also: role-suffixed key naming throughout, dead
struct/layout cleanup.
2026-10-07 04:35:31 +00:00
LeoVasanko 03a7758fa6 Initial commit 2026-10-07 03:07:34 +00:00