128-bit block ciphers are vulnerable to multi-target attacks where the attacker seeks to attack a collection of keys instead of a single key. A simple example:
- Generate keys $k_1, k_2, ...,k_{2^{40}}$.
- Pick a 128-bit message block $m$ and provide $m$ to the attacker.
- Compute $E(k_1, m), E(k_2, m), ..., E(k_{2^{40}}, m)$ and provide these ciphertexts to the attacker.
- The attacker can compute $E(k, m)$ for various keys $k$ finding a ciphertext that matches one of the ciphertexts provided. This will take $2^{87}$ evaluations of $E$ on average.
I'm interested in what practical impact this has on the CTR mode of operation. Some amount of known or controlled plaintext is clearly required for the attacker to get the block cipher output. More importantly, this attack depends on the block cipher being fed the same plaintext block across many keys.
CTR mode encrypts blocks as $E(k, n \| c) \oplus P$, where $P$ is the plaintext block, $n$ is the nonce and $c$ is the block index. Protocols that generate nonces deterministically would seem to be vulnerable to this attack.
My question: is it possible to adapt this attack to work against protocols that use CTR mode with a random nonce? Does randomizing the nonce successfully protect CTR mode from multi-target attacks?