cryptix.security
Class DES

java.lang.Object
  |
  +--cryptix.security.BlockCipher
        |
        +--cryptix.security.DES

public class DES
extends BlockCipher

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 $

Since:
Cryptix 2.2
Author:
Systemics Ltd, Geoffrey Keating, Eric Young, David Hopwood, Raif S. Naffah, John F. Dumas
See Also:
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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK_LENGTH

public static final int BLOCK_LENGTH
Deprecated. 
The length of a block (8 bytes for DES).

KEY_LENGTH

public static final int KEY_LENGTH
Deprecated. 
The length of a user key (8 bytes for DES).
Constructor Detail

DES

public DES(byte[] userKey)
Deprecated. 
This creates a DES block cipher instance, with key data taken from a byte array of a user-defined length.
Parameters:
userKey - the user key.
Throws:
CryptoError - if an error occurs initializing the cipher.
Method Detail

main

public static final void main(java.lang.String[] argv)
Deprecated. 
Entry point for very basic self_test.

self_test

public static final void self_test()
                            throws CryptoError
Deprecated. 
Do some basic tests. Three of the certification data are included only, no output, success or exception. If you want more, write a test program!
See Also:
cryptix.examples.DES