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
-
BLOCK_LENGTH
- The length of a block - DEPRECATED - use blockLength() instead.
-
KEY_LENGTH
- The length of a the user key - DEPRECATED - use keyLength() instead.
-
DES(byte[])
- Create a DES block cipher from a key in a byte array.
-
blockDecrypt(byte[], int, byte[], int)
- Perform a decryption in the extended class.
-
blockEncrypt(byte[], int, byte[], int)
- Perform an encryption in the extended class.
-
blockLength()
- Return the block length of this cipher.
-
getLinkErrorString()
-
-
hasFileLibraryLoaded()
-
-
isLibraryCorrect()
-
-
keyLength()
- Return the key length for this cipher.
-
main(String[])
- Entry point for
self_test
.
-
self_test(PrintStream, String[])
-
BLOCK_LENGTH
public final static int BLOCK_LENGTH
- The length of a block - DEPRECATED - use blockLength() instead.
KEY_LENGTH
public final static int KEY_LENGTH
- The length of a the user key - DEPRECATED - use keyLength() instead.
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
hasFileLibraryLoaded
public final static boolean hasFileLibraryLoaded()
isLibraryCorrect
public final static boolean isLibraryCorrect()
getLinkErrorString
public final static String getLinkErrorString()
blockLength
public int blockLength()
- Return the block length of this cipher.
- Returns:
- the block length in bytes is 8
- Overrides:
- blockLength in class BlockCipher
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
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
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
main
public final static void main(String argv[])
- Entry point for
self_test
.
self_test
public static void self_test(PrintStream out,
String argv[]) throws Exception
All Packages Class Hierarchy This Package Previous Next Index