Class cryptix.security.DES
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.security.DES

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

public final class DES
extends BlockCipher
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. It's only 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. Need reference here...

References

DES was written by IBM and first released in 1976. See Bruce Schneier, "Chapter 12 Data Encryption Standard," Applied Cryptography, Wiley 2nd Ed, 1996 for detailed information. The algorithm is freely usable.

Copyright © 1995, 1996, 1997 Systemics Ltd on behalf of the Cryptix Development Team. All rights reserved.

Author:
Geoffrey Keating (this Java implementation), Eric Young (SPtrans)
See Also:
BlockCipher

Variable Index

 o BLOCK_LENGTH
The length of a block - DEPRECATED - use blockLength() instead.
 o KEY_LENGTH
The length of a the user key - DEPRECATED - use keyLength() instead.

Constructor Index

 o DES(byte[])
Create a DES block cipher from a key in a byte array.

Method Index

 o blockDecrypt(byte[], int, byte[], int)
Perform a decryption in the extended class.
 o blockEncrypt(byte[], int, byte[], int)
Perform an encryption in the extended class.
 o blockLength()
Return the block length of this cipher.
 o getLinkErrorString()
 o hasFileLibraryLoaded()
 o isLibraryCorrect()
 o keyLength()
Return the key length for this cipher.
 o main(String[])
Entry point for self_test.
 o self_test(PrintStream, String[])

Variables

 o BLOCK_LENGTH
  public final static int BLOCK_LENGTH
The length of a block - DEPRECATED - use blockLength() instead.
 o KEY_LENGTH
  public final static int KEY_LENGTH
The length of a the user key - DEPRECATED - use keyLength() instead.

Constructors

 o DES
  public DES(byte userKey[])
Create a DES block cipher from a key in a byte array. The byte array must be keyLength bytes long.
Parameters:
userKey - the user key in a byte[ keyLength() ] array

Methods

 o hasFileLibraryLoaded
  public final static boolean hasFileLibraryLoaded()
 o isLibraryCorrect
  public final static boolean isLibraryCorrect()
 o getLinkErrorString
  public final static String getLinkErrorString()
 o blockLength
  public int blockLength()
Return the block length of this cipher.
Returns:
the block length in bytes is 8
Overrides:
blockLength in class BlockCipher
 o keyLength
  public int keyLength()
Return the key length for this cipher.
Returns:
s the key length in bytes is 8
Overrides:
keyLength in class BlockCipher
 o blockEncrypt
  protected void blockEncrypt(byte in[],
                              int in_offset,
                              byte out[],
                              int out_offset)
Perform an encryption in the extended class.
Overrides:
blockEncrypt in class BlockCipher
 o blockDecrypt
  protected void blockDecrypt(byte in[],
                              int in_offset,
                              byte out[],
                              int out_offset)
Perform a decryption in the extended class.
Overrides:
blockDecrypt in class BlockCipher
 o main
  public final static void main(String argv[])
Entry point for self_test.
 o self_test
  public static void self_test(PrintStream out,
                               String argv[]) throws Exception

All Packages  Class Hierarchy  This Package  Previous  Next  Index