 
BlowfishJ v2.01 (01/30/2003)


WHAT IS BLOWFISHJ?

This is my own implementation of the Blowfish encryption algorithm in ECB and CBC mode. 
It's a simple to use class and runs at an excellent speed, around 40 Mb/s with the Hotspot
Server VM of the JDK 1.4 on a P4/1700. The code actually comes very close to the actual 
limits what is possible with Java. The latest JDK it was tested on is 1.4.1. Additionally 
there is a C++ implementation 100% compatible to the Java version, allowing an easy data
exchange across these technologies.

 
FILES IN THIS PACKAGE 

BlowfishJ/*.*    - sources in the package BlowfishJ
BlowfishJ_cpp/*.*- C++ implementation of BlowfishJ
readme.txt	     - this document

To get a first impression here an example on how to build and run the test application.
Change your path in the command line to the root of this package, one level below the
"BlowfishJ" directory (where this README.TXT file is located). Then type (in a Win32
environment, under UNIX or on non JDK systems it might be slightly different)

	javac -O BlowfishJ\*.java

This will generate all the *.class files. After that simply execute the test with

	java BlowfishJ.BlowfishTest

The C++ implementation compiles successfully under BCC55 and GCC. Yu can build and run
the test application e.g. by simple calling

	gcc TestBlowfishJ.cpp BlowfishJ.cpp
	./a.exe

if you run the Cygwin environment on a Win32 platform. You can also run the JavaDoc
tool over the source to create documentation.


OTHER MODULES IN BLOWFISHJ

Next to the original sources this software also includes stream classes contributed by
Dale Anson <danson@germane-software.com>. You can run the tests, after compilation as
described above, by typing

	java BlowfishJ.InOutputStreamTest [filename]

on the command line. You may provide a file name for extended testing purposes. Please
contact Dale for license information on these parts of the BlowfishJ package, as well 
as you may for other questions about them.

For a real world application using BlowfishJ please check out John's Zaurus JCryptPad at 

	http://mywebpages.comcast.net/sl5500/


 
COPYRIGHT AND WARRANTY

This software is open source, which means that you can use it in your own applets and 
applications without any license fees. The only conditions are that you're not allowed
to  change the files in this package without the permisson of the authors, that the 
usage  is mentioned somewhere in the documentation and that feedback is sent back to 
the author. There's no warranty on this software. It has been well tested, encrypts and 
decrypts the official test vectors flawlessly. 


VERSION HISTORY 

2.01

- problem BlowfishCBC, onlythe first block got decrypyted (wrong block halves swap)
- BinConverter.binHexToBytes was flawed

2.00

- speed optimized the byte array handling methods (since they are the most commonly
  used), which gained around 50% more performance(!); both ECB and CBC classes now
  have separated inner loops for maximum speed
- all methods with array parameters have now new versions with offset and length
  parameters (where necessary), solves lots of data copying overhead for the caller
- also deprecated all of these old methods with array parameters
- extended and cleaned up BinConverter
- BlowfishEasy is now using the standard Java SHA-1 implementation
- fixed message input in BlowfishTest (length adjustment)

1.86

- added BlowfishJ implementation in C++
- decryption was referencing the box members, not the references on the stack,
  which lead to a decrease in performance

1.85

(first entry)


--
Copyright (c) 1997-2003 Markus Hahn <markus_hahn@gmx.net>
