Cryptography Tutorials - Herong's Tutorial Examples - v5.42, by Herong Yang
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:
Input: T: 64 bits of clear text P1, P2, ..., P18: 18 sub-keys F(): Round function Output: C: 64 bits of cipher text Algorithm: (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:
Input: A: 32-bit input data S1[], S2[], S3[], S4[]: 4 S-box lookup tables, 256 long each Output B = f(A): 32-bit output data Algorithm (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
Introduction to AES (Advanced Encryption Standard)
DES Algorithm - Illustrated with Java Programs
DES Algorithm Java Implementation
DES Algorithm - Java Implementation in JDK JCE
DES Encryption Operation Modes
PHP Implementation of DES - mcrypt
►Blowfish - 8-Byte Block Cipher
Key Schedule (Sub-Keys Generation) Algorithm
BlowfishJ - Java Implementation by Markus Hahn
Secret Key Generation and Management
Cipher - Secret Key Encryption and Decryption
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
OpenSSL Introduction and Installation
OpenSSL Generating and Managing RSA Keys
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"