Extended Demo of Blowfish in VB
This is an extended demonstration showing more functions in David Ireland's adaptation of Bruce Schneier's Blowfish algorithm in classic Visual Basic 6. The source code in VB6 is available here.
The first example is the same as the simple Blowfish VB Demo where a short ASCII string "Hello, world!" is padded and encrypted in ECB mode.
The second example is the same as above
except CBC mode is used instead. Padding is carried out automatically by the
blf_BytesEnc function and removed by blf_BytesDec
The last example shows how to carry out "raw" encryption - i.e. without padding the string - in Cipher Block Chaining (CBC) mode. This is Eric Young's test vector. Note how the plain text is entered in hex format so we can add non-printable null characters to the end of the string (to get this, enter the text into the 'Plain Text' box as normal, click on Encrypt, then copy and paste the hex characters from the 'PT Input' box).
Note that if the padding option is set to "none", the plain text will be truncated to a multiple of 8 characters.
See also
See also the Blowfish VB Demo Page and Blowfish Version 6 Changes.This document last updated 25 June 2008.
For more information Contact DI Management.
Return to The Cryptography Page.
[Top]