The state array is a 4x4 byte matrix to which AES operations are performed; also called a block.
More...
#include <aes.h>
|
| | state_array (const std::string &in, size_t &x) |
| | Initialize a state_array from a string.
|
| |
|
| state_array (const std::string &in) |
| |
|
| state_array (const state_array &arr) |
| |
|
auto & | get () |
| |
|
const auto & | get () const |
| |
|
void | xor_arr (const state_array &arr) |
| |
|
void | shift_r (const size_t &bits) |
| |
| std::string | unravel () const |
| | Unravel the state_array back into a string.
|
| |
| void | AddRoundKey (const uint64_t &round, const std::vector< uint32_t > &keys) |
| | Add the round key.
|
| |
| void | SubBytes () |
| | A invertible, non-linear transformation of the state.
|
| |
| void | InvSubBytes () |
| | : Invert the SubBytes step of AES.
|
| |
| void | ShiftRows () |
| | Cyclically shift the bytes in each row.
|
| |
| void | InvShiftRows () |
| | Invert the cyclical shift in ShiftRows()
|
| |
| void | MixColumns () |
| | Transform each column by a single, fixed matrix.
|
| |
| void | InvMixColumns () |
| | Inverts the column transformation.
|
| |
The state array is a 4x4 byte matrix to which AES operations are performed; also called a block.
For every 16 bytes of input, the state_array organizes these bytes column first, Such that state_array[0] = [0,1,2,3], state_array[1] = [4,5,6,7]
◆ state_array()
| aes::state_array::state_array |
( |
const std::string & | in, |
|
|
size_t & | x ) |
|
inline |
Initialize a state_array from a string.
- Parameters
-
| in | The input string. |
| x | A mutable index of the string, so that multiple arrays can be initialized from the state class. |
◆ AddRoundKey()
| void aes::state_array::AddRoundKey |
( |
const uint64_t & | round, |
|
|
const std::vector< uint32_t > & | keys ) |
|
inline |
Add the round key.
- Parameters
-
| round | The current round. |
| keys | The vector of keys. |
◆ InvMixColumns()
| void aes::state_array::InvMixColumns |
( |
| ) |
|
|
inline |
Inverts the column transformation.
◆ InvShiftRows()
| void aes::state_array::InvShiftRows |
( |
| ) |
|
|
inline |
◆ InvSubBytes()
| void aes::state_array::InvSubBytes |
( |
| ) |
|
|
inline |
: Invert the SubBytes step of AES.
◆ MixColumns()
| void aes::state_array::MixColumns |
( |
| ) |
|
|
inline |
Transform each column by a single, fixed matrix.
◆ ShiftRows()
| void aes::state_array::ShiftRows |
( |
| ) |
|
|
inline |
Cyclically shift the bytes in each row.
◆ SubBytes()
| void aes::state_array::SubBytes |
( |
| ) |
|
|
inline |
A invertible, non-linear transformation of the state.
◆ unravel()
| std::string aes::state_array::unravel |
( |
| ) |
const |
|
inline |
Unravel the state_array back into a string.
- Returns
- The string.
The documentation for this class was generated from the following file: