Skip to main content

accept_offer

Function accept_offer 

Source
pub fn accept_offer(
    identity: &Identity,
    bundle: &PreKeyBundle,
    rng: &mut impl RandomSource,
) -> Result<(HandshakeResponse, Ratchet), Error>
Expand description

The responder’s reaction to an inbound init: verify the bundle’s self-signature, derive the X3DH secret, and open a sending-only ratchet whose first message (boot) proves it derived the same secret the initiator will.

The signature check happens before anything else in this function touches the bundle’s keys, so there is no path from an unverified bundle to a live ratchet or a pinned fingerprint.