Lines Matching refs:state
86 void KeccakP1600_Initialize(void *state) in KeccakP1600_Initialize() argument
88 memset(state, 0, 200); in KeccakP1600_Initialize()
90 ((UINT64*)state)[ 1] = ~(UINT64)0; in KeccakP1600_Initialize()
91 ((UINT64*)state)[ 2] = ~(UINT64)0; in KeccakP1600_Initialize()
92 ((UINT64*)state)[ 8] = ~(UINT64)0; in KeccakP1600_Initialize()
93 ((UINT64*)state)[12] = ~(UINT64)0; in KeccakP1600_Initialize()
94 ((UINT64*)state)[17] = ~(UINT64)0; in KeccakP1600_Initialize()
95 ((UINT64*)state)[20] = ~(UINT64)0; in KeccakP1600_Initialize()
101 void KeccakP1600_AddBytesInLane(void *state, unsigned int lanePosition, const unsigned char *data, … in KeccakP1600_AddBytesInLane() argument
120 ((UINT64*)state)[lanePosition] ^= lane; in KeccakP1600_AddBytesInLane()
126 void KeccakP1600_AddLanes(void *state, const unsigned char *data, unsigned int laneCount) in KeccakP1600_AddLanes() argument
132 if (((((uintptr_t)state) & 7) != 0) || ((((uintptr_t)data) & 7) != 0)) { in KeccakP1600_AddLanes()
134 ((unsigned char*)state)[i] ^= data[i]; in KeccakP1600_AddLanes()
142 ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0]; in KeccakP1600_AddLanes()
143 ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1]; in KeccakP1600_AddLanes()
144 ((UINT64*)state)[i+2] ^= ((UINT64*)data)[i+2]; in KeccakP1600_AddLanes()
145 ((UINT64*)state)[i+3] ^= ((UINT64*)data)[i+3]; in KeccakP1600_AddLanes()
146 ((UINT64*)state)[i+4] ^= ((UINT64*)data)[i+4]; in KeccakP1600_AddLanes()
147 ((UINT64*)state)[i+5] ^= ((UINT64*)data)[i+5]; in KeccakP1600_AddLanes()
148 ((UINT64*)state)[i+6] ^= ((UINT64*)data)[i+6]; in KeccakP1600_AddLanes()
149 ((UINT64*)state)[i+7] ^= ((UINT64*)data)[i+7]; in KeccakP1600_AddLanes()
152 ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0]; in KeccakP1600_AddLanes()
153 ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1]; in KeccakP1600_AddLanes()
154 ((UINT64*)state)[i+2] ^= ((UINT64*)data)[i+2]; in KeccakP1600_AddLanes()
155 ((UINT64*)state)[i+3] ^= ((UINT64*)data)[i+3]; in KeccakP1600_AddLanes()
158 ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0]; in KeccakP1600_AddLanes()
159 ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1]; in KeccakP1600_AddLanes()
162 ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0]; in KeccakP1600_AddLanes()
177 ((UINT64*)state)[i] ^= lane; in KeccakP1600_AddLanes()
185 void KeccakP1600_AddByte(void *state, unsigned char byte, unsigned int offset) in KeccakP1600_AddByte() argument
189 ((UINT64*)state)[offset/8] ^= lane; in KeccakP1600_AddByte()
195 void KeccakP1600_AddBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int… in KeccakP1600_AddBytes() argument
197 SnP_AddBytes(state, data, offset, length, KeccakP1600_AddLanes, KeccakP1600_AddBytesInLane, 8); in KeccakP1600_AddBytes()
202 void KeccakP1600_OverwriteBytesInLane(void *state, unsigned int lanePosition, const unsigned char *… in KeccakP1600_OverwriteBytesInLane() argument
209 ((unsigned char*)state)[lanePosition*8+offset+i] = ~data[i]; in KeccakP1600_OverwriteBytesInLane()
214 memcpy((unsigned char*)state+lanePosition*8+offset, data, length); in KeccakP1600_OverwriteBytesInLane()
223 void KeccakP1600_OverwriteLanes(void *state, const unsigned char *data, unsigned int laneCount) in KeccakP1600_OverwriteLanes() argument
231 ((UINT64*)state)[lanePosition] = ~((const UINT64*)data)[lanePosition]; in KeccakP1600_OverwriteLanes()
233 ((UINT64*)state)[lanePosition] = ((const UINT64*)data)[lanePosition]; in KeccakP1600_OverwriteLanes()
235 memcpy(state, data, laneCount*8); in KeccakP1600_OverwriteLanes()
244 void KeccakP1600_OverwriteBytes(void *state, const unsigned char *data, unsigned int offset, unsign… in KeccakP1600_OverwriteBytes() argument
246 …SnP_OverwriteBytes(state, data, offset, length, KeccakP1600_OverwriteLanes, KeccakP1600_OverwriteB… in KeccakP1600_OverwriteBytes()
251 void KeccakP1600_OverwriteWithZeroes(void *state, unsigned int byteCount) in KeccakP1600_OverwriteWithZeroes() argument
259 ((UINT64*)state)[lanePosition] = ~0; in KeccakP1600_OverwriteWithZeroes()
261 ((UINT64*)state)[lanePosition] = 0; in KeccakP1600_OverwriteWithZeroes()
265 memset((unsigned char*)state+lanePosition*8, 0xFF, byteCount%8); in KeccakP1600_OverwriteWithZeroes()
267 memset((unsigned char*)state+lanePosition*8, 0, byteCount%8); in KeccakP1600_OverwriteWithZeroes()
270 memset(state, 0, byteCount); in KeccakP1600_OverwriteWithZeroes()
279 void KeccakP1600_Permute_Nrounds(void *state, unsigned int nr) in KeccakP1600_Permute_Nrounds() argument
283 UINT64 *stateAsLanes = (UINT64*)state; in KeccakP1600_Permute_Nrounds()
293 void KeccakP1600_Permute_24rounds(void *state) in KeccakP1600_Permute_24rounds() argument
299 UINT64 *stateAsLanes = (UINT64*)state; in KeccakP1600_Permute_24rounds()
308 void KeccakP1600_Permute_12rounds(void *state) in KeccakP1600_Permute_12rounds() argument
314 UINT64 *stateAsLanes = (UINT64*)state; in KeccakP1600_Permute_12rounds()
323 void KeccakP1600_ExtractBytesInLane(const void *state, unsigned int lanePosition, unsigned char *da… in KeccakP1600_ExtractBytesInLane() argument
325 UINT64 lane = ((UINT64*)state)[lanePosition]; in KeccakP1600_ExtractBytesInLane()
358 void KeccakP1600_ExtractLanes(const void *state, unsigned char *data, unsigned int laneCount) in KeccakP1600_ExtractLanes() argument
361 memcpy(data, state, laneCount*8); in KeccakP1600_ExtractLanes()
366 fromWordToBytes(data+(i*8), ((const UINT64*)state)[i]); in KeccakP1600_ExtractLanes()
392 void KeccakP1600_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned… in KeccakP1600_ExtractBytes() argument
394 …SnP_ExtractBytes(state, data, offset, length, KeccakP1600_ExtractLanes, KeccakP1600_ExtractBytesIn… in KeccakP1600_ExtractBytes()
399 void KeccakP1600_ExtractAndAddBytesInLane(const void *state, unsigned int lanePosition, const unsig… in KeccakP1600_ExtractAndAddBytesInLane() argument
401 UINT64 lane = ((UINT64*)state)[lanePosition]; in KeccakP1600_ExtractAndAddBytesInLane()
426 void KeccakP1600_ExtractAndAddLanes(const void *state, const unsigned char *input, unsigned char *o… in KeccakP1600_ExtractAndAddLanes() argument
436 ((UINT64*)output)[i] = ((UINT64*)input)[i] ^ ((const UINT64*)state)[i]; in KeccakP1600_ExtractAndAddLanes()
438 fromWordToBytes(temp, ((const UINT64*)state)[i]); in KeccakP1600_ExtractAndAddLanes()
467 void KeccakP1600_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *o… in KeccakP1600_ExtractAndAddBytes() argument
469 …SnP_ExtractAndAddBytes(state, input, output, offset, length, KeccakP1600_ExtractAndAddLanes, Kecca… in KeccakP1600_ExtractAndAddBytes()
475 size_t KeccakF1600_FastLoop_Absorb(void *state, unsigned int laneCount, const unsigned char *data, … in KeccakF1600_FastLoop_Absorb() argument
482 UINT64 *stateAsLanes = (UINT64*)state; in KeccakF1600_FastLoop_Absorb()