|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cryptix.security.BlockCipher | +--cryptix.security.DES
This class implements the Cryptix V2.2 API for the DES block cipher.
New code should use the JCA implementation of DES, which can be obtained
by calling Cipher.getInstance("DES")
, for example.
DES is a block cipher with an 8 byte block size. The key length is 8 bytes, but only 56 bits are used as the parity bit in each byte is ignored.
This algorithm has been seriously analysed over the last 30 years, and no significant weaknesses have been reported. Its only known flaw is that the key length of 56 bits makes it relatively easy to brute-force it.
To overcome this near-fatal flaw, it is recommended that DES be
used in Triple DES mode. The JCA algorithm name for the recommended
form of Triple DES is "DES-EDE3/CBC", which is implemented by the
DES_EDE3
and CBC
classes.
DES was written by IBM and first released in 1976. The algorithm is freely usable.
References
Bruce Schneier, "Chapter 12 Data Encryption Standard," Applied Cryptography, Wiley 2nd Ed, 1996
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.5 $
java.security.Cipher#getInstance
Field Summary | |
static int |
BLOCK_LENGTH
Deprecated. The length of a block (8 bytes for DES). |
static int |
KEY_LENGTH
Deprecated. The length of a user key (8 bytes for DES). |
Fields inherited from class cryptix.security.BlockCipher |
blockSize, cipher |
Constructor Summary | |
DES(byte[] userKey)
Deprecated. This creates a DES 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 |
|
Field Detail |
public static final int BLOCK_LENGTH
public static final int KEY_LENGTH
Constructor Detail |
public DES(byte[] userKey)
userKey
- the user key.CryptoError
- if an error occurs initializing the cipher.Method Detail |
public static final void main(java.lang.String[] argv)
self_test
.public static final void self_test() throws CryptoError
cryptix.examples.DES
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |