KeccakTools

TrailCoreInKernelAtC Class Reference

#include <Keccak-fTrailCoreInKernelAtC.h>

Inheritance diagram for TrailCoreInKernelAtC:
Collaboration diagram for TrailCoreInKernelAtC:

List of all members.

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 CoreInfogetTopCoreInfo () 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< SliceValuepartialStateAtD
unsigned int weightAtB
unsigned int knotPointDeficit
unsigned int knotWeightAtBDeficit
unsigned int partialHammingWeightAtD
unsigned int partialNrActiveRowsAtD
vector< CoreInfooutCore

Friends

ostream & operator<< (ostream &fout, const TrailCoreInKernelAtC &aL)

Detailed Description

Class that implements an iterator over states leading to low weight three round trail cores with C in the kernel


Constructor & Destructor Documentation

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.

Parameters:
backgroundAtAThe background at A.
aTabooAtBState indicating the bits at B where no active points may be put.
aMaxWeightThe maximum propagation weight up to which one must generate all states.
aPReference to KeccakFTamePropagation instance defining laneSize and LC/DC.

Member Function Documentation

void TrailCoreInKernelAtC::addPoint ( const BitPosition pB,
bool  toKnotSlice,
bool  isBackgroundPoint = false 
) [protected, virtual]
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]
const TrailCoreInKernelAtC::CoreInfo & TrailCoreInKernelAtC::getTopCoreInfo ( ) const

This method returns a constant reference to the current vortex being iterated.

bool TrailCoreInKernelAtC::isStateAtBWellFormed ( ) const [protected, virtual]
bool TrailCoreInKernelAtC::mayBeEndPoint ( const BitPosition pB) [protected, virtual]
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.

Returns:
Whether a trail core was found.
void TrailCoreInKernelAtC::removePoint ( bool  fromKnotSlice) [protected, virtual]

Friends And Related Function Documentation

ostream& operator<< ( ostream &  fout,
const TrailCoreInKernelAtC aL 
) [friend]

This function displays the attributes of the TrailCoreInKernelAtC object.


Member Data Documentation

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.

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.

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.

This attribute keeps track of the Hamming weight of partialStateAtD. It is redundant and there for optimization.

This attribute keeps track of the number of active rows in partialStateAtD. It is redundant and there for optimization.

State at D that has as active bits the orbital points at B only.

  • If DC: partialStateAtD is λ(stateAtB, restriced to orbital points).
  • If LC: partialStateAtD is λ-1(stateAtB, restriced to orbital points).
unsigned int TrailCoreInKernelAtC::weightAtB [protected]

This attribute keeps track of the propagation weight of stateAtB. It is redundant and there for optimization.


The documentation for this class was generated from the following files: