Iss Unit-1, 2
Iss Unit-1, 2
Iss Unit-1, 2
Encryption algorithms are divided into two categories based on the input type, as a
block cipher and stream cipher. Block cipher is an encryption algorithm that takes
a fixed size of input say b bits and produces a ciphertext of b bits again. If the input
is larger than b bits it can be divided further. For different applications and uses,
there are several modes of operations for a block cipher.
Advantages of CBC –
Disadvantages of CBC –
Advantages of CFB –
Since, there is some data loss due to the use of shift register, thus it is difficult
for applying cryptanalysis.
The drawbacks of CFB are the same as those of CBC mode. Both block losses
and concurrent encryption of several blocks are not supported by the
encryption. Decryption, however, is parallelizable and loss-tolerant.
Output Feedback Mode –
The output feedback mode follows nearly the same process as the Cipher
Feedback mode except that it sends the encrypted output as feedback instead of
the actual cipher which is XOR output. In this output feedback mode, all bits of the
block are sent instead of sending selected s bits. The Output Feedback mode of
block cipher holds great resistance towards bit transmission errors. It also
decreases the dependency or relationship of the cipher on the plaintext.
Advantages of OFB –
In the case of CFB, a single bit error in a block is propagated to all subsequent
blocks. This problem is solved by OFB as it is free from bit errors in the plaintext
block.
Disadvantages of OFB-
Advantages of Counter –
Since there is a different counter value for each block, the direct plaintext and
ciphertext relationship is avoided. This means that the same plain text can map
to different ciphertext.
Disadvantages of Counter-
The fact that CTR mode requires a synchronous counter at both the transmitter
and the receiver is a severe drawback. The recovery of plaintext is erroneous
when synchronisation is lost.
Difference between Block Cipher and Stream Cipher
Block Cipher and Stream Cipher belongs to the symmetric key cipher.
These two block ciphers and stream cipher are the methods used for
converting the plain text into ciphertext.
The main difference between a Block cipher and a Stream cipher is that a
block cipher converts the plain text into cipher text by taking plain text’s block
at a time. While stream cipher Converts the plain text into cipher text by
taking 1 byte of plain text at a time.
The algorithm modes which are The algorithm modes which are
used in block cipher are ECB used in stream cipher are CFB
6.
(Electronic Code Book) and CBC (Cipher Feedback) and OFB
(Cipher Block Chaining). (Output Feedback).
We have mentioned that DES uses a 56-bit key. Actually, The initial key
consists of 64 bits. However, before the DES process even starts, every 8th
bit of the key is discarded to produce a 56-bit key. That is bit positions 8, 16,
24, 32, 40, 48, 56, and 64 are discarded.
Thus, the discarding of every 8th bit of the key produces a 56-bit key from
the original 64-bit key.
DES is based on the two fundamental attributes of cryptography: substitution
(also called confusion) and transposition (also called diffusion). DES consists
of 16 steps, each of which is called a round. Each round performs the steps
of substitution and transposition. Let us now discuss the broad-level steps in
DES.
In the first step, the 64-bit plain text block is handed over to an initial
Permutation (IP) function.
The initial permutation is performed on plain text.
Next, the initial permutation (IP) produces two halves of the permuted
block; saying Left Plain Text (LPT) and Right Plain Text (RPT).
Now each LPT and RPT go through 16 rounds of the encryption process.
In the end, LPT and RPT are rejoined and a Final Permutation (FP) is
performed on the combined block
The result of this process produces 64-bit ciphertext.
Because of
this compression permutation technique, a different subset of key bits is
used in each round. That makes DES not easy to crack.
Step-2: Expansion Permutation:
Recall that after the initial permutation, we had two 32-bit plain text areas
called Left Plain Text(LPT) and Right Plain Text(RPT). During the expansion
permutation, the RPT is expanded from 32 bits to 48 bits. Bits are permuted
as well hence called expansion permutation. This happens as the 32-bit RPT
is divided into 8 blocks, with each block consisting of 4 bits. Then, each 4-bit
block of the previous step is then expanded to a corresponding 6-bit block,
i.e., per 4-bit block, 2 more bits are added.