Professional Documents
Culture Documents
Modes of Operation
Dr. N.Gopika rani
CSE Department
S.NO Block Cipher Stream Cipher
Block Cipher Converts the plain text into cipher text by Stream Cipher Converts the plain text into cipher text by
1.
taking plain text’s block at a time. taking 1 byte of plain text at a time.
2. Block cipher uses either 64 bits or more than 64 bits. While stream cipher uses 8 bits.
3. The complexity of block cipher is simple. While stream cipher is more complex.
4. Block cipher Uses confusion as well as diffusion. While stream cipher uses only confusion.
5. In block cipher, reverse encrypted text is hard. While in-stream cipher, reverse encrypted text is easy.
8. Block cipher is slow as compared to a stream cipher. While stream cipher is fast in comparison to block cipher.
Difference Between Confusion and Diffusion
Confusion Diffusion
Confusion obscures the relationship between Diffusion spreads the plaintext statistics through
the plaintext and ciphertext. the ciphertext.
A one-time pad relies entirely on confusion
while a simple substitution cipher is another A double transposition is the classic example of a
(weak) example of a confusion-only diffusion-only cryptosystem.
cryptosystem.
Confusion hides the relation between the Diffusion hides the relation between the
ciphertext and key. ciphertext and the plaintext.
Weakness:
Repetitive information contained in the plaintext may show in
the ciphertext, if aligned with blocks.
If the same message is encrypted (with the same key) and sent
twice, their ciphertext are the same.
Typical application:
secure transmission of short pieces of information (e.g. a
temporary encryption key)
10
Cipher Block Chaining (CBC)
Solve security deficiencies in ECB
Repeated same plaintext block result different ciphertext
block
13
Cipher FeedBack (CFB)
Use Initial Vector to start process
Encrypt previous ciphertext , then combined with the plaintext block
using X-OR to produce the current ciphertext
15
CFB Encryption/Decryption
CFB as a Stream Cipher
Cipher Feedback
Output Feedback
OFB Scheme
OFB Encryption and Decryption
OFB as a Stream Cipher
In OFB mode, encipherment and decipherment use the encryption function
of the underlying block cipher.
Remarks on OFB
Each bit in the ciphertext is independent of the previous bit or
bits. This avoids error propagation
Security issue
when jth plaintext is known, the jth output of the forward cipher
function will be known
Easily cover jth plaintext block of other message with the same IV
Relation
Ci = Pi XOR Oi
Oi = EK (i)
Strengths:
Needs only the encryption algorithm
Random access to encrypted data blocks
blocks can be processed (encrypted or decrypted) in parallel
Simple; fast encryption/decryption
Counter must be
Must be unknown and unpredictable
pseudo-randomness in the key stream is a goal
27
Remark on each mode
Basically two types:
block cipher
stream cipher
28
CBC and CTR comparison
CBC CTR
Padding needed No padding
Nonce reuse leaks some information Nonce reuse will leak information
about initial plaintext block about the entire message
29
Comparison of Different Modes
Comparison of Modes
Mode Description Application
31
Comparison of Modes
Mode Description Application
32