Key Schedule (Sub-Keys Generation) Algorithm

This section describes the Blowfish Key Schedule (Sub-Keys Generation) algorithm. It uses the binary representation of the fractional portion of constant Pi - 3.1415927... as initial values.

Blowfish key schedule algorithm:

   K: The key - 32 bits or more
   PI: The binary representation of the fractional portion of "pi"
      = 3.1415927... - 3.0
      = 2/16 + 4*/16**2 + 3/16**3 + 15/16**4 + ...
      = 0x243f6a8885a308d313198a2e03707344...
   P1, P2, ..., P18: 18 32-bit sub-keys
   S1[], S2[], S3[], S4[]: 4 S-boxes, 32-bit 256-element arrays

   (P1, P2, ..., P18, S1[], S2[], S3[], S4[]) = PI
   K' = (K, K, K, ...), Repeat the key to 18*32 bits long
   (P1, P2, ..., P18) = (P1, P2, ..., P18) XOR K'
   T = (0x000000, 0x000000), Setting initial clear text
   T = Blowfish(T), Applying Blowfish algorithm 
   (P1, P2) = T, Updating first two sub-keys
   T = Blowfish(T), Applying Blowfish again
   (P3, P4) = T
   T = Blowfish(T)
   (P17, P18) = T
   T = Blowfish(T)
   (S1[0], S1[1]) = T
   T = Blowfish(T)
   (S1[2], S1[3]) = T
   T = Blowfish(T)
   (S1[254], S1[255]) = T
   T = Blowfish(T)
   (S2[0], S2[1]) = T
   T = Blowfish(T)
   (S4[254], S4[255]) = T

Note that:

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