transport: ML-KEM-768 hybrid prelude and onionwire:v2 invites
Adds an ML-KEM-768 install key beside the ed25519 identity and x25519 prekey. A friend added from a v2 invite always gets a version-2 PQ prelude before Noise msg 1, and both sides bind (ct, ss_kem) into the Noise prologue (onionwire-v2 \0 ct \0 ss_kem). The row decides: a kem_pk friend without a prelude is rejected with 'prelude required', a prelude for a classical row with 'unexpected prelude'. Invites are now onionwire:v2 with kem=<base64url pk>; decode still accepts v1 (no kem) and yields a classical friend. F8 rotates the KEM key with the prekey and hard-cuts stored ratchet state. The TUI labels a legacy friend 'classical'. Docs: PROTOCOL (keys, framing, prologues, no-downgrade, invite v2), THREAT_MODEL (what PQ transport does and does not buy; epoch 0 stays classical), README (invite size, F8, legacy caveat). SDK exposes pq on InviteInfo/FriendInfo and gains a v2 decode round-trip test.
This commit is contained in:
parent
00bb95675f
commit
c741b660e4
26 changed files with 1637 additions and 177 deletions
|
|
@ -74,6 +74,7 @@ impl Deliverer for Wire {
|
|||
pinned_id: &'a [u8],
|
||||
_prekey: &'a [u8],
|
||||
payload: &'a [u8],
|
||||
_remote_kem: Option<&'a [u8]>,
|
||||
) -> BoxFut<'a, Result<(), String>> {
|
||||
if self.fail_next.load(Ordering::SeqCst) > 0 {
|
||||
self.fail_next.fetch_sub(1, Ordering::SeqCst);
|
||||
|
|
|
|||
Loading…
Reference in a new issue