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


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< StateAsVectorOfSlices > | stack_stateAtA |
| stack< StateAsVectorOfSlices > | stack_stateAtB |
| stack< unsigned int > | stack_weight |
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.
| KeccakFTwoRoundTrailCoreWithGivenParityIterator::KeccakFTwoRoundTrailCoreWithGivenParityIterator | ( | const KeccakFPropagation & | aDCorLC, |
| const vector< RowValue > & | aParity, | ||
| int | aMaxWeight, | ||
| bool | aOrbitals = true |
||
| ) |
The constructor.
| DCorLC | The propagation context of the trail, as a reference to a KeccakFPropagation object. |
| aParity | The parity as a vector of row values. |
| aOrbitals | See KeccakFTrailWithGivenParityIterator::KeccakFTrailWithGivenParityIterator(). |
| aMaxWeight | The maximum trail core weight w(a)+wrev(λ-1(a)). |
| 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.
| columnBeforeTheta | The column position before θ. |
| y | The y coordinate of the bit before θ. |
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.
| orbital | The orbital position before θ. |
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.
| columnBeforeTheta | The column position before θ. |
| value | The value of the column before θ. |
Implements KeccakFTrailWithGivenParityIterator.
int KeccakFTwoRoundTrailCoreWithGivenParityIterator::maxWeight [protected] |
stack<StateAsVectorOfSlices> KeccakFTwoRoundTrailCoreWithGivenParityIterator::stack_stateAtA [protected] |
stack<StateAsVectorOfSlices> KeccakFTwoRoundTrailCoreWithGivenParityIterator::stack_stateAtB [protected] |
stack<unsigned int> KeccakFTwoRoundTrailCoreWithGivenParityIterator::stack_weight [protected] |