public class

DES

extends Object
implements BlockCipher
java.lang.Object
   ↳ com.trilead.ssh2.crypto.cipher.DES
Known Direct Subclasses

Class Overview

DES.

Summary

Fields
static short[] Df_Key what follows is mainly taken from "Applied Cryptography", by Bruce Schneier, however it also bears great resemblance to Richard Outerbridge's D3DES...
static int[] SP1
static int[] SP2
static int[] SP3
static int[] SP4
static int[] SP5
static int[] SP6
static int[] SP7
static int[] SP8
static int[] bigbyte
static short[] bytebit
static byte[] pc1
static byte[] pc2
static byte[] totrot
private int[] workingKey
Public Constructors
DES()
standard constructor.
Public Methods
String getAlgorithmName()
int getBlockSize()
void init(boolean encrypting, byte[] key)
initialise a DES cipher.
void reset()
void transformBlock(byte[] in, int inOff, byte[] out, int outOff)
Protected Methods
void desFunc(int[] wKey, byte[] in, int inOff, byte[] out, int outOff)
the DES engine.
int[] generateWorkingKey(boolean encrypting, byte[] key, int off)
generate an integer based working key based on our secret key and what we processing we are planning to do.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.trilead.ssh2.crypto.cipher.BlockCipher

Fields

static short[] Df_Key

what follows is mainly taken from "Applied Cryptography", by Bruce Schneier, however it also bears great resemblance to Richard Outerbridge's D3DES...

static int[] SP1

static int[] SP2

static int[] SP3

static int[] SP4

static int[] SP5

static int[] SP6

static int[] SP7

static int[] SP8

static int[] bigbyte

static short[] bytebit

static byte[] pc1

static byte[] pc2

static byte[] totrot

private int[] workingKey

Public Constructors

public DES ()

standard constructor.

Public Methods

public String getAlgorithmName ()

public int getBlockSize ()

public void init (boolean encrypting, byte[] key)

initialise a DES cipher.

Parameters
encrypting Whether or not we are for encryption.
key The parameters required to set up the cipher.
Throws
IllegalArgumentException if the params argument is inappropriate.

public void reset ()

public void transformBlock (byte[] in, int inOff, byte[] out, int outOff)

Parameters
in
inOff
out
outOff

Protected Methods

protected void desFunc (int[] wKey, byte[] in, int inOff, byte[] out, int outOff)

the DES engine.

Parameters
wKey
in
inOff
out
outOff

protected int[] generateWorkingKey (boolean encrypting, byte[] key, int off)

generate an integer based working key based on our secret key and what we processing we are planning to do. Acknowledgements for this routine go to James Gillogly & Phil Karn. (whoever, and wherever they are!).

Parameters
encrypting
key
off