gnu.crypto.cipher
public class TripleDES extends BaseCipher
Triple-DES runs the DES algorithm three times with three independent 56 bit keys. To encrypt:
Ci = Ek3 ( Ek2-1 ( Ek1 ( Pi )))
And to decrypt:
Pi = Ek1-1 ( Ek2 ( Ek3-1 ( Ci )))
(The "ede" comes from the encryption operation, which runs Encrypt-Decrypt-Encrypt)
References:
Version: $Revision: 1.2 $
Field Summary | |
---|---|
static int | BLOCK_SIZE Triple-DES only operates on 64 bit blocks. |
static int | KEY_SIZE Triple-DES uses 168 bits of a parity-adjusted 192 bit key. |
Constructor Summary | |
---|---|
TripleDES()
Default 0-arguments constructor. |
Method Summary | |
---|---|
static void | adjustParity(byte[] kb, int offset)
Transform a key so it will be parity adjusted.
|
Iterator | blockSizes() |
Object | clone() |
void | decrypt(byte[] in, int i, byte[] out, int o, Object K, int bs) |
void | encrypt(byte[] in, int i, byte[] out, int o, Object K, int bs) |
static boolean | isParityAdjusted(byte[] kb, int offset)
Tests if a byte array has already been parity adjusted.
|
Iterator | keySizes() |
Object | makeKey(byte[] kb, int bs) |
Parameters: kb The key bytes to adjust. offset The starting offset into the key bytes.
See Also: (byte[],int)
Parameters: kb The key bytes to test. offset The starting offset into the key bytes.
Returns: true
if the bytes in kb starting at
offset are parity adjusted.
See Also: (byte[],int)
(byte[],int)