Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

July 31, 2006

128-Blowfish Encryption Matching Published Test Vectors

How do you know your software is doing Blowfish encryption correctly? The best way to answer this question is by testing your output against published test vectors. If you Google for "blowfish test vectors", you’ll likely find this: http://www.schneier.com/code/vectors.txt. These are the same vectors used in OpenSSL, and are the test vectors published by the inventor of Blowfish (Bruce Schneier).

Most of the vectors are for ECB Blowfish with a 64-bit key and 16-rounds of initialization. The Chilkat Blowfish implementation is for ECB / 16-rounds (these cannot be changed). However, with Chilkat you’ll be using keys that are 128-bits or longer. You can test your 128, 192, and 256-blowfish encryption using the 64-bit data. The reason is that the results will be the same if your key is equal to the 64-bit key repeated 2, 3, or 4 times. For example, if your 64-bit key is:

01 02 03 04 05 06 07 08

You can use this key for 128-bit encryption to achieve identical results:

01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08

or this with 256-bit blowfish:

01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08 01 02 03 04 05 06 07 08

Here is a VB.NET 128-bit Blowfish example that demonstrates it.


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.