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
|
|
@ -75,6 +75,10 @@ sha2 = "0.10"
|
|||
md-5 = "0.10"
|
||||
rpassword = "7"
|
||||
zeroize = { version = "1", features = ["derive"] }
|
||||
# ML-KEM-768 (FIPS 203). `zeroize` wipes the decapsulation key; `getrandom`
|
||||
# is how 0.3's `generate_keypair` / `encapsulate` reach the OS RNG. This
|
||||
# crate's `rand` 0.8 cannot: ml-kem speaks `rand_core` 0.10.
|
||||
ml-kem = { version = "0.3", features = ["zeroize", "getrandom"] }
|
||||
qrcode = { version = "0.14", default-features = false }
|
||||
cuprated = { git = "https://github.com/Cuprate/cuprate", rev = "4f8fcd1bf468f566fcd89c460d50de4adb6825bf", default-features = false, optional = true }
|
||||
# `cuprated::config::Config` is deserialized, not built field by field: the
|
||||
|
|
|
|||
Loading…
Reference in a new issue