java.lang.Object
javax.crypto.CipherSpi
cryptix.jce.provider.cipher.BlockCipher
cryptix.jce.provider.cipher.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. 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".
DES was invented by IBM and first released in 1976. The algorithm is
freely usable for both single and triple encryption.
References:
- "Chapter 12 Data Encryption Standard,"
Applied Cryptography, 2nd edition,
Bruce Schneier, John Wiley & Sons, 1996.
- NIST FIPS PUB 46-2 (supercedes FIPS PUB 46-1),
"Data Encryption Standard",
U.S. Department of Commerce, December 1993.
http://www.itl.nist.gov/fipspubs/fip46-2.htm
- Version:
- $Revision: 1.11 $
Field Summary |
private static int |
ALT_KEY_LENGTH
|
private static int |
BLOCK_SIZE
|
private static int |
INTERNAL_KEY_LENGTH
|
private static int |
KEY_LENGTH
|
private static int |
ROUNDS
|
private static int[] |
SKB
Table for PC2 permutations in key schedule computation. |
private int[] |
sKey
The internal key schedule |
private static int[] |
SP_TRANS
Table for S-boxes and permutations, used in encrypt_base. |
Fields inherited from class cryptix.jce.provider.cipher.BlockCipher |
|
Constructor Summary |
DES()
|
Method Summary |
protected void |
coreCrypt(byte[] in,
int inOffset,
byte[] out,
int outOffset)
Perform a DES encryption or decryption operation of a single block. |
protected void |
coreInit(java.security.Key key,
boolean decrypt)
|
Methods inherited from class cryptix.jce.provider.cipher.BlockCipher |
clone, coreGetBlockSize, engineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetKeySize, engineGetOutputSize, engineGetParameters, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUpdate, engineUpdate |
ROUNDS
private static final int ROUNDS
- See Also:
- Constant Field Values
BLOCK_SIZE
private static final int BLOCK_SIZE
- See Also:
- Constant Field Values
KEY_LENGTH
private static final int KEY_LENGTH
- See Also:
- Constant Field Values
ALT_KEY_LENGTH
private static final int ALT_KEY_LENGTH
- See Also:
- Constant Field Values
INTERNAL_KEY_LENGTH
private static final int INTERNAL_KEY_LENGTH
- See Also:
- Constant Field Values
SKB
private static final int[] SKB
- Table for PC2 permutations in key schedule computation.
SP_TRANS
private static final int[] SP_TRANS
- Table for S-boxes and permutations, used in encrypt_base.
sKey
private int[] sKey
- The internal key schedule
DES
public DES()
coreInit
protected void coreInit(java.security.Key key,
boolean decrypt)
throws java.security.InvalidKeyException
- Specified by:
coreInit
in class BlockCipher
coreCrypt
protected void coreCrypt(byte[] in,
int inOffset,
byte[] out,
int outOffset)
- Perform a DES encryption or decryption operation of a single block.
- Specified by:
coreCrypt
in class BlockCipher