Cryptography Reference
In-Depth Information
1
P
2
3
4
E
K
C
Sender
Figure 4.11. Encryption using CBC mode
2. Take the first plaintext block P 1 and XOR this to the contents of the top register.
Put the result into the bottom register.
3. Encrypt the contents of the bottom register with the key. The result of this is C 1 ,
our first block of ciphertext.
4. Send C 1 to the receiver, but also replace the contents of the top register
with C 1 .
5. Now repeat from step 2. In other words, add the contents of the top register
(which is now C 1 ) to the next plaintext block P 2 ; place the result in the bottom
register; encrypt the contents of the bottom register with the key to obtain the
next block of ciphertext C 2 ; send C 2 to the receiver and replace the contents
of the top register with C 2 . Continue in this manner until the last plaintext block
has been processed.
It should be clear that CBC mode also introduces message dependency since
each ciphertext block depends on the current plaintext block and the previous
ciphertext block (which itself depends on the previous plaintext block).
DECRYPTION USING CBC MODE
Decryption using CBC mode is illustrated in Figure 4.12, where in this case D
represents the decryption algorithm of the block cipher. The CBC decryption
process is as follows:
1. Put the agreed IV into the top register.
2. Take the first ciphertext block C 1 and decrypt it with the key, placing the result
into the bottom register. The bottom register now contains exactly the same
value as the sender had in their bottom register prior to the first encryption.
3. XOR the contents of the bottom register to the contents of the top register.
The result of this is P 1 , our first block of plaintext.
 
Search WWH ::




Custom Search