Blowfish Cipher Algorithm

This section describes the Blowfish cipher algorithm - A 16-round Feistel cipher with block size of 64 bits developed by Bruce Schneier in 1993.

Blowfish - A 16-round Feistel cipher with block size of 64 bits.

Blowfish was developed by Bruce Schneier in 1993. Here is the algorithm presented in Bruce's paper:

   T: 64 bits of clear text
   P1, P2, ..., P18: 18 sub-keys
   F(): Round function
   C: 64 bits of cipher text

   (xL, xR) = T, dividing T into two 32-bit parts
   Loop on i from = 1 to 16
      xL = xL XOR Pi
      xR = F(xL) XOR xR
      Swap xL and xR
   End of loop
   Swap xL and xR
   xR = xR XOR P17
   xL = xL XOR P18
   C = (xL, xR)

The round function F(A) is defined as:

   A: 32-bit input data
   S1[], S2[], S3[], S4[]: 4 S-box lookup tables, 256 long each
   B = f(A): 32-bit output data

   (a, b, c, d) = A, dividing L into four 8-bit parts
   B = ( (S1[a] + S2[b] mod 2**32) XOR S3[c] ) + S[d] mod 2**32

Table of Contents

 About This Book

 Cryptography Terminology

 Cryptography Basic Concepts

 Introduction to AES (Advanced Encryption Standard)

 Introduction to DES Algorithm

 DES Algorithm - Illustrated with Java Programs

 DES Algorithm Java Implementation

 DES Algorithm - Java Implementation in JDK JCE

 DES Encryption Operation Modes

 DES in Stream Cipher Modes

 PHP Implementation of DES - mcrypt

Blowfish - 8-Byte Block Cipher

 What Is Block Cipher?

Blowfish Cipher Algorithm

 Key Schedule (Sub-Keys Generation) Algorithm

 BlowfishJ - Java Implementation by Markus Hahn

 Blowfish Decryption Algorithm

 First 8336 Hex Digits of PI

 Secret Key Generation and Management

 Cipher - Secret Key Encryption and Decryption

 Introduction of RSA Algorithm

 RSA Implementation using java.math.BigInteger Class

 Introduction of DSA (Digital Signature Algorithm)

 Java Default Implementation of DSA

 Private key and Public Key Pair Generation

 PKCS#8/X.509 Private/Public Encoding Standards

 Cipher - Public Key Encryption and Decryption

 MD5 Mesasge Digest Algorithm

 SHA1 Mesasge Digest Algorithm

 OpenSSL Introduction and Installation

 OpenSSL Generating and Managing RSA Keys

 OpenSSL Managing Certificates

 OpenSSL Generating and Signing CSR

 OpenSSL Validating Certificate Path

 "keytool" and "keystore" from JDK

 "OpenSSL" Signing CSR Generated by "keytool"

 Migrating Keys from "keystore" to "OpenSSL" Key Files

 Certificate X.509 Standard and DER/PEM Formats

 Migrating Keys from "OpenSSL" Key Files to "keystore"

 Using Certificates in IE

 Using Certificates in Google Chrome

 Using Certificates in Firefox

 Archived Tutorials


 Full Version in PDF/EPUB