Skip to main content

CODE_JOIN_V2_PREFIX

Constant CODE_JOIN_V2_PREFIX 

Source
pub const CODE_JOIN_V2_PREFIX: &str = "v2-";
Expand description

huddle 2.2 (audit PA-1): the marker a v2 owner prepends to every join code it issues. This is the out-of-band capability anchor that defeats a relay downgrade: the owner hands the joiner the code over a channel the relay does not control (Signal, in person, a QR), so the relay cannot strip this marker the way it can strip a capabilities field from a network announcement. A joiner that sees the marker sends the proof form unconditionally — it never consults the relay-mediated capability for the code-join decision — so the relay can no longer force the cleartext fallback. The marker begins with a lowercase letter, which the join-code alphabet (ABCDEFGHJKMNPQRSTUVWXYZ23456789, uppercase-only) never produces, so a legacy code can never be mistaken for a v2 one. The proof is computed over the FULL code string, marker included.