Binary: 00110010 00111001 00110000 00110101
  1. Key for first iteration: P1 = P1 XOR Key P1 = 00100100 00111111 01101010 10001000 XOR 00110010 00111001 00110000 00110101 P1 = 00010110 00000110 01011010 10111101
  2. Key for second iteration: P2 = P2 XOR P1 P2 = 10000101 10100011 00001000 11010011 XOR 00010110 00000110 01011010 10111101 P2 = 10010011 10100101 01010010 01101110
  1. The experiment only do one iteration, because the total iteration of the encryption process is 16 rounds, the working principle of the same calculation process until the final result of iteration to 16 obtained, for the first iteration i = 0 i.e.: XL = XL XOR P1 XL = 01001101 01000001 01010101 01000001 XOR
00010110 00000110 01011010 10111101
XL = 01011011 01000111 00001111 11111100
F functions are derived from:
XL is divided into 4 (a, b, c, d) each 8 bits =
a = 01011011
b = 01000111
c = 00001111
d = 11111100
F Function:
F (XL ) = (((S1 .a + S2 .b mod 232) XOR S3, c ) + S4d mod 232) = S1.a + S2.b mod 232
= (11010001 00110001 00001011 10100110. 01011011) + (01001011 01111010 01110000 11101001. 01000111) mod 232
= 00011010 11110111 11111010 10111000 XOR S3.c
= 00011010 11110111 11111010 10111000 XOR (11101001 00111101 01011010 01101000. 00001111)
= 11001111 10100000 01010011 01111110 00011000 + S4.d mod 232
= (11001111 10100000 01010011 01111110 00011000 + (00111010 00111001 11001110 00110111. 11111100) mod 232
= 11001010 00111010 10010010 01000001
F (XL) = 11001010 00111010 10010010 01000001
XR = F (XL) XOR XR
XR = 11001010 00111010 10010010 01000001 XOR 10010001 01111100 00111001 00111100
XR = 01011011 01000110 10101011 01111101
Changing the value of XL and XR:
XL = XR ; XR = XL
XL = 01011011 01000110 10101011 01111101;
XR = 01000011 01010110 00010011 10011111
  1. After doing 16 iterations, it will generate new values XL and XR each 32 bits. Switch back XL and XR. After that XOR the XL and XR: XR = XR XOR P16 and XL = XL XOR P17 XR XOR P16 = 01000011 01010110 00010011 10011111 XOR 10010010 00010110 11010101 11011001 = 11010001 01000000 11000110 01000110 XL XOR P17 = 01011011 01000110 10101011 01111101 XOR 10001001 01111001 11111011 00011011 = 11010010 00111111 01010000 01100110
  2. Then XL and XR are combined so that it becomes 64 bit.
    11010010 00111111 01010000 01100110 11010001 01000000 11000110 01000110
  3. The binary value is converted into ASCII code so as to produce i.e. ciphertext : Ò?PfÑ@ÆF
The result of blowfish Ò?PfÑ@ÆF encryption would be compressed with LZW algorithm, and the process is as follows (character used is ASCII standard character).
Table 3: Lempel Ziv Welch Compression Process