IGE Block Cipher Mode

Infinite Garble Extension (IGE) is a lesser-known block cipher mode. OpenSSL implemented IGE back in 2006 as described in its official paper. I came across IGE because of my analysis of Telegram IM and I'm currently not aware of any other software actually using it in the wild.

IGE can be defined easily by the following formula:

$$ c_i = f_K(m_i \oplus c_{i-1}) \oplus m_{i-1} $$

where \(f_K\) stands for the encrypting function (like AES) with key \(K\)
and \(i\) goes from 1 to \(n\) – the number of plaintext blocks. Since picture is worth a thousand words here goes a diagram as well:
IGE mode

You may notice that for the first output block we need two ini-
tialisation values \(c_0\) and \(m_0\). Both are taken from the IV values described earlier. The original paper described \(m_0\) as a random block and \(c_0\) as its encrypted counterpart. The OpenSSL implementation however, uses a more general implementation where both \(m_0\) and \(c_0\) are provided by the user.