|
KeccakTools
|
#include <Keccak-fTrailCoreInKernelAtC.h>


Classes | |
| struct | CoreInfo |
Public Member Functions | |
| TrailCoreInKernelAtC (const vector< SliceValue > &backgroundAtA, const vector< SliceValue > &aForbiddenAreaAtB, unsigned int aMaxWeight, const KeccakFDCLC &aParent, KeccakFPropagation::DCorLC aDCorLC) | |
| bool | next () |
| const CoreInfo & | getTopCoreInfo () const |
Protected Member Functions | |
| bool | isStateAtBWellFormed () const |
| bool | canAffordGeneric (unsigned int deltaNrKnotPointsWorkingChain, unsigned int minDeltaNrKnotsOrRuns, unsigned int nrOrbitalPointsPerDeltaChain, unsigned int deltaNrOrbitalPointsWorkingChain) const |
| void | addPoint (const BitPosition &pB, bool toKnotSlice, bool isBackgroundPoint=false) |
| void | removePoint (bool fromKnotSlice) |
| void | convertKnotPointToOrbitalPoint () |
| bool | mayBeEndPoint (const BitPosition &pB) |
| bool | mayBeStartPointSliceAndGoThere (unsigned int &z, bool zIsInitialized) |
| unsigned int | computeLowerWeightAssumingVortexIsAdded () |
Protected Attributes | |
| vector< SliceValue > | partialStateAtD |
| unsigned int | weightAtB |
| unsigned int | knotPointDeficit |
| unsigned int | knotWeightAtBDeficit |
| unsigned int | partialHammingWeightAtD |
| unsigned int | partialNrActiveRowsAtD |
| vector< CoreInfo > | outCore |
Friends | |
| ostream & | operator<< (ostream &fout, const TrailCoreInKernelAtC &aL) |
Class that implements an iterator over states leading to low weight three round trail cores with C in the kernel
| TrailCoreInKernelAtC::TrailCoreInKernelAtC | ( | const vector< SliceValue > & | backgroundAtA, |
| const vector< SliceValue > & | aForbiddenAreaAtB, | ||
| unsigned int | aMaxWeight, | ||
| const KeccakFDCLC & | aParent, | ||
| KeccakFPropagation::DCorLC | aDCorLC | ||
| ) |
Constructor that initializes the attributes. An initial call to next() is necessary for having the first valid state.
| backgroundAtA | The background at A. |
| aTabooAtB | State indicating the bits at B where no active points may be put. |
| aMaxWeight | The maximum propagation weight up to which one must generate all states. |
| aP | Reference to KeccakFTamePropagation instance defining laneSize and LC/DC. |
| void TrailCoreInKernelAtC::addPoint | ( | const BitPosition & | pB, |
| bool | toKnotSlice, | ||
| bool | isBackgroundPoint = false |
||
| ) | [protected, virtual] |
See TrailCore3Rounds::addPoint().
Implements TrailCore3Rounds.
| bool TrailCoreInKernelAtC::canAffordGeneric | ( | unsigned int | deltaNrKnotPointsWorkingChain, |
| unsigned int | minDeltaNrKnotsOrRuns, | ||
| unsigned int | nrOrbitalPointsPerDeltaChain, | ||
| unsigned int | deltaNrOrbitalPointsWorkingChain | ||
| ) | const [protected, virtual] |
See TrailCore3Rounds::canAffordGeneric(). Here, minDeltaNrKnotsOrRuns indicates the number of knots that will be added.
Implements TrailCore3Rounds.
| unsigned int TrailCoreInKernelAtC::computeLowerWeightAssumingVortexIsAdded | ( | ) | [protected] |
This method returns a lower bound for the weight of the state resulting from adding to the state at the back of outCore the vortex specified at the back of outCore. The lower bound is based on the propagation weight at B and the Hamming weights and number of active rows at A and D.
| void TrailCoreInKernelAtC::convertKnotPointToOrbitalPoint | ( | ) | [protected, virtual] |
See TrailCore3Rounds::convertKnotPointToOrbitalPoint().
Implements TrailCore3Rounds.
| const TrailCoreInKernelAtC::CoreInfo & TrailCoreInKernelAtC::getTopCoreInfo | ( | ) | const |
This method returns a constant reference to the current vortex being iterated.
| bool TrailCoreInKernelAtC::isStateAtBWellFormed | ( | ) | const [protected, virtual] |
See TrailCore3Rounds::isStateAtBWellFormed().
Implements TrailCore3Rounds.
| bool TrailCoreInKernelAtC::mayBeEndPoint | ( | const BitPosition & | pB | ) | [protected, virtual] |
See TrailCore3Rounds::mayBeEndPoint().
Implements TrailCore3Rounds.
| bool TrailCoreInKernelAtC::mayBeStartPointSliceAndGoThere | ( | unsigned int & | z, |
| bool | zIsInitialized | ||
| ) | [protected, virtual] |
See TrailCore3Rounds::maybeStartPointSliceAndGoThere().
Implements TrailCore3Rounds.
| bool TrailCoreInKernelAtC::next | ( | ) |
This method generates the next three-round trail core inside the kernel at C with weight not above maxWeight.
| void TrailCoreInKernelAtC::removePoint | ( | bool | fromKnotSlice | ) | [protected, virtual] |
See TrailCore3Rounds::removePoint().
Implements TrailCore3Rounds.
| ostream& operator<< | ( | ostream & | fout, |
| const TrailCoreInKernelAtC & | aL | ||
| ) | [friend] |
This function displays the attributes of the TrailCoreInKernelAtC object.
unsigned int TrailCoreInKernelAtC::knotPointDeficit [protected] |
This attribute keeps track of the minimum number of knot points that must be added before the state at B is tame.
unsigned int TrailCoreInKernelAtC::knotWeightAtBDeficit [protected] |
This attribute keeps track of the increase in weight due to the knot points that must be added before the state at B is tame.
vector<CoreInfo> TrailCoreInKernelAtC::outCore [protected] |
This attribute keeps track of the iteration, in the light of adding vortices. When a vortex is added, a new entry is pushed back. The first element contains a state with knots or an empty state.
unsigned int TrailCoreInKernelAtC::partialHammingWeightAtD [protected] |
This attribute keeps track of the Hamming weight of partialStateAtD. It is redundant and there for optimization.
unsigned int TrailCoreInKernelAtC::partialNrActiveRowsAtD [protected] |
This attribute keeps track of the number of active rows in partialStateAtD. It is redundant and there for optimization.
vector<SliceValue> TrailCoreInKernelAtC::partialStateAtD [protected] |
State at D that has as active bits the orbital points at B only.
unsigned int TrailCoreInKernelAtC::weightAtB [protected] |
This attribute keeps track of the propagation weight of stateAtB. It is redundant and there for optimization.