Note
this implementation is based on information prior to final NIST publication.
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private long | |
| private long | |
| private long | |
| private static final byte[] | |
| private int | |
| private long | |
| private int | |
| private boolean | |
| private static final byte[] | |
| private static final int | |
| private static final int | |
| private static final int[] | |
| private int | |
| private static final byte[] | |
| pack-priv static byte[][] | |
| private byte[] | |
| pack-priv static byte[][] | |
| private byte[] | |
| private static final byte[] | |
| private long[][] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | RijndaelEngine(int
the blocksize in bits, must be 128, 192, or 256. blockBits)basic constructor - set the cipher up for a given blocksize |
| Modifier and Type | Method and Description |
|---|---|
| private long | |
| private void | |
| private void | |
| private long[][] | generateWorkingKey(byte[] key)
Calculate the necessary round keys The number of calculations depends on keyBits and blockBits |
| public String | getAlgorithmName()
Implements org. |
| public int | getBlockSize()
Implements org. |
| public void | init(boolean
whether or not we are for encryption. forEncryption, CipherParameters the parameters required to set up the cipher. params)Implements org. |
| private void | InvMixColumn()
Mix the bytes of every column in a linear way This is the opposite operation of Mixcolumn |
| private void | |
| private void | |
| private byte | |
| private byte | |
| private byte | |
| private byte | |
| private byte | |
| private byte | |
| private void | |
| public int | processBlock(byte[]
the array containing the input data. in, int offset into the in array the data starts at. inOff, byte[] the array the output data will be copied into. out, int the offset into the out array the output will start at. outOff)Implements org. |
| public void | |
| private long | |
| private void | |
| private void | Substitution(byte[] box)
Replace every byte of the input by the byte at that place in the nonlinear S-box |
| private void |
| A0 | back to summary |
|---|---|
| private long A0 | |
| A1 | back to summary |
|---|---|
| private long A1 | |
| A2 | back to summary |
|---|---|
| private long A2 | |
| A3 | back to summary |
|---|---|
| private long A3 | |
| aLogtable | back to summary |
|---|---|
| private static final byte[] aLogtable | |
| BC | back to summary |
|---|---|
| private int BC | |
| BC_MASK | back to summary |
|---|---|
| private long BC_MASK | |
| blockBits | back to summary |
|---|---|
| private int blockBits | |
| forEncryption | back to summary |
|---|---|
| private boolean forEncryption | |
| logtable | back to summary |
|---|---|
| private static final byte[] logtable | |
| MAXKC | back to summary |
|---|---|
| private static final int MAXKC | |
| MAXROUNDS | back to summary |
|---|---|
| private static final int MAXROUNDS | |
| rcon | back to summary |
|---|---|
| private static final int[] rcon | |
| ROUNDS | back to summary |
|---|---|
| private int ROUNDS | |
| S | back to summary |
|---|---|
| private static final byte[] S | |
| shifts0 | back to summary |
|---|---|
| pack-priv static byte[][] shifts0 | |
| shifts0SC | back to summary |
|---|---|
| private byte[] shifts0SC | |
| shifts1 | back to summary |
|---|---|
| pack-priv static byte[][] shifts1 | |
| shifts1SC | back to summary |
|---|---|
| private byte[] shifts1SC | |
| Si | back to summary |
|---|---|
| private static final byte[] Si | |
| workingKey | back to summary |
|---|---|
| private long[][] workingKey | |
| RijndaelEngine | back to summary |
|---|---|
| public RijndaelEngine() default constructor - 128 bit block size. | |
| RijndaelEngine | back to summary |
|---|---|
| public RijndaelEngine(int blockBits) basic constructor - set the cipher up for a given blocksize
| |
| applyS | back to summary |
|---|---|
| private long applyS(long r, byte[] box) | |
| decryptBlock | back to summary |
|---|---|
| private void decryptBlock(long[][] rk) | |
| encryptBlock | back to summary |
|---|---|
| private void encryptBlock(long[][] rk) | |
| generateWorkingKey | back to summary |
|---|---|
| private long[][] generateWorkingKey(byte[] key) Calculate the necessary round keys The number of calculations depends on keyBits and blockBits | |
| 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(boolean forEncryption, CipherParameters params) Implements org. initialise a Rijndael cipher.
| |
| InvMixColumn | back to summary |
|---|---|
| private void InvMixColumn() Mix the bytes of every column in a linear way This is the opposite operation of Mixcolumn | |
| KeyAddition | back to summary |
|---|---|
| private void KeyAddition(long[] rk) xor corresponding text input and round key input bytes | |
| MixColumn | back to summary |
|---|---|
| private void MixColumn() Mix the bytes of every column in a linear way | |
| mul0x2 | back to summary |
|---|---|
| private byte mul0x2(int b) multiply two elements of GF(2^m) needed for MixColumn and InvMixColumn | |
| mul0x3 | back to summary |
|---|---|
| private byte mul0x3(int b) | |
| mul0x9 | back to summary |
|---|---|
| private byte mul0x9(int b) | |
| mul0xb | back to summary |
|---|---|
| private byte mul0xb(int b) | |
| mul0xd | back to summary |
|---|---|
| private byte mul0xd(int b) | |
| mul0xe | back to summary |
|---|---|
| private byte mul0xe(int b) | |
| packBlock | back to summary |
|---|---|
| private void packBlock(byte[] bytes, int off) | |
| processBlock | back to summary |
|---|---|
| public int processBlock(byte[] in, int inOff, byte[] out, int outOff) 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). | |
| shift | back to summary |
|---|---|
| private long shift(long r, int shift) | |
| ShiftRow | back to summary |
|---|---|
| private void ShiftRow(byte[] shiftsSC) Row 0 remains unchanged The other three rows are shifted a variable amount | |
| Substitution | back to summary |
|---|---|
| private void Substitution(byte[] box) Replace every byte of the input by the byte at that place in the nonlinear S-box | |
| unpackBlock | back to summary |
|---|---|
| private void unpackBlock(byte[] bytes, int off) | |