Consider the following protocol, meant to authenticate $A$ (Alice) to $B$ (Bob) and vice versa.
$$ \begin{align*} A \to B: &\quad \text{“I'm Alice”}, R_A \\ B \to A: &\quad E(R_A, K) \\ A \to B: &\quad E(\langle R_A+1, P_A\rangle, K) \\ \end{align*} $$
- $R$ is a random nonce.
- $K$ is a pre-shared symmetric key.
- $P$ is some payload.
- $E(m, K)$ means $m$ encrypted with $K$.
- $\langle m_1, m_2\rangle$ means $m_1$ assembled with $m_2$ in a way that can be decoded unambiguously.
- We assume that the cryptographic algorithms are secure and implemented correctly.
An attacker (Trudy) wants to convince Bob to accept her payload $P_T$ as coming from Alice (in lieu of $P_A$). Can Trudy thus impersonate Alice? How?
This is slightly modified from exercise 9.6 in Information Security: Principles and Practice by Mark Stamp. In the book version, there is no $P_A$, the last message is just $E(R_A+1,K)$, and the requirement is for Trudy to “convince Bob that she is Alice”. Mark Stamp asks us to find two attacks, and the two I found allow Trudy to forge $E(R+1,K)$ but not $E(\langle R, P_T\rangle, K)$.