Trail Class Reference
#include <Keccak-fTrails.h>
List of all members.
Detailed Description
This class implements a container for a differential or linear trail. A trail makes sense only in the context of a
KeccakFPropagation object. The main attribute of the class is the sequence of state values before χ. If S
i =
states[i], the trail is: S
0 χλ S
1 χλ S
2 χλ ... χλ S
n-1, with
n =
states.size().
Constructor & Destructor Documentation
This constructor creates an empty trail.
| Trail::Trail |
( |
istream & |
fin |
) |
|
This constructor loads a trail from an input stream.
- Parameters:
-
| fin | The input stream to read the trail from. |
| Trail::Trail |
( |
const Trail & |
other |
) |
[inline] |
This constructor initializes a trail by copying the trail given in parameter.
- Parameters:
-
| other | The original trail to copy. |
Member Function Documentation
| void Trail::append |
( |
const vector< SliceValue > & |
state, |
|
|
unsigned int |
weight | |
|
) |
| | |
This method appends a state to the end of states, with its corresponding propagation weight.
- Parameters:
-
| state | The state to add. |
| weight | The propagation weight. |
| void Trail::append |
( |
const Trail & |
otherTrail |
) |
|
This method appends another trail to the current trail.
- Parameters:
-
| otherTrail | The trail to append. |
| void Trail::prepend |
( |
const vector< SliceValue > & |
state, |
|
|
unsigned int |
weight | |
|
) |
| | |
This method inserts a state at the beginning of states, with its corresponding propagation weight.
- Parameters:
-
| state | The state to add. |
| weight | The propagation weight. |
This method displays the trail for in a human-readable form.
- Parameters:
-
| DCorLC | The propagation context of the trail, as a reference to a KeccakFPropagation object. |
| fout | The stream to display to. |
| void Trail::load |
( |
istream & |
fin |
) |
|
This methods loads the trail from a stream (e.g., file).
- Parameters:
-
| fin | The input stream to read the trail from. |
| void Trail::save |
( |
ostream & |
fout |
) |
const |
This methods outputs the trail to save it in, e.g., a file.
- Parameters:
-
| fout | The stream to save the trail to. |
| UINT64 Trail::produceHumanReadableFile |
( |
const KeccakFPropagation & |
DCorLC, |
|
|
const string & |
fileName, |
|
|
bool |
verbose = true, |
|
|
unsigned int |
maxWeight = 0 | |
|
) |
| | [static] |
This function reads all the trails in a file, checks their consistency and then produces a report. The report is output in a file with the same file name plus ".txt". See also KeccakFPropagation::displayTrailsAndCheck().
- Parameters:
-
- Returns:
- The number of trails read and checked.
Member Data Documentation
This attribute contains the list of states round after round, before χ.
This attribute contains the propagation weights of the states in states. So, weights has the same size as states.
This attribute contains the sum of the weights[i].
The documentation for this class was generated from the following files: