Keccak-fParity.h File Reference

#include "Keccak-fParts.h"

Include dependency graph for Keccak-fParity.h:

This graph shows which files directly or indirectly include this file:


Typedefs

typedef UINT64 PackedParity

Functions

PackedParity getPackedParityFromParity (const RowValue &parity, const unsigned int &z)
RowValue getParityFromPackedParity (const PackedParity &parity, const unsigned int &z)
PackedParity packParity (const vector< RowValue > &parity)
void unpackParity (PackedParity packedParity, vector< RowValue > &parity, unsigned int laneSize)
RowValue getParity (SliceValue slice)
PackedParity getParity (const vector< SliceValue > &state)
void getParity (const vector< SliceValue > &state, vector< RowValue > &parity)
void getParity (const vector< LaneValue > &state, vector< LaneValue > &parity)
void fromSlicesToSheetsParity (const vector< RowValue > &paritySlices, vector< LaneValue > &paritySheets)
void fromSheetsToSlicesParity (const vector< LaneValue > &paritySheets, vector< RowValue > &paritySlices)

Typedef Documentation

The PackedParity type is one 64-bit word, containing up to 8 5-bit parities, coming from up to 8 slices. The parity of slice z is in the bits corresponding to (0-31)*32^z in the word. See getPackedParityFromParity() and getParityFromPackedParity() for more details.


Function Documentation

void fromSheetsToSlicesParity ( const vector< LaneValue > &  paritySheets,
vector< RowValue > &  paritySlices 
)

This function converts the parity of a state expressed as a vector of parities of each sheet into a vector of parities of each slice.

Precondition:
paritySlices must be initialized with the correct size (lane size).
Parameters:
paritySheets The parity as a vector of lanes.
paritySlices The parity as a vector of rows.

void fromSlicesToSheetsParity ( const vector< RowValue > &  paritySlices,
vector< LaneValue > &  paritySheets 
)

This function converts the parity of a state expressed as a vector of parities of each slice into a vector of parities of each sheet.

Parameters:
paritySlices The parity as a vector of rows.
paritySheets The parity as a vector of lanes.

PackedParity getPackedParityFromParity ( const RowValue parity,
const unsigned int &  z 
) [inline]

This function returns a PackedParity with bits set to zero, except for parity at slice z, with a given value.

Parameters:
parity The parity of the slice with z-coordinate z.
z The z-coordinate.
Returns:
A value of type PackedParity with the given parity.

void getParity ( const vector< LaneValue > &  state,
vector< LaneValue > &  parity 
)

This function computes the parity of a state, sheet per sheet, and returns it in a vector of lane values.

Parameters:
state The value of the state given as a vector of lanes.
parity The parity of state as a vector of 5 lane values.

void getParity ( const vector< SliceValue > &  state,
vector< RowValue > &  parity 
)

This function computes the parity of a state, slice per slice, and returns it in a vector of row values.

Parameters:
state The value of the state given as a vector of slices.
parity The parity of state as a vector of row values.

PackedParity getParity ( const vector< SliceValue > &  state  ) 

This function computes the parity of a state, and returns it in a PackedParity.

Parameters:
state The value of the state given as a vector of slices.
Returns:
The parity of the state.

RowValue getParity ( SliceValue  slice  ) 

This function computes the parity of a slice.

Parameters:
slice The value of a slice.
Returns:
The parity of the given slice value.

RowValue getParityFromPackedParity ( const PackedParity parity,
const unsigned int &  z 
) [inline]

This function returns the parity value at slice z in the given PackedParity value.

Parameters:
parity The parity to read from.
z The z-coordinate to read from.
Returns:
The parity of the slice with z-coordinate z.

PackedParity packParity ( const vector< RowValue > &  parity  ) 

This function converts from a vector of parity of each slice to a PackedParity value.

Parameters:
parity The parity of a state as vector of row values.
Returns:
The parity of a state as a PackedParity value.

void unpackParity ( PackedParity  packedParity,
vector< RowValue > &  parity,
unsigned int  laneSize 
)

This function converts from a PackedParity value to a vector of parity of each slice.

Parameters:
packedParity The parity of a state as a PackedParity value.
parity The parity of a state as a vector of row values.
laneSize The number of slices.


Generated on Thu Jun 17 18:20:32 2010 for KeccakTools by  doxygen 1.5.6