February 08, 2016

[Cryptology] CBC(Cipher Block Chaining) mode

□ CBC(Cipher Block Chaining) mode

○ CBC Encryption : En(XOR(P[i], C[i-1]))
- XOR(First plaintext block(P[i]), IV(initialization vector)) → Encryption(XOR Result) → First ciphertext block(C[1])
- XOR(Current plaintext block(P[i]), Previous ciphertext block(C[i-1])) → Encryption(XOR Result) → Ciphertext block(C[i])
○ CBC Decryption : XOR(De(C[i]), C[i-1])
- Decryption(First ciphertext block(C[1])) → XOR(Decryption result, IV(initialization vector)) → First plaintext block(P[1])
- Decryption(Current ciphertext block(C[i])) → XOR(Decryption result, Previous ciphertext block(C[i-1])) → Plaintext block(P[i])
○ Characteristic
- Encryption : If plaintext block(P[i]) is damaged, from now on, all ciphertext blocks(C[i], C[i+1] ...) are damaged
- Decryption : if cipher block(C[i]) is damaged, current plaintext block(P[i]) and next plaintext block(P[i+1]) is damaged

P.S. Symbol information
- En:Encryption / De:Decryption
- C:Cipher text / P:Plain text
- i:Each step(Ex. Current step:i / one Previous step:i-1 / one Next step:i+1)