0% found this document useful (0 votes)
381 views26 pages

Modes of Encryption and Decryption

This document discusses four modes of encryption and decryption - Electronic Code Book (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), and Output Feedback (OFB). It provides details on how each mode works, its advantages and disadvantages, and compares common encryption algorithms like DES, AES, and Blowfish.

Uploaded by

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

Modes of Encryption and Decryption

This document discusses four modes of encryption and decryption - Electronic Code Book (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), and Output Feedback (OFB). It provides details on how each mode works, its advantages and disadvantages, and compares common encryption algorithms like DES, AES, and Blowfish.

Uploaded by

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

MODES OF ENCRYPTION AND

DECRYPTION

1 ELECTRONIC CODE BOOK (ECB)


Data is divided into 64-bit blocks
Each block is encrypted one at a time.
Separate encryptions with different blocks are totally

independent of each other.

If data is transmitted over a network or phone line,

transmission errors will only affect the block containing


the error.
The blocks can be rearranged, thus scrambling a file

beyond recognition, and this action would go undetected.

ECB

ENCRYPTION

DECRYPTION

ANALYSIS OF ECB
APPLICATION :
This is the mode of operation used by Private Encryptor.
ADVANTAGE :
ECB is the fastest.
Easiest to implement.
Most common mode of DES seen in commercial applications.
DISADVANTAGE :
ECB is the weakest of the various modes because no additional security

measures are implemented besides the basic DES algorithm.

2 CIPHER BLOCK CHAINING (CBC)


In this mode of operation, each block of ECB encrypted ciphertext is XORed with the

next plaintext block to be encrypted.


Making all the blocks dependent on all the previous blocks.
This means that in order to find the plaintext of a particular block, you need to know :

the ciphertext
the key
the ciphertext for the previous block
The first block to be encrypted has no previous ciphertext.
So, the plaintext is XORed with a 64-bit number called the Initialization Vector, or IV

for short.

So if data is transmitted over a network or phone line and


there is a transmission error (adding or deleting bits), the
error will be carried forward to all subsequent blocks.
If the bits are just modified in transit (as is the more
common case) the error will only affect all of the bits in
the changed block, and the corresponding bits in the
following block.

ENCRYPTION

DECRYPTION

ANALYSIS OF CBC
ADVANTAGE :
The error doesn't propagate any further.

DISADVANTAGE :
This mode of operation is more secure than ECB because

the extra XOR step adds one more layer to the encryption
process.

3 CIPHER FEEDBACK (CFB)


In this mode, blocks of plaintext those are less than 64 bits long

can be encrypted.
Normally, special processing has to be used to handle files whose

size is not a perfect multiple of 8 bytes, but this mode removes that
necessity (Private Encryptor handles this case by adding several
dummy bytes to the end of a file before encrypting it).

The plaintext itself is not actually passed through the DES algorithm, but merely XORed
with an output block from it, in the following manner:

A 64-bit block called the Shift Register is used as the input plaintext to
DES.
This is initially set to some arbitrary value, and encrypted with the DES
algorithm.
The ciphertext is then passed through an extra component called the Mbox, which simply selects the left-most M bits of the ciphertext, where M is
the number of bits in the block we wish to encrypt.
This value is XORed with the real plaintext, and the output of that is the
final ciphertext.
Finally, the ciphertext is fed back into the Shift Register, and used as the
plaintext seed for the next block to be encrypted.

ENCRYPTION

DECRYPTION

ANALYSIS OF CFB
ADVANTAGE :
This mode of operation is similar to CBC and is very secure.

DISADVANTAGE :
As with CBC mode, an error in one block affects all subsequent blocks

during data transmission.


It is slower than ECB due to the added complexity.

4 OUTPUT FEEDBACK (OFB)


This is similar to CFB mode, except that the ciphertext output of DES is

fed back into the Shift Register, rather than the actual final ciphertext.
The Shift Register is set to an arbitrary initial value.
It is then passed through the DES algorithm.
The output from DES is passed through the M-box and then fed back into
the Shift Register to prepare for the next block.
This value is then XORed with the real plaintext (which may be less than
64 bits in length, like CFB mode), and the result is the final ciphertext.

ENCRYPTION

DECRYPTION

ANALYSIS OF OFB
ADVANTAGE :
Unlike CFB and CBC, a transmission error in one block will not affect

subsequent blocks because once the recipient has the initial Shift Register value,
it will continue to generate new Shift Register plaintext inputs without any
further data input.
Knowledge of the key is not required.

DISADVANTAGE :
This mode of operation is less secure than CFB mode because only the

real ciphertext and DES ciphertext output is needed to find the plaintext of
the most recent block.

II. BACKGROUND STUDY


A . COMPARED ALGORITHM

DES : (DATA ENCRYPTION STANDARD)


It was the first encryption standard to be published by NIST (National

Institute of Standards and Technology).


It was designed by IBM based on their Lucifer cipher.
DES became a standard in 1974.
DES uses a 56 bit key, and maps 64 bit input block into a 64 bit output
block.
The key actually looks like a 64 bit quantity, but one bit in each of the 8
octets is used for odd parity on each octet.

RELIABILITY OF DES
There are many attacks and methods recorded

till now those exploit the weaknesses of DES,


which made it an insecure block cipher.

AES : (ADVANCED ENCRYPTION STANDARD)

It also known as the Rijndael algorithm, is a

symmetric block cipher that can encrypt data


blocks of 128 bits.
Uses symmetric keys 128, 192, or 256.
AES was introduced to replace the DES.

RELIABILITY OF AES
Brute force attack is the only effective attack

known against this algorithm.

BLOWFISH
Blowfish is a symmetric block cipher that can be effectively used for

encryption and safeguarding of data.


It takes a variable-length key, from 32 bits to 448 bits, making it ideal for
securing data.
Blowfish was designed in 1993 by Bruce Schneier as a :
fast
free alternative to existing encryption algorithms
Blowfish is unpatented and license-free, and is available free for all uses.

RELIABILITY OF BLOWFISH
Though it suffers from weak keys problem, no

attack is known to be successful against it


(Bruce, 1996) (Nadeem, 2005).

You might also like