Class AES
java.lang.Object
com.coderslagoon.crypto.estreamj.ciphers.aes.AES
AES base class, used by both the lean(=small) and the mean(=fast) class;
based on the work of Brian Gladman's optimizations and C code, and the
Bouncy Castle translation to Java
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected intprotected intprotected intprotected intprotected booleanprotected static final intprotected static final intprotected static final intprotected static final int[]protected intprotected static byte[]protected static byte[]protected int[][] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddecryptBlock(int[][] KW) protected abstract voidencryptBlock(int[][] KW) voiderase()protected static final intFFmulX(int x) protected int[][]generateWorkingKey(byte[] key, int ofs, int len, boolean forEncryption) voidinit(boolean forEncryption, byte[] key, int ofs, int len) protected static final intinv_mcol(int x) protected static final intmcol(int x) intprocessBlock(byte[] in, int inOff, byte[] out, int outOff) protected static final intshift(int r, int shift) protected static final intsubWord(int x)
-
Field Details
-
S
protected static byte[] S -
Si
protected static byte[] Si -
rcon
protected static final int[] rcon -
m1
protected static final int m1- See Also:
-
m2
protected static final int m2- See Also:
-
m3
protected static final int m3- See Also:
-
ROUNDS
protected int ROUNDS -
workingKey
protected int[][] workingKey -
C0
protected int C0 -
C1
protected int C1 -
C2
protected int C2 -
C3
protected int C3 -
forEncryption
protected boolean forEncryption -
BLOCK_SIZE
public static final int BLOCK_SIZE- See Also:
-
-
Constructor Details
-
AES
public AES()
-
-
Method Details
-
shift
protected static final int shift(int r, int shift) -
FFmulX
protected static final int FFmulX(int x) -
mcol
protected static final int mcol(int x) -
inv_mcol
protected static final int inv_mcol(int x) -
subWord
protected static final int subWord(int x) -
erase
public void erase() -
generateWorkingKey
protected int[][] generateWorkingKey(byte[] key, int ofs, int len, boolean forEncryption) -
init
public void init(boolean forEncryption, byte[] key, int ofs, int len) -
processBlock
public int processBlock(byte[] in, int inOff, byte[] out, int outOff) -
encryptBlock
protected abstract void encryptBlock(int[][] KW) -
decryptBlock
protected abstract void decryptBlock(int[][] KW)
-