|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcryptix.security.BlockCipher
cryptix.security.SPEED
This class implements the Cryptix V2.2 API for the SPEED block cipher.
New code should use the JCA implementation of SPEED, which can be obtained
by calling Cipher.getInstance("SPEED")
, for example.
SPEED is a block cipher with variable key size, data block size and number of rounds (in the style of RC5).
This implementation sets the key schedule and all variables when the cipher is initialized:
SPEED was designed by Yuliang Zheng, and is in the public domain.
References:
Copyright © 1997
Systemics Ltd
on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.10 $
java.security.Cipher#getInstance
Field Summary |
Fields inherited from class cryptix.security.BlockCipher |
blockSize, cipher |
Constructor Summary | |
SPEED(byte[] userKey)
Deprecated. This creates a SPEED block cipher instance, with key data taken from a byte array of a user-defined length. |
|
SPEED(byte[] userKey,
int blockSize,
int rounds)
Deprecated. This creates a SPEED block cipher instance, with key data taken from a byte array of a user-defined length, and with a specified block size and number of rounds. |
Method Summary | |
static int |
blockLengthMax()
Deprecated. Returns the maximum block length. |
static int |
blockLengthMin()
Deprecated. Returns the minimum block length. |
static int |
blockLengthMod()
Deprecated. Returns the modulo block length. |
static int |
keyLengthMax()
Deprecated. Returns the maximum key length. |
static int |
keyLengthMin()
Deprecated. Returns the minimum key length. |
static int |
keyLengthMod()
Deprecated. Returns the modulo key length. |
static void |
main(java.lang.String[] args)
Deprecated. Entry point for self_test . |
int |
numRounds()
Deprecated. Returns the number of rounds for this cipher. |
static int |
numRoundsMax()
Deprecated. Returns the maximum number of rounds. |
static int |
numRoundsMin()
Deprecated. Returns the minimum number of rounds. |
static int |
numRoundsMod()
Deprecated. Returns the modulo number of rounds. |
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 |
Constructor Detail |
public SPEED(byte[] userKey)
Default block size (8) and number of rounds (64) are set to approximate IDEA or DES, allowing for drop-in replacement.
userKey
- the user key.
CryptoError
- if an error occurs initializing the cipher.public SPEED(byte[] userKey, int blockSize, int rounds)
These are recommended settings for 'adequate' security:
+--------------------------------------------------+ | block size | key length | rounds | |==================================================| | 8 | >= 8 | >= 64 | |--------------------------------------------------| | 16 | >= 8 | >= 48 | |--------------------------------------------------| | 32 | >= 8 | >= 48 | +--------------------------------------------------+
Also see the paper referenced above.
userKey
- the user key, length can be 6, 8, ... 32 bytesblockSize
- the block size in bytes: 8, 16 or 32rounds
- the number of rounds: >= 32, multiple of 4Method Detail |
public static final int blockLengthMax()
public static final int blockLengthMin()
public static final int blockLengthMod()
public static final int keyLengthMax()
public static final int keyLengthMin()
public static final int keyLengthMod()
public static final int numRoundsMax()
public static final int numRoundsMin()
public static final int numRoundsMod()
public final int numRounds()
public static void main(java.lang.String[] args)
self_test
.
public static void self_test() throws CryptoError
CryptoError
cryptix.examples.TestSPEED
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |