[go: up one dir, main page]

0% found this document useful (0 votes)
19 views13 pages

Block Cipher Modes 2

Uploaded by

finooshasv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views13 pages

Block Cipher Modes 2

Uploaded by

finooshasv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Block Cipher modes

Alice Joseph
Block Cipher modes
•Five types of operations in block cipher modes
• ECB (Electronic Code Block) mode : transmitting a single value insecure manner
• CBC (Cipher Block Chaining) mode : for encrypting blocks of text
authentication
• CFB (Cipher Feedback) mode : transmitting an encrypted stream of data
authentication
• OFB (Output Feedback) mode : transmitting an encrypted stream of data
• CTR (Counter) mode : for transmitting block-oriented applications
•ECB and CBC mode works on block ciphers
•CFB and OFB mode works on block ciphers acting as stream
ciphers.
Electronic Code Block (ECB) mode

•Sender Side:
• The plain text is divided into a block where each block is 64 bits.
• Then each block is encrypted separately.
• The same key is used for the encryption of all blocks.
• Each block is encrypted using the key and makes the block of
ciphertext.
•Receiver side:
• The data is divided into a block, each of 64 bits.
• The same key which is used for encryption is used for decryption.
• It takes the 64-bit ciphertext and, by using the key convert the
ciphertext into plain text.
Electronic Code Block (ECB) mode
Cipher Block Chaining(CBC) mode
• Sender Side:
• The plain text is divided into blocks.
• IV(Initialization Vector) is used, which can be a random block of text.
• IV is used to make the ciphertext of each block unique.
• The first block of plain text and IV is combined using the XOR operation
• Then encrypted the resultant message using the key and form the first
block of ciphertext.
• The first block of ciphertext is used as IV for the second block of plain
text.
• The same procedure will be followed for all blocks of plain text.
Cipher Block Chaining(CBC) mode
• Receiver side:
• The ciphertext is divided into blocks.
• The first block ciphertext is decrypted using the same key, which is
used for encryption.
• The decrypted result will be XOR with the IV and form the first
block of plain text.
• The second block of ciphertext is also decrypted using the same key
• The result of the decryption will be XOR with the first block of
ciphertext and form the second block of plain text.
• The same procedure is used for all the blocks.
Cipher Block Chaining(CBC) mode
Cipher Feedback Mode(CFB Mode)
• The data is encrypted in the form of units where each unit is of 8 bits.
• Like cipher block chaining mode, IV is initialized. The IV is kept in the
shift register. It is encrypted using the key and form the ciphertext.
• Now the leftmost j bits of the encrypted IV is XOR with the plain text’s
first j bits. This process will form the first part of the ciphertext, and
this ciphertext will be transmitted to the receiver.
• Now the bits of IV is shifted left by j bit. Therefore, the rightmost j
position of the shift register now has unpredictable data. These
rightmost j positions are now filed with the ciphertext. The process will
be repeated for all plain text units.
Cipher Feedback Mode(CFB Mode)
Output Feedback Mode (OFM Mode)

• OFB mode is similar to CBC mode; the only difference is in CBC, the ciphertext
is used for the next stage of the encryption process, whereas in OFB, the output of
the IV encryption is used for the next stage of the encryption process.

• The IV is encrypted using the key and form encrypted IV. Plain text and leftmost
8 bits of encrypted IV are combined using XOR and produce the ciphertext.

• For the next stage, the ciphertext, which is the form in the previous stage, is used
as an IV for the next iteration. The same procedure is followed for all blocks.
Output Feedback Mode (OFM Mode)
Counter (CTR) mode
• Encryption:
• Uses the sequence of numbers as an input for the algorithm. When the block is
encrypted, to fill the next register next counter value is used. The counter value will be
incremented by 1.
• For encryption, the first counter is encrypted using a key, and then the plain text is
XOR with the encrypted result to form the ciphertext.
• The counter will be incremented by 1 for the next stage, and the same procedure will
be followed for all blocks.

• Decryption:
• The same sequence will be used. To convert ciphertext into plain text, each ciphertext
is XOR with the encrypted counter.
• For the next stage, the counter will be incremented by the same will be repeated for all
Ciphertext blocks.
Counter (CTR) mode

You might also like