Network Security
Network Security
and Cryptography
Fundamentals
IMAGE ENCRYPTION AND
DECRYPTION USING
BLOWFISH ALGORITHM
It is significantly faster
than DES and provides a number of subkeys: 18
good encryption rate with BlockSize: 64-bits [P-array]
no effective cryptanalysis keySize: 32-bits to number of rounds: 16
technique found to date. It
448-bits variable number of substitution
is one of the first, secure
boxes: 4 [each having
block cyphers not subject size
Blowfish algorthim
Step1: Generation of subkeys
Step2: Initialise Substitution Boxes
Step3: Encryption
Step by step explanation of the algorithm
Step1: Generation of subkeys:
18 subkeys{P[0]…P[17]} are needed in both encryption as well as decryption process and the same
subkeys are used for both the processes.
These 18 subkeys are stored in a P-array with each array element being a 32-bit entry.
It is initialized with the digits of pi.
The hexadecimal representation of each of the subkeys is given by ¡Now each of the subkey is
changed with respect to the input key as:
P[0] = P[0] xor 1st 32-bits of input key
P[1] = P[1] xor 2nd 32-bits of input key………..
P[i] = P[i] xor (i+1)th 32-bits of input key
(roll over to 1st 32-bits depending on the key length)…….
P[17] = P[17] xor 18th 32-bits of input key
(roll over to 1st 32-bits depending on key length)
The resultant P-array holds 18 subkeys that is used during the entire encryption process
Step by step explanation of the algorithm
Step3: Encryption: