Installing OpenSSL for Windows

A tutorial example is provided on how to download and install the binary version of OpenSSL 0.9.8h on Windows. Installing the source version of OpenSSL requires compilation of C code.

If you want to use OpenSSL to perform Blowfish encryption, you need to download and install it on your local system.

OpenSSL is officially distributed in C source code format. This is not a problem for Unix systems where C compiler is always available. But if you have a Windows system, you will have a hard time to install OpenSSL in C source code format. What you should do is to find a pre-compiled binary version for Windows. Here is how I installed OpenSSL on my Windows system:

1. Go to, and download the "Setup" version of "Complete package, except sources", openssl-0.9.8h-1-setup.exe.

2. Double-click on openssl-0.9.8h-1-setup.exe to install OpenSSL to \local\gnuwin32 directory.

3. Go back to the same page, download the "ZIP" version of "Documentation",

4. Unzip to \local\gnuwin32 directory.

5. Open command line window, and try the following command:

C:\herong>\local\gnuwin32\bin\openssl version
OpenSSL 0.9.8h 28 May 2008

C:\herong>\local\gnuwin32\bin\openssl help
openssl:Error: '-help' is an invalid command.

Standard commands
asn1parse      ca             ciphers        crl            crl2pkcs7
dgst           dh             dhparam        dsa            dsaparam
enc            engine         errstr         gendh          gendsa
genrsa         nseq           ocsp           passwd         pkcs12
pkcs7          pkcs8          rand           req            rsa
rsautl         s_client       s_server       s_time         sess_id
smime          speed          spkac          verify         version

If you see the list of commands printed by OpenSSL, you know that your installation is done correctly.

Note that the pre-compiled binary version for Windows is OpenSSL 0.9.8h, which is older than the source version OpenSSL 1.0.2e. OpenSSL 0.9.8h version is good enough for you to use its Blowfish functionalities.

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

 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

 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


 Full Version in PDF/EPUB