Progress pill
Symmetric Cryptography

Secure communication sessions

Modern Cryptography Fundamentals

Secure communication sessions

Suppose that two parties are in a communication session, so they send multiple messages back and forth.
An authenticated encryption scheme allows a recipient of a message to verify that it was created by her partner in the communication session (as long as the private key has not leaked). This works well enough for a single message. Typically, however, two parties are sending messages back and forth in a communication session. And in that setting, a plain authenticated encryption scheme as described in the previous section falls short in providing security.
The main reason is that an authenticated encryption scheme does not provide any guarantees that the message was actually also sent by the agent who created it within a communication session. Consider the following three attack vectors:
  1. Replay attack: An attacker re-sends a ciphertext and a tag that she intercepted between two parties at an earlier point.
  2. Re-ordering attack: An attacker intercepts two messages at different times and sends them to the recipient in the reverse order.
  3. Reflection attack: An attacker observes a message sent from A to B, and also sends that message to A.
Though the attacker has no knowledge of the ciphertext and cannot create spoofed ciphertexts, the attacks above can still cause significant damage in communications.
Suppose, for instance, that a particular message between the two parties involves the transfer of financial funds. A replay attack might transfer the funds a second time. A vanilla authenticated encryption scheme has no defense against such attacks.
Fortunately, these kinds of attacks can be easily mitigated in a communication session using identifiers and relative time indicators.
Identifiers can be added to the plaintext message before encryption. This would bar any reflection attacks. A relative time indicator can, for example, be a sequence number in a particular communication session. Each party adds a sequence number to a message before encryption, so the recipient knows in what order the messages were sent. This eliminates the possibility of re-ordering attacks. It also eliminates replay attacks. Any message an attacker sends down the line will have an old sequence number, and the recipient will know not to process the message again.
To illustrate how secure communication sessions work, suppose again Alice and Bob. They send a total of four messages back and forth. You can see how an authenticated encryption scheme with identifiers and sequence numbers would work below in Figure 11.
The communication session starts with Bob sending a ciphertext to Alice with a message tag . The ciphertext contains the message, as well as an identifier (BOB) and a sequence number (0). The tag is made over the entire ciphertext. In their subsequent communications, Alice and Bob maintain this protocol, updating fields as necessary.
Figure 12: A secure communication session
Quiz
Quiz1/5
What type of attack can a sequence number prevent in a secure communication session?