|
Sharkysoft home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lava.security.des.DesEngine
Optimized DES implementation.
Details: DesEngine is an efficient implementation of the DES private key encryption/decryption algorithm described in FIPS PUB 46.
DES is a 64-bit block cipher, which means that it processes data in 64-bit chunks. This implementation allows multiple blocks to be loaded into an array so that the blocks can be processed with a single method call. The encrypted/
initial and final permutations
Optionally, if one is willing to sacrifice perfect conformance to the DES standard in exchange for faster processing, individual instances of DesEngine
can be configured to skip the initial and final permutations. These permutations do not contribute to the security of DES but are part of the standard.
bit ordering
Refer to the package summary for important information regarding bit ordering.
usage
DesEngine
is an implementation of IBlockCipher64
. You must understand the contract specified by that interface before you can have any success using this class. Please read it!
Constructor Summary | |
DesEngine(DesKey key)
Sets key. |
|
DesEngine(DesKey key,
boolean itpe,
boolean ftpe)
Sets key; enables/disables permutations. |
Method Summary | |
void |
decrypt(java.lang.Object src,
java.lang.Object dest,
int length)
Decrypts blocks. |
void |
encrypt(java.lang.Object src,
java.lang.Object dest,
int length)
Encrypts blocks. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DesEngine(DesKey key, boolean itpe, boolean ftpe)
Details: This constructor initializes a new DesEngine
instance and enables or disables the initial and final text permutations.
key
- the encryption keyitpe
- initial text permutation enabledftpe
- final text permutation enabledpublic DesEngine(DesKey key)
Details: This constructor initializes a new DesEngine
instance to perform standard DES encryption/decryption using the specified key.
key
- the encryption keyMethod Detail |
public final void encrypt(java.lang.Object src, java.lang.Object dest, int length)
Details:
See IBlockCipher64 (read all of it!) for a description of this interface method's contract.src
- the source arraydest
- the destination arraylength
- the number of elements in the source arraypublic final void decrypt(java.lang.Object src, java.lang.Object dest, int length)
Details:
See IBlockCipher64 (read all of it!) for a description of this interface method's contract.src
- the source arraydest
- the destination arraylength
- the number of elements in the source array
|
Sharkysoft home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |