Expand description
Peer capability bits (huddle 2.2 / M-C4).
A peer advertises which new wire forms it understands so a sender can
retire a legacy/cleartext form only once the other end is known-capable —
the additive way to make an otherwise non-additive wire change. Caps ride in
the signed MemberAnnounce (per-member, in-room) and in RoomAnnouncement
(the announcer’s caps, learned at discovery time). Because the carrying
MemberAnnounce is signed end-to-end, a relay can’t forge or strip caps
without breaking the signature.
Encoded as a u32 bitset. Unknown/absent → 0 (a legacy peer), so a missing
field decodes to “supports nothing new” and every gate below stays false.
New bits are append-only; never renumber an existing bit.
Constants§
- CODE_
JOIN_ V2 - Code-join v2 (audit PA-1): the peer sends an Argon2 proof of knowledge of the join code bound to its ephemeral X25519 key + room id, instead of the cleartext bearer code. A v2 joiner omits the cleartext code entirely, so a malicious relay can no longer read it and rebind it to a forged ephemeral.
- FILE_
META_ PRIVATE - Private file metadata (audit FILES-2): the peer accepts a keyed-MAC content
commitment (
EncryptedFileMeta.content_mac_b64) in place of the plaintextcontent_hash = SHA256(plaintext), so the relay no longer sees a plaintext-confirmation oracle for attachments. - OURS
- Everything THIS build implements — advertised in our announces.
Functions§
- supports
- True iff
capsadvertisesbit.