|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xjava.security.IJCE_Traceable | +--xjava.security.Cipher | +--cryptix.provider.cipher.DES_EDE3
This class implements Triple DES EDE encryption with three independent keys. DES-EDE3 acts as a block cipher with an 8 byte block size.
The encoded form of the Triple DES key should be a 24-byte array, consisting of three 8-byte single DES keys in order - K1, K2 and K3. Encryption and decryption are done as follows:
The alternating encryption and decryption was designed by IBM to enable compatibility with single DES, when all three keys are equal (although it is now rare for Triple DES to be used in that way).
When DES-EDE3 is used with the CBC mode class (algorithm name "DES-EDE3/CBC"), the result is Outer-CBC, and only one IV is used.
DES was written by IBM and first released in 1976. The algorithm is freely usable for both single and triple encryption.
References:
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.6 $
Fields inherited from class xjava.security.Cipher |
DECRYPT, ENCRYPT, UNINITIALIZED |
Fields inherited from class xjava.security.IJCE_Traceable |
tracing |
Constructor Summary | |
DES_EDE3()
Constructs a DES-EDE3 cipher object, in the UNINITIALIZED state. |
Method Summary | |
int |
engineBlockSize()
SPI: Returns the length of an input block, in bytes. |
protected void |
engineInitDecrypt(java.security.Key key)
SPI: Initializes this cipher for decryption, using the specified key. |
void |
engineInitEncrypt(java.security.Key key)
SPI: Initializes this cipher for encryption, using the specified key. |
protected int |
engineUpdate(byte[] in,
int inOffset,
int inLen,
byte[] out,
int outOffset)
SPI: This is the main engine method for updating data. |
Methods inherited from class xjava.security.IJCE_Traceable |
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DES_EDE3()
Method Detail |
public int engineBlockSize()
engineBlockSize
in class Cipher
public void engineInitEncrypt(java.security.Key key) throws java.security.KeyException
engineInitEncrypt
in class Cipher
key
- the key to use for encryption.java.security.KeyException
- if one of the following occurs: protected void engineInitDecrypt(java.security.Key key) throws java.security.KeyException
engineInitDecrypt
in class Cipher
key
- the key to use for decryption.java.security.KeyException
- if one of the following occurs: protected int engineUpdate(byte[] in, int inOffset, int inLen, byte[] out, int outOffset)
in and out may be the same array, and the input and output regions may overlap.
engineUpdate
in class Cipher
in
- the input data.inOffset
- the offset into in specifying where the data starts.inLen
- the length of the subarray.out
- the output array.outOffset
- the offset indicating where to start writing into
the out array.CryptixException
- if the native library is being used, and it
reports an error.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |