demo.cipher
Class Blowfish

java.lang.Object
  |
  +--demo.cipher.Blowfish

public class Blowfish
extends Object

This class tests the correctness of the Blowfish implementation. The test data is taken from SSLeay 0.8.1. Generally the test data consist of plain text, cipher text and key data.

The test procedure can be devided into an encrypting and decrypting phase: First the plain data is encrypted according to the selected IDEA-Mode and compared with the given cipher data. The encrypting algorithm works correctly if each block of the cipher data equals to the corresponding block of the encrypted plain data. Following this the cipher data is decrypted and compared with the input plain data. This step prooves the correctness of the decrypting phase.

Version:
File Revision 18

Constructor Summary
Blowfish()
           
 
Method Summary
static void main(String[] arg)
          Performs some tests for Blowfish.
 void start()
           
 boolean testECB()
          Test the Blowfish.
 boolean testMode(String algorithm, String mode, byte[] key, byte[] iv, byte[] plainData, byte[] cipherData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Blowfish

public Blowfish()
Method Detail

testMode

public boolean testMode(String algorithm,
                        String mode,
                        byte[] key,
                        byte[] iv,
                        byte[] plainData,
                        byte[] cipherData)
                 throws Exception

testECB

public boolean testECB()
                throws Exception
Test the Blowfish.

start

public void start()

main

public static void main(String[] arg)
Performs some tests for Blowfish.

This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note).

IAIK-JCE 3.1 with IAIK-JCE CC Core 3.1, (c) 1997-2004 IAIK