Introduction
Basically, cryptographic algorithm is used for transformation of plaintext into cipher text. There are basically two methods on which cryptographic algorithm is work.
Stream Cipher
In stream
cipher keys and algorithms are applied to each binary digit in a data stream,
one bit at a time, rather than encrypting block of data. One time pad cipher is
the best example of stream cipher. Cipher feedback mode is converting block
cipher into stream cipher.
Figure: Process of Stream Cipher |
A stream
cipher operates on plaintext accepting only one bit at a time. Stream cipher in
which each bit of plain text message XOR with each bit of key to obtain cipher
text message.
Figure: Example of Stream Cipher |
There is
a key stream generator which outputs a stream of bits: k1, k2, k3,...ki and
XORed with a stream of plaintext bits p1, p2,...,pi to produce the stream of
cipher text bits.
Ci = Pi ⊕
Ki
During
decryption, the cipher text bits are XORed with a same key stream to recover
the plain text bits.
Pi = Ci ⊕
Ki
If the
key stream output is random that, it will take harder for a cryptanalyst to
break it.
Advantage
High
Speed transformation
Low error
propagation
Disadvantage
Low
diffusion
Less secure
Block Cipher
In Block cipher, plain text message divide into fixed size blocks and encrypt each block with some fixed size of key. Divide each plain text message into block of 64, 128, 256 bits and apply key size 40, 56, 64, 80, 128, 168, 192 and 256 bits which generates cipher text block same as size of plain text block. Data Encryption Standard (DES) is the best example of block cipher in which each block of 64-bit gets encrypted using 56-key bit and cipher text of 64-bit get generated.
Figure: Block diagram of block Cipher |
A receiver
side decrypt message with same key to generate plain text. Block cipher also
uses the concept of key generator. Block cipher are used chaining mode, this is
because for repeating text pattern, the same cipher block will be generated
which can give clue to cryptanalyst regarding what is the original plain text. As
a chaining mode, previous block is mixed with current block to avoid repeats in
patterns. It is more secure.
Advantage
High
Diffusion
More
secure
Disadvantage
Encryption
process is slow
Error propagation
Difference between Block Cipher
and Stream cipher
No comments:
Post a Comment