|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcryptix.security.BlockCipher
cryptix.security.Blowfish
This class implements the Cryptix V2.2 API for the Blowfish block cipher.
New code should use the JCA implementation of Blowfish, which can be obtained
by calling Cipher.getInstance("Blowfish")
, for example.
Blowfish was designed by Bruce Schneier. The algorithm is in the public domain.
This implementation throws a CryptoError if the user key length is out of range, or if any one of the two self-tests fail. The self-tests are as follows:
References:
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.9 $
java.security.Cipher#getInstance
Field Summary | |
static int |
BLOCK_LENGTH
Deprecated. The length of a block (8 bytes for Blowfish). |
static int |
BLOCK_LENGTH_MAX
Deprecated. |
static int |
BLOCK_LENGTH_MIN
Deprecated. |
static int |
KEY_LENGTH
Deprecated. The default length of a user key (16 bytes for Blowfish). |
static int |
KEY_LENGTH_MAX
Deprecated. |
static int |
KEY_LENGTH_MIN
Deprecated. |
static int |
KEY_LENGTH_MOD
Deprecated. |
static int |
NUM_ROUNDS
Deprecated. The 2.2 API only supports the default number of rounds, 16. |
Fields inherited from class cryptix.security.BlockCipher |
blockSize, cipher |
Constructor Summary | |
Blowfish(byte[] userKey)
Deprecated. This creates a Blowfish block cipher instance, with key data taken from a byte array of a user-defined length. |
Method Summary | |
static void |
main(java.lang.String[] argv)
Deprecated. Entry point for very basic self_test . |
static void |
self_test()
Deprecated. Do some basic tests. |
Methods inherited from class cryptix.security.BlockCipher |
blockLength, decrypt, decrypt, decrypt, encrypt, encrypt, encrypt, keyLength |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BLOCK_LENGTH
public static final int BLOCK_LENGTH_MIN
public static final int BLOCK_LENGTH_MAX
public static final int KEY_LENGTH
public static final int KEY_LENGTH_MAX
public static final int KEY_LENGTH_MIN
public static final int KEY_LENGTH_MOD
public static final int NUM_ROUNDS
Constructor Detail |
public Blowfish(byte[] userKey)
userKey
- the user key.
CryptoError
- if an error occurs initialising the cipher.Method Detail |
public static void main(java.lang.String[] argv)
self_test
.
public static void self_test() throws CryptoError
CryptoError
cryptix.examples.TestBlowfish
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |