| Modifier and Type | Field and Description |
|---|---|
| private static final int | BASEROUNDS
Base number of rounds. |
| private static final int | BLOCKSIZE
BlockSize. |
| private static final int[] | DELTA
Delta values. |
| private boolean | forEncryption
Are we encrypting? |
| private static final int | KEY0
keyIndex0. |
| private static final int | KEY1
keyIndex1. |
| private static final int | KEY2
keyIndex2. |
| private static final int | KEY3
keyIndex3. |
| private static final int | KEY4
keyIndex4. |
| private static final int | KEY5
keyIndex5. |
| private static final int | MASK128
Mask for mod 4. |
| private static final int | MASK256
Mask for mod 8. |
| private static final int | NUMWORDS
Number of words in state. |
| private static final int | NUMWORDS128
Number of words in 128-bit key. |
| private static final int | NUMWORDS192
Number of words in 192-bit key. |
| private static final int | NUMWORDS256
Number of words in 256-bit key. |
| private static final int | ROT1
Rotate1. |
| private static final int | ROT11
Rotate11. |
| private static final int | ROT13
Rotate13. |
| private static final int | ROT17
Rotate17. |
| private static final int | ROT3
Rotate3. |
| private static final int | ROT5
Rotate5. |
| private static final int | ROT6
Rotate6. |
| private static final int | ROT9
Rotate9. |
| private final int[] | theBlock
The work buffer. |
| private int[][] | theRoundKeys
The round keys. |
| private int | theRounds
The # of rounds. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static int | Returns: the lengththe buffer pBuffer)Obtain buffer length (allowing for null). |
| private static void | checkBuffer(final byte[]
the buffer pBuffer, final int the offset pOffset, final boolean is this an output buffer? pOutput)Check buffer. |
| private int | Returns: the bytes processedthe input buffer pInput, final int the input offset pInOff, final byte[] the output offset pOutput, final int the output offset pOutOff)Decrypt a block. |
| private void | |
| private int | Returns: the bytes processedthe input buffer pInput, final int the input offset pInOff, final byte[] the output offset pOutput, final int the output offset pOutOff)Encrypt a block. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public String | getAlgorithmName()
Implements org. |
| public int | getBlockSize()
Implements org. |
| public void | init(final boolean
if true the cipher is initialised for
encryption, if false for decryption. pEncrypt, final CipherParameters the key and other data required by the cipher. pParams)Implements org. |
| private static int | |
| public int | processBlock(final byte[]
the array containing the input data. pInput, final int offset into the in array the data starts at. pInOff, final byte[] the array the output data will be copied into. pOutput, final int the offset into the out array the output will start at. pOutOff)Implements org. |
| public void | |
| private static int | |
| private static int | Returns: the rotated valuethe value to rotate pValue, final int the # of bits to rotate pBits)rotate left. |
| private static int | Returns: the rotated valuethe value to rotate pValue, final int the # of bits to rotate pBits)rotate right. |
| BASEROUNDS | back to summary |
|---|---|
| private static final int BASEROUNDS Base number of rounds. | |
| BLOCKSIZE | back to summary |
|---|---|
| private static final int BLOCKSIZE BlockSize. | |
| DELTA | back to summary |
|---|---|
| private static final int[] DELTA Delta values. | |
| forEncryption | back to summary |
|---|---|
| private boolean forEncryption Are we encrypting? | |
| KEY0 | back to summary |
|---|---|
| private static final int KEY0 keyIndex0. | |
| KEY1 | back to summary |
|---|---|
| private static final int KEY1 keyIndex1. | |
| KEY2 | back to summary |
|---|---|
| private static final int KEY2 keyIndex2. | |
| KEY3 | back to summary |
|---|---|
| private static final int KEY3 keyIndex3. | |
| KEY4 | back to summary |
|---|---|
| private static final int KEY4 keyIndex4. | |
| KEY5 | back to summary |
|---|---|
| private static final int KEY5 keyIndex5. | |
| MASK128 | back to summary |
|---|---|
| private static final int MASK128 Mask for mod 4. | |
| MASK256 | back to summary |
|---|---|
| private static final int MASK256 Mask for mod 8. | |
| NUMWORDS | back to summary |
|---|---|
| private static final int NUMWORDS Number of words in state. | |
| NUMWORDS128 | back to summary |
|---|---|
| private static final int NUMWORDS128 Number of words in 128-bit key. | |
| NUMWORDS192 | back to summary |
|---|---|
| private static final int NUMWORDS192 Number of words in 192-bit key. | |
| NUMWORDS256 | back to summary |
|---|---|
| private static final int NUMWORDS256 Number of words in 256-bit key. | |
| ROT1 | back to summary |
|---|---|
| private static final int ROT1 Rotate1. | |
| ROT11 | back to summary |
|---|---|
| private static final int ROT11 Rotate11. | |
| ROT13 | back to summary |
|---|---|
| private static final int ROT13 Rotate13. | |
| ROT17 | back to summary |
|---|---|
| private static final int ROT17 Rotate17. | |
| ROT3 | back to summary |
|---|---|
| private static final int ROT3 Rotate3. | |
| ROT5 | back to summary |
|---|---|
| private static final int ROT5 Rotate5. | |
| ROT6 | back to summary |
|---|---|
| private static final int ROT6 Rotate6. | |
| ROT9 | back to summary |
|---|---|
| private static final int ROT9 Rotate9. | |
| theBlock | back to summary |
|---|---|
| private final int[] theBlock The work buffer. | |
| theRoundKeys | back to summary |
|---|---|
| private int[][] theRoundKeys The round keys. | |
| theRounds | back to summary |
|---|---|
| private int theRounds The # of rounds. | |
| LEAEngine | back to summary |
|---|---|
| public LEAEngine() Constructor. | |
| bufLength | back to summary |
|---|---|
| private static int bufLength(final byte[] pBuffer) Obtain buffer length (allowing for null).
| |
| checkBuffer | back to summary |
|---|---|
| private static void checkBuffer(final byte[] pBuffer, final int pOffset, final boolean pOutput) Check buffer.
| |
| decryptBlock | back to summary |
|---|---|
| private int decryptBlock(final byte[] pInput, final int pInOff, final byte[] pOutput, final int pOutOff) Decrypt a block.
| |
| decryptRound | back to summary |
|---|---|
| private void decryptRound(final int pRound) Decrypt a round.
| |
| encryptBlock | back to summary |
|---|---|
| private int encryptBlock(final byte[] pInput, final int pInOff, final byte[] pOutput, final int pOutOff) Encrypt a block.
| |
| encryptRound | back to summary |
|---|---|
| private void encryptRound(final int pRound) Encrypt a round.
| |
| generate128RoundKeys | back to summary |
|---|---|
| private void generate128RoundKeys(final int[] pWork) Generate the round keys from 128-bit key.
| |
| generate192RoundKeys | back to summary |
|---|---|
| private void generate192RoundKeys(final int[] pWork) Generate the round keys from 192-bit key.
| |
| generate256RoundKeys | back to summary |
|---|---|
| private void generate256RoundKeys(final int[] pWork) Generate the round keys from 256-bit key.
| |
| generateRoundKeys | back to summary |
|---|---|
| private void generateRoundKeys(final byte[] pKey) Generate the round keys.
| |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. Return the name of the algorithm the cipher implements.
| |
| getBlockSize | back to summary |
|---|---|
| public int getBlockSize() Implements org. Doc from org. Return the block size for this cipher (in bytes).
| |
| init | back to summary |
|---|---|
| public void init(final boolean pEncrypt, final CipherParameters pParams) Implements org. Doc from org. Initialise the cipher.
| |
| leftIndex | back to summary |
|---|---|
| private static int leftIndex(final int pIndex) Return the left of an index.
| |
| processBlock | back to summary |
|---|---|
| public int processBlock(final byte[] pInput, final int pInOff, final byte[] pOutput, final int pOutOff) Implements org. Doc from org. Process one block of input from the array in and write it to the out array.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. Reset the cipher. After resetting the cipher is in the same state as it was after the last init (if there was one). | |
| rightIndex | back to summary |
|---|---|
| private static int rightIndex(final int pIndex) Return the left of an index.
| |
| rol32 | back to summary |
|---|---|
| private static int rol32(final int pValue, final int pBits) rotate left.
| |
| ror32 | back to summary |
|---|---|
| private static int ror32(final int pValue, final int pBits) rotate right.
| |