KeccakTools

KeccakFTwoRoundTrailCoreWithGivenParityIterator Class Reference

#include <Keccak-fTrailCoreParity.h>

Inheritance diagram for KeccakFTwoRoundTrailCoreWithGivenParityIterator:
Collaboration diagram for KeccakFTwoRoundTrailCoreWithGivenParityIterator:

List of all members.

Public Member Functions

 KeccakFTwoRoundTrailCoreWithGivenParityIterator (const KeccakFPropagation &aDCorLC, const vector< RowValue > &aParity, int aMaxWeight, bool aOrbitals=true)

Protected Member Functions

bool pushValueInAffectedColumn (const ColumnPosition &columnBeforeTheta, ColumnValue valueBeforeTheta)
bool pushBitInUnaffectedOddColumn (const ColumnPosition &columnBeforeTheta, unsigned int y)
bool pushOrbitalInUnaffectedColumn (const OrbitalPosition &orbital)
void pop ()
void getTrail ()

Protected Attributes

int maxWeight
stack< StateAsVectorOfSlicesstack_stateAtA
stack< StateAsVectorOfSlicesstack_stateAtB
stack< unsigned int > stack_weight

Detailed Description

This class iterates on all 2-round trail cores with a given parity, such that the weight of the core is not greater than a given value.


Constructor & Destructor Documentation

KeccakFTwoRoundTrailCoreWithGivenParityIterator::KeccakFTwoRoundTrailCoreWithGivenParityIterator ( const KeccakFPropagation aDCorLC,
const vector< RowValue > &  aParity,
int  aMaxWeight,
bool  aOrbitals = true 
)

The constructor.

Parameters:
DCorLCThe propagation context of the trail, as a reference to a KeccakFPropagation object.
aParityThe parity as a vector of row values.
aOrbitalsSee KeccakFTrailWithGivenParityIterator::KeccakFTrailWithGivenParityIterator().
aMaxWeightThe maximum trail core weight w(a)+wrev-1(a)).

Member Function Documentation

void KeccakFTwoRoundTrailCoreWithGivenParityIterator::getTrail ( ) [protected, virtual]

This abstract method is called to populate the trail attribute.

Implements KeccakFTrailWithGivenParityIterator.

void KeccakFTwoRoundTrailCoreWithGivenParityIterator::pop ( ) [protected, virtual]

This abstract method is called when the iteration removes active bits added, corresponding to a call either to pushValueInAffectedColumn(), pushBitInUnaffectedOddColumn() or pushOrbitalInUnaffectedColumn(), as on a stack.

Implements KeccakFTrailWithGivenParityIterator.

bool KeccakFTwoRoundTrailCoreWithGivenParityIterator::pushBitInUnaffectedOddColumn ( const ColumnPosition columnBeforeTheta,
unsigned int  y 
) [protected, virtual]

This abstract method is called when the iteration adds an active bit in an unaffected odd column. It returns true iff the budget allows this addition. If this method returns true, the pop() method will later be called to remove the active bit. If this method returns false, the caller understands that nothing changed.

Parameters:
columnBeforeThetaThe column position before θ.
yThe y coordinate of the bit before θ.
Returns:
True iff the active bit could and was added.

Implements KeccakFTrailWithGivenParityIterator.

bool KeccakFTwoRoundTrailCoreWithGivenParityIterator::pushOrbitalInUnaffectedColumn ( const OrbitalPosition orbital) [protected, virtual]

This abstract method is called when the iteration adds an active pair of bits, called an orbital. It returns true iff the budget allows this addition. If this method returns true, the pop() method will later be called to remove the active bits. If this method returns false, the caller understands that nothing changed.

Parameters:
orbitalThe orbital position before θ.
Returns:
True iff the active bits could and were added.

Implements KeccakFTrailWithGivenParityIterator.

bool KeccakFTwoRoundTrailCoreWithGivenParityIterator::pushValueInAffectedColumn ( const ColumnPosition columnBeforeTheta,
ColumnValue  value 
) [protected, virtual]

This abstract method is called when the iteration adds active bits in an affected column. It returns true iff the budget allows this addition. If this method returns true, the pop() method will later be called to remove these active bits. If this method returns false, the caller understands that nothing changed.

Parameters:
columnBeforeThetaThe column position before θ.
valueThe value of the column before θ.
Returns:
True iff the active bits could and were added.

Implements KeccakFTrailWithGivenParityIterator.


Member Data Documentation


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