Blowfish Cipher Tutorials - Herong's Tutorial Examples
∟OpenSSL "enc -bf-cfb" for Blowfish/CFB Encryption
Tutorial notes and example codes are provided OpenSSL 'enc -bf-cfb' command for Blowfish encryption in CFB mode. Topics include introduction of CFB (Cipher FeedBack) cipher operation mode; Literal Key options to specify secret key and IV directly; Salted Key and Random Salt options to specify secret key and IV indirectly; Prepended cipher headers; PKCS#5 standard padding.
These sections are omitted from this Web preview version. To view the full content,
see information on how to obtain the full version this book.
"bf-cfb" Cipher with Literal Key
"bf-cfb" Cipher on Multiple Blocks
"bf-cfb" Encryption Verification
"bf-cfb" 2-Block Test Vectors
"bf-cfb" Cipher with Salted Key
"bf-cfb" Cipher with Random Salt
"enc -bf-cfb" Command Summary
Takeaways:
- OpenSSL is a generic cryptography toolkit library with a command line interface.
- OpenSSL is easy to install if you download the Windows binary package.
- OpenSSL uses a single command "enc" with a standard set
of options to encrypt and decrypt files with different block cipher algorithms.
- OpenSSL supports Blowfish cipher algorithm in 4 operation modes:
ECB, CBC, CFB and OFB.
- OpenSSL supports 3 ways to control the secret key and the IV:
Literal Key, Salted Key and Random Salt.
- OpenSSL uses MD5 hash function to derive the secret key and the IV
from a given passphrase and a given salt or random salt.
- OpenSSL prepend the salt value in the ciphertext with header blocks,
if salt is used. So no need to pass the salt to the receiver separately.
- OpenSSL supports the standard PKCS#5 padding algorithm
- CFB (Cipher FeedBack) operation mode does not encrypt the plaintext block directly.
It encrypts the previous ciphertext block, then XOR the result with the plaintext block
to give the ciphertext.
- Test vectors of Blowfish CFB operation mode with 2-block plaintext are provided.
Table of Contents
About This Book
Blowfish Cipher Algorithm
Perl Crypt::Blowfish Module
Perl Crypt::ECB Perl Module
Perl Crypt::CBC Module
Perl Crypt::CFB Perl Module
OpenSSL "enc -bf-ecb" for Blowfish/ECB Encryption
OpenSSL "enc -bf-cbc" for Blowfish/CBC Encryption
►OpenSSL "enc -bf-cfb" for Blowfish/CFB Encryption
OpenSSL "enc -bf-ofb" for Blowfish/OFB Encryption
PHP Mcrypt Extension for Blowfish
Blowfish 8-Bit Cipher in PHP
References
Full Version in PDF/EPUB