Skip to main content

quant_address

Function quant_address 

Source
pub fn quant_address(
    classical_hex: String,
    dilithium_hex: String,
) -> Result<String, MlsError>
Expand description

What add_members hands back: the Commit to fan out to EXISTING members, and the Welcome to send to the NEW members (both already MLS-encrypted). Anti-equivocation: recompute the public “quant address” from a peer’s classical (secp256k1) + Dilithium public keys, EXACTLY as the server computes it, so a client can check resolved keys against an address it got out of band: raw = BLAKE3(classical || dilithium); checksum = BLAKE3(raw)[:4]; address = “quant” + base58(raw || checksum).

The client uses this to verify, with ZERO trust in any server, that the keys a (possibly malicious) peer-home-server returned actually hash to the address the user obtained out-of-band. A mismatch ⇒ the server tried to substitute keys ⇒ reject. Inputs are hex (as the server returns them).