Attacking Network Protocols by James Forshaw

Attacking Network Protocols by James Forshaw

Author:James Forshaw
Language: eng
Format: epub, mobi, azw3
Publisher: Penguin Random House LLC (Publisher Services)
Published: 2018-01-18T05:00:00+00:00


Figure 7-5: ECB encryption of a bitmap image

Cipher Block Chaining

Another common mode of operation is Cipher Block Chaining (CBC), which is more complex than ECB and avoids its pitfalls. In CBC, the encryption of a single plaintext block depends on the encrypted value of the previous block. The previous encrypted block is XORed with the current plaintext block, and then the encryption algorithm is applied to this combined result. Figure 7-6 shows an example of CBC applied to two blocks.

At the top of Figure 7-6 are the original plaintext blocks. At the bottom is the resulting cipher text generated by applying the block-cipher algorithm as well as the CBC mode algorithm. Before each plaintext block is encrypted, the plaintext is XORed with the previous encrypted block. After the blocks have been XORed together, the encryption algorithm is applied. This ensures that the output cipher text is dependent on the plaintext as well as the previous encrypted blocks.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.