OpenSSL "enc -bf-ecb" for Blowfish/ECB Encryption
Tutorial notes and example codes are provided OpenSSL 'enc -bf-ecb' command for Blowfish encryption in ECB mode. Topics include introduction and installation of OpenSSL; ECB (Electronic CodeBook) 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.
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 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
- ECB (Electronic CodeBook) operation mode encrypts each plaintext
block independently. It does not need an IV value.
- ECB is weaker than CBC, CFB and OFB operation modes.
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
PDF Printing Version