Encryption
Techniques:
There are two methods of all types of encryption techniques-
(1) Substitution
(2) Transposition
(1)
Substitution:
A substitution technique is a method in which the
letters of plain text are replaced by other letter or numbers or any symbol.
“If
the plain text is viewed as a sequence of bits then substitution involves
replacing plain text bit patterns into a new bit pattern.”
i.)
Caeser
cipher:
The
Ceaser cipher involves replacing each letter of the alphabet with the letter
standing three places further down the alphabet.
For
ex:
If
a plain text is abcdef then cipher
will be defghi.
Then
algorithm can be expressed as
C = (P+3) Mod 26
Where C is cipher text
And P is plain text
In
generalised manner it can be represent as
C = (P+3) Mod 26
Where K is an arbitrary value. The resultant cipher text is known as Caeser cipher.
(2)
Transposition:
It
is an encryption in which the letters of the message are rearranged.
Transposition methods –
i.
Row wise Transposition
ii.
Column wise Transposition
Major Procedure of transposition
It is the rearrangement of the
plain text.
Here is an example which shows five
column transposition and the rearranged form:-
Methods to create Block cipher –
1.
Electronic
Code Book (ECB) Method:
It
is a simplest block cipher mode in which pain text is handled 64-bit at a time
and each block of plain text is encrypted using the same key.
The
term codebook is used because, for the same given key it generates a unique
cipher text for every 64 bit block of plain text. Therefore we can assume a
large code book which has an entry for every possible 64 bit plain text pattern
with corresponding cipher text.
The ECB method is particularly used
for short amount of data, which means we can use ECB mode to transmit a DES
key. For a lengthy message it may be possible that the cipher text can be
generated but it would not be secure.
2.
Cipher
Block Chaining (CBC) Mode:
This
mode of cipher text is particularly used in DES and AES (Authentication Key
Exchange Standards). For low threat application it is simplest method for
implementation. In block encryption scheme chaining means linking each block to
the precious block’s value.
Process of CBC
It takes a
64-bit block of input for encryption. It generates its own 64-bit random number
and uses the cipher Ci as the next random number for
ri+1
That means
it takes the precious block of cipher text and uses it as the random number
which is X-ORed into plain text and transmits it with along with the data. It
has a initial random number IV(Initial Vector). The IV exactly works as follows
–
A random
chosen IV guarantees that even if the same message is sent repeatedly the
cipher text will be completely different for each time. So it avoids “Chosen
Plain Text Attack”.
3.
Counter
(CTR) Mode:
In this
mode a onetime pad is generated & X-ORed with the data (Onetime pad is a
long random stream to encrypt the message). In this method the IV(Initial
Vector) increments its value and encrypt the result to get successive blocks of
plain text and the padding bits. The main advantage of CTR mode is that the cryptology
can be pre computed and encryption is simply an X-OR and user can encrypt the
message starting at any point rather than being forced to start from the
beginning.
The
application of CTR mode is to encrypt a randomly access file and the key will
be......
4.
Cipher Feedback
Mode (CFB):
It is a
block cipher technique which uses 64-bit block; it is possible to convert DES
into a stream cipher using either CFB mode or OFB mode so when a character
stream is being transmitted each character can be encrypted and transmitted
immediately using a character oriented stream cipher.
For the
encryption the CFB, the input to an encryption function is 64-bit shift
register which is initially set to an initialization vector. The MSB is
initially set to the s bits of the output of the encryption function, are
X-ORed with first pair of plain text i.e. p1 which produce the first unit of
cipher text c1. Then c1 is transmitted and the contents of shift register are
shifted left by its LSB.
5.
Output
Feedback Mode(OFB):
It is
similar to CFB. In this mode the output of the encryption function that is feed
backed to the shift register in OFB.
One
advantage of using OFB mode is that bit errors in transmission do not
propagate.
For Ex: If
a single bit error occurs in c1 only the recovered value of p1 is affected that
means the recovered value of p1 will be transmitted for the next cipher text
c2.
The
Disadvantage of OFB is that it is more vulnerable to a message stream
modification attack compared to CFB and it has the error detecting code inside
which are padded with the plain text.
0 comments:
Post a Comment