2. 2
Algorithm types
Stream Cipher
Block Cipher
Confusion
The idea of confusion is to hide the relationship between the
cipher text and the key
Confusion is achieved by means of the substitution techniques.
Diffusion
Diffusion hide the relationship between the cipher text and plain
text.
diffusion is achieved by means of the transposition techniques.
Must know about:
3. 3
Algorithm modes
The algorithm modes defines the details of the
cryptographic algorithm, once the types is
decided.
There are four modes of operation (algorithm
modes) of block cipher have been defined.
It is a technique for enhancing the effect of a
cryptographic algorithm.
4. Block cipher modes
Electronic Code Book(ECB)
Cipher Block Chaining(CBC)
Cipher Feedback(CFB)
Output Feedback(OFB)
Also discuss a variation of the OFB mode,
called as Counter(CTR)
5. 5
Block cipher modes of operation
Algorithm modes
Electronic code
Book(ECB)
Cipher Block
Chaining(CBC)
Cipher feedback
(CFB)
Output Feedback
(OFB)
This two modes work on block
Ciphers.
These two modes work on block
Ciphers acting as stream ciphers
6. 6
Electronic code book (ECB)
Simplest mode of operation.
Plain text message is divided into blocks of 64
bits each.
Each block then encrypted independently of the
other blocks.
For each blocks same key used for encryption.
11. 11
Cipher feedback mode(CFB)
Step-1
Like CBC, a 64 bit initialization vector (IV) is used in
CFB. IV is kept in shift register.
IV first encrypted and produced 64 bit IV cipher text.
IV Encrypt Encrypted IV
KEY
12. 12
Cipher feedback mode(CFB)
Step-2
Now, the leftmost j bits of the encrypted IV are XORed
with the first j bits of the plain text.
This produces the first portion of cipher text (say C) then
transmitted to the receiver.
First j bits of the encrypted IV
XOR
First j bits of the plain text
Cipher text 1 (say C)
13. 13
Cipher feedback mode(CFB)
Step-3
Now, the bits of IV are shifted left by j positions. Thus the
rightmost j positions of the shift register now contain
unpredictable data. These right most j positions are now
filled with C.
Left shift IV by j positions
Move j bits of C into the
rightmost side of IV
IV
IV
C
15. 15
Cipher feedback mode(CFB)
IV IV IV
Encrypt
Plain text/bits
Take just the
Leftmost j bits
XOR
Cipher text
J bits
Encrypt
Plain text/bits
Take just the
Leftmost j bits
XOR
Cipher text
J bits
Encrypt
Plain text/bits
Take just the
Leftmost j bits
XOR
Cipher text
J bits
Key K K
16. 16
Output feedback mode(OFB)
Extremely similar to the CFB.
Only difference is that in the case of OFB, the
output of the IV encryption process is fed into
the next stage of encryption process.
17.
18. 18
Counter Mode(CTR)
Similar to the OFB with one variation.
It uses sequence number called counters as the
input to the algorithm.
After each block is encrypted to fill the register,
the next counter value is used.
Size of counter value is same as plain text block.