Invitation to Cybersecurity

INVITATION TO CYBERSECURITY 164 and black bits and they all produce the same shade of ciphertext bits that preserve the underlying image. Figure 7.9 A treasure map encrypted with a block cipher with no block chaining. To fix this weakness block ciphers use a technique called block chaining. Block chaining incorporates the previous block into the encryption of each subsequent block. Because there is no previous block for P1, block ciphers employ an initialization vector (IV). IVs are like nonces. The IV is randomly generated by the sending party and sent in the clear along with the ciphertext blocks—it is not a secret value. When using block chaining, even if the same key is used to encrypt the same plaintext, as long as the IV’s are different, all the resulting ciphertext blocks will be different. This is because the IV is mixed into the encryption of P1, and P1 is mixed into the encryption of P2, and P2 is mixed into the encryption of P3, etc. In this way, the IV permeates all the way through and impacts all of the subsequent blocks from P1 to Pn. Figure 7.10 shows the same Figure 7.9 image encrypted with the same algorithm and key, but this time block chaining is used with an IV, and now the treasure is clearly safe from prying eyes! Figure 7.10 A treasure map encrypted with a block cipher using block chaining.

RkJQdWJsaXNoZXIy MTM4ODY=