liveBook · Manning

Signal protocol

As explained in Real-World Cryptography

The Signal protocol is an end-to-end encrypted messaging protocol that combines authenticated key exchange, ratcheted key evolution, and encrypted message transport.

The Signal protocol secures end-to-end messaging even when the recipient is offline. It combines authenticated key exchange, evolving keys, and encrypted message transport while hiding message contents from the service carrying them. section 10.4.2 section 10.6

Its conversation setup uses several coordinated pieces:

  • Trust on first use lets users establish a channel without a prior web of trust, then check whether the initial exchange was intercepted. section 10.4
  • X3DH combines multiple Diffie–Hellman exchanges so one user can initiate a forward-secure conversation while the other is offline. section 10.4.2
  • Identity keys represent users; one-time prekeys add single-use protection, and signed prekeys provide a fallback that must be rotated periodically. section 10.4.2
  • A central service distributes public key material and transports messages, but the protocol itself is an open standard used by multiple applications. section 10.4

Starting a conversation with an offline contact

Alice retrieves Bob’s prekey bundle, containing his identity key, signed prekey, and possibly a one-time prekey. She performs the X3DH exchanges, feeds their combined outputs into a key-derivation function, and sends an initial encrypted message. Bob uses the received information to initialize and continue the conversation. section 10.4.2

Figure 10.10 Signal’s flow starts with a user registering with a number of public keys. If Alice wants to talk to Bob, she first retrieves Bob’s public keys (called a prekey bundle), then she performs an X3DH key exchange with these keys and creates an initial message using the output of the key exchange. After receipt of the message, Bob can perform the same on his side to initialize and continue the conversation.

Trace registration, prekey retrieval, X3DH initialization, and conversation continuation in one visual flow. section 10.4.2

The design is practical rather than magical: trust-on-first-use leaves an initial verification risk, group messaging involves tradeoffs between server knowledge and client workload, and implementing a secure application requires careful integration. section 10.4 section 10.5

How Real-World Cryptography covers it

How deep it goes
Explains TOFU, X3DH, key roles, prekey handling, and message initialization, but defers complete implementation details.
Examples
Uses Alice and Bob’s prekey-bundle exchange, Signal Messenger, WhatsApp, and contrasting group-message fanout strategies.
What it assumes
Assumes basic public-key cryptography and Diffie–Hellman familiarity while introducing prekeys, X3DH, and TOFU.
What you can do after
Evaluate secure messaging designs by comparing asynchronous setup, key lifecycles, trust assumptions, and group-message tradeoffs.
How it connects
Connects end-to-end encryption with Diffie–Hellman key exchange, forward secrecy, trust on first use, PGP, and federated messaging.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.