#include <Keccak-fEquations.h>
List of all members.
Public Member Functions |
| KeccakFEquations (unsigned int aWidth, unsigned int aNrRounds=0) |
void | genRoundEquations (ostream &fout, bool forSage=false) const |
void | genComponentEquations (ostream &fout, const string &prefixInput, const string &prefixOutput) const |
void | genAbsoluteValuesBeforeChi (ostream &fout, const vector< LaneValue > &input, const string &prefix) const |
Static Public Member Functions |
static void | initializeState (vector< SymbolicLane > &state, const string &prefix, unsigned int laneSize) |
Protected Member Functions |
void | genEquations (ostream &fout, const vector< SymbolicLane > &state, const string &prefixOutput, bool forSage=false) const |
void | initializeState (vector< SymbolicLane > &state, const string &prefix) const |
Detailed Description
Class implementing equation generation for the Keccak-f permutations.
Constructor & Destructor Documentation
KeccakFEquations::KeccakFEquations |
( |
unsigned int |
aWidth, |
|
|
unsigned int |
aNrRounds = 0 |
|
) |
| |
The constructor. See KeccakF() for more details.
Member Function Documentation
void KeccakFEquations::genAbsoluteValuesBeforeChi |
( |
ostream & |
fout, |
|
|
const vector< LaneValue > & |
input, |
|
|
const string & |
prefix |
|
) |
| const |
Method that, given the input to the chosen Keccak-f permutation, generates initialization equations to set the absolute value just before χ at each round. This can be used in combination with KeccakFDCEquations::buildDCTrailFromPair() and KeccakFDCEquations::genDCEquations() to test that the conditions produced by the latter method are indeed satisfied by a known pair value.
- Parameters:
-
fout | The stream to which the equations are sent. |
input | The input state. |
prefix | The prefix of the variables. |
void KeccakFEquations::genComponentEquations |
( |
ostream & |
fout, |
|
|
const string & |
prefixInput, |
|
|
const string & |
prefixOutput |
|
) |
| const |
Method that generate equations for the mappings θ, ρ, π, χ and ι of the chosen Keccak-f instance.
- Parameters:
-
fout | The stream to which the equations are sent. |
prefixInput | The prefix of the input variables. |
prefixOutput | The prefix of the output variables. |
void KeccakFEquations::genEquations |
( |
ostream & |
fout, |
|
|
const vector< SymbolicLane > & |
state, |
|
|
const string & |
prefixOutput, |
|
|
bool |
forSage = false |
|
) |
| const [protected] |
Internal method to generate the equations from symbolic lanes. The left hand side of the equations are the variables with prefix prefixOutput. The right hand side of the equations are the symbolic bits in the symbolic lanes in state.
- Parameters:
-
fout | The stream to which the equations are sent. |
state | The symbolic input state (right hand side of equations). |
prefixOutput | The prefix of the variables. |
forSage | A Boolean value telling whether the syntax of Sage should be followed. |
void KeccakFEquations::genRoundEquations |
( |
ostream & |
fout, |
|
|
bool |
forSage = false |
|
) |
| const |
Method that generate equations for the rounds of the chosen Keccak-f instance. The variables starting with letter A are the input of round #0. The B's are the output of round #0 and the input of round #1. The C's are the output of round #1 and the input of round #2, etc.
- Parameters:
-
fout | The stream to which the equations are sent. |
forSage | A Boolean value telling whether the syntax of Sage should be followed. |
void KeccakFEquations::initializeState |
( |
vector< SymbolicLane > & |
state, |
|
|
const string & |
prefix, |
|
|
unsigned int |
laneSize |
|
) |
| [static] |
Method that initializes the symbolic bits of a symbolic state with variables using the given prefix.
- Parameters:
-
state | The symbolic state to initialize. |
prefix | The prefix of the variables. |
laneSize | The number of bits per lane. |
void KeccakFEquations::initializeState |
( |
vector< SymbolicLane > & |
state, |
|
|
const string & |
prefix |
|
) |
| const [protected] |
Internal method that initializes the symbolic bits of a symbolic state with variables using the given prefix.
- Parameters:
-
state | The symbolic state to initialize. |
prefix | The prefix of the variables. |
The documentation for this class was generated from the following files: