Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Class DES  view DES download

  extended byjavax.crypto.CipherSpi
      extended bycryptix.jce.provider.cipher.BlockCipher
          extended bycryptix.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.


$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
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( 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
Methods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineUnwrap, engineUpdate, engineWrap
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


private static final int ROUNDS
See Also:
Constant Field Values


private static final int BLOCK_SIZE
See Also:
Constant Field Values


private static final int KEY_LENGTH
See Also:
Constant Field Values


private static final int ALT_KEY_LENGTH
See Also:
Constant Field Values


private static final int INTERNAL_KEY_LENGTH
See Also:
Constant Field Values


private static final int[] SKB
Table for PC2 permutations in key schedule computation.


private static final int[] SP_TRANS
Table for S-boxes and permutations, used in encrypt_base.


private int[] sKey
The internal key schedule

Constructor Detail


public DES()
Method Detail


protected void coreInit( key,
                        boolean decrypt)
Specified by:
coreInit in class BlockCipher


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