Blowfish Cipher Tutorials - Herong's Tutorial Examples

http://www.herongyang.com/Blowfish

Copyright © 2012-2018 by Dr. Herong Yang. All rights reserved.

Blowfish Tutorial This tutorial book is a collection of notes and sample codes written by the author while he was learning Blowfish cipher himself. Topics basic concepts of cipher and encryption; introduction of Blowfish cipher algorithm; 8366 Hex Digits of PI; Perl Crypt::Blowfish and Crypt::CBC, Crypt::CFB modules; OpenSSL Blowfish ciphers: bf-ecb, bf-cbc, bf-cfb, bf-ofb; PHP Mcrypt extension; Blowfish CFB-8 and OFB-8 operation modes.

Table of Contents

About This Book

Blowfish Cipher Algorithm

Blowfish Cipher Encryption Algorithm

Key Schedule (Sub-Keys and S-Boxes) Algorithm

Efficient Form of the Blowfish Algorithm

Blowfish Cipher Decryption Algorithm

Proof of Blowfish Cipher Algorithm

Blowfish Cipher Test Vectors

First 8336 Fractional Hex Digits of PI

piqpr8.c - Generating Hex Digits of PI

Perl Crypt::Blowfish Module

What Is Crypt::Blowfish

Installing Crypt::Blowfish 2.14 with ActivePerl

Crypt::Blowfish Behavior Tests

Secret Keys with Repeating Pattern

Crypt::Blowfish Verification with Test Vectors

Blowfish Test Vectors with 16-Byte Keys

Perl Crypt::ECB Perl Module

What is Crypt::ECB

Installing Crypt::ECB 1.45 with ActivePerl

Crypt::ECB Encryption with No Padding

Crypt::ECB Encryption Test Cases

Crypt::ECB Auto Padding

Perl Crypt::CBC Module

What is Crypt::CBC

Installing Crypt::CBC 2.33 with ActivePerl

Crypt::CBC Encryption with Literal Keys

Crypt::CBC Literal Key Error Cases

Crypt::CBC Encryption with Crypt::Blowfish Objects

Crypt::CBC Operation Simulation

Crypt::CBC Encryption Verification

Blowfish CBC 2-Block Test Vectors

Crypt::CBC Prepending IV to Ciphertext

Crypt::CBC Encryption with Salted Keys

Crypt::CBC Salted Key Test Cases

Crypt::CBC Secret Key and IV Algorithm

Crypt::CBC Encryption with Random Salt

Crypt::CBC Padding Options

Crypt::CBC Padding Option Tests

Crypt::CBC Blowfish Encryption Summary

Perl Crypt::CFB Perl Module

OpenSSL "enc -bf-ecb" for Blowfish/ECB Encryption

What is OpenSSL

Installing OpenSSL for Windows

OpenSSL "enc" Blowfish Ciphers

Ways to Control Secret Key and IV

"bf-ecb" Cipher with Literal Key

"bf-ecb" Cipher on Multiple Blocks

Secret Key Padding and Truncation

"bf-ecb" Cipher with Salted Key

Salted Key Generation Algorithm

"bf-ecb" Cipher with Random Salt

OpenSSL Default Padding - PKCS#5

"enc -bf-ecb" Command Summary

OpenSSL "enc -bf-cbc" for Blowfish/CBC Encryption

"bf-cbc" Cipher with Literal Key

"bf-cbc" Cipher on Multiple Blocks

"bf-cbc" Encryption Verification

"bf-cbc" 2-Block Test Vectors

"bf-cbc" Cipher with Salted Key

"bf-cbc" Cipher with Random Salt

"enc -bf-cbc" Command Summary

OpenSSL "enc -bf-cfb" for Blowfish/CFB Encryption

OpenSSL "enc -bf-ofb" for Blowfish/OFB Encryption

PHP Mcrypt Extension for Blowfish

What is PHP Mcrypt Extension

PHP Mcrypt Blowfish Block Cipher

Mycrypt Blowfish Block Chaining Cipher

"ncfb/nofb" for Block Chaining Ciphers

Performing CFB Operation Manually

php_blowfish.php - PHP Blowfish Demo

Blowfish 8-Bit Cipher in PHP

References

Full Version in PDF/EPUB

Keywords: Blowfish, Cipher, Encryption