Download presentation
Presentation is loading. Please wait.
1
CS470, A.SelcukModes of Operation1 Encrypting with Block Ciphers CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk
2
CS470, A.SelcukModes of Operation2 How to Encrypt with a Block Cipher? Electronic Codebook (ECB) Mode: The naive way. The plaintext is divided into blocks P i, each block is encrypted independently: C i = E(P i ) P i = D(C i ) Problem: Leaks information about identical blocks
3
CS470, A.SelcukModes of Operation3 An Illustration – The Plaintext
4
CS470, A.SelcukModes of Operation4 An Illustration – ECB Encrypted
5
CS470, A.SelcukModes of Operation5 Cipher Block Chaining (CBC) Add randomization to the plaintext by mixing with the previous ciphertext: C i = E(P i C i-1 ) P i = D(C i ) C i-1 Initialization Vector (IV): used instead of C 0 when encrypting/decrypting the first block. (not a secret) Most common mode in practice Features: –Error propagation: 1 wrong bit corrupts 1 block + 1 bit –Allows random access to the ciphertext –Decryption is parallelizable
6
CS470, A.SelcukModes of Operation6 An Illustration – CBC Encrypted
7
CS470, A.SelcukModes of Operation7 Output Feedback (OFB) Mode Block cipher is used as the PRNG in a stream cipher. A key stream is generated from the output: O i = E(O i-1 ) C i = P i O i P i = C i O i IV used for O 0 Features: –Error propagation minimal (bit for bit) –Preprocessing possible (may be good for multimedia) –Doesn’t allow random access; not parallelizable
8
CS470, A.SelcukModes of Operation8 Cipher Feedback (CFB) Mode A key stream is generated from the ciphertext: O i = E(C i-1 ) C i = P i O i P i = C i O i IV used for C 0 Features: –Error propagation: 1 bit + 1 block –Allows random access –Decryption is parallelizable
9
CS470, A.SelcukModes of Operation9 Counter (CTR) Mode A key stream is generated by encrypting a counter: C i = P i E(IV + i) P i = C i E(IV + i) Features: –Error propagation minimal (bit for bit) –Preprocessing possible –Allows random access –Both encryption and decryption are parallelizable
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.