Lines Matching refs:state
78 void KeccakP1600_Initialize(void *state) in KeccakP1600_Initialize() argument
80 memset(state, 0, 200); in KeccakP1600_Initialize()
82 ((UINT64*)state)[ 1] = ~(UINT64)0; in KeccakP1600_Initialize()
83 ((UINT64*)state)[ 2] = ~(UINT64)0; in KeccakP1600_Initialize()
84 ((UINT64*)state)[ 8] = ~(UINT64)0; in KeccakP1600_Initialize()
85 ((UINT64*)state)[12] = ~(UINT64)0; in KeccakP1600_Initialize()
86 ((UINT64*)state)[17] = ~(UINT64)0; in KeccakP1600_Initialize()
87 ((UINT64*)state)[20] = ~(UINT64)0; in KeccakP1600_Initialize()
93 void KeccakP1600_AddBytesInLane(void *state, unsigned int lanePosition, const unsigned char *data, … in KeccakP1600_AddBytesInLane() argument
112 ((UINT64*)state)[lanePosition] ^= lane; in KeccakP1600_AddBytesInLane()
117 void KeccakP1600_AddLanes(void *state, const unsigned char *data, unsigned int laneCount) in KeccakP1600_AddLanes() argument
123 if (((((uintptr_t)state) & 7) != 0) || ((((uintptr_t)data) & 7) != 0)) { in KeccakP1600_AddLanes()
125 ((unsigned char*)state)[i] ^= data[i]; in KeccakP1600_AddLanes()
133 ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0]; in KeccakP1600_AddLanes()
134 ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1]; in KeccakP1600_AddLanes()
135 ((UINT64*)state)[i+2] ^= ((UINT64*)data)[i+2]; in KeccakP1600_AddLanes()
136 ((UINT64*)state)[i+3] ^= ((UINT64*)data)[i+3]; in KeccakP1600_AddLanes()
137 ((UINT64*)state)[i+4] ^= ((UINT64*)data)[i+4]; in KeccakP1600_AddLanes()
138 ((UINT64*)state)[i+5] ^= ((UINT64*)data)[i+5]; in KeccakP1600_AddLanes()
139 ((UINT64*)state)[i+6] ^= ((UINT64*)data)[i+6]; in KeccakP1600_AddLanes()
140 ((UINT64*)state)[i+7] ^= ((UINT64*)data)[i+7]; in KeccakP1600_AddLanes()
143 ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0]; in KeccakP1600_AddLanes()
144 ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1]; in KeccakP1600_AddLanes()
145 ((UINT64*)state)[i+2] ^= ((UINT64*)data)[i+2]; in KeccakP1600_AddLanes()
146 ((UINT64*)state)[i+3] ^= ((UINT64*)data)[i+3]; in KeccakP1600_AddLanes()
149 ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0]; in KeccakP1600_AddLanes()
150 ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1]; in KeccakP1600_AddLanes()
153 ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0]; in KeccakP1600_AddLanes()
168 ((UINT64*)state)[i] ^= lane; in KeccakP1600_AddLanes()
176 void KeccakP1600_AddByte(void *state, unsigned char byte, unsigned int offset) in KeccakP1600_AddByte() argument
180 ((UINT64*)state)[offset/8] ^= lane; in KeccakP1600_AddByte()
186 void KeccakP1600_AddBytes(void *state, const unsigned char *data, unsigned int offset, unsigned int… in KeccakP1600_AddBytes() argument
188 SnP_AddBytes(state, data, offset, length, KeccakP1600_AddLanes, KeccakP1600_AddBytesInLane, 8); in KeccakP1600_AddBytes()
193 void KeccakP1600_OverwriteBytesInLane(void *state, unsigned int lanePosition, const unsigned char *… in KeccakP1600_OverwriteBytesInLane() argument
200 ((unsigned char*)state)[lanePosition*8+offset+i] = ~data[i]; in KeccakP1600_OverwriteBytesInLane()
205 memcpy((unsigned char*)state+lanePosition*8+offset, data, length); in KeccakP1600_OverwriteBytesInLane()
214 void KeccakP1600_OverwriteLanes(void *state, const unsigned char *data, unsigned int laneCount) in KeccakP1600_OverwriteLanes() argument
222 ((UINT64*)state)[lanePosition] = ~((const UINT64*)data)[lanePosition]; in KeccakP1600_OverwriteLanes()
224 ((UINT64*)state)[lanePosition] = ((const UINT64*)data)[lanePosition]; in KeccakP1600_OverwriteLanes()
226 memcpy(state, data, laneCount*8); in KeccakP1600_OverwriteLanes()
235 void KeccakP1600_OverwriteBytes(void *state, const unsigned char *data, unsigned int offset, unsign… in KeccakP1600_OverwriteBytes() argument
237 …SnP_OverwriteBytes(state, data, offset, length, KeccakP1600_OverwriteLanes, KeccakP1600_OverwriteB… in KeccakP1600_OverwriteBytes()
242 void KeccakP1600_OverwriteWithZeroes(void *state, unsigned int byteCount) in KeccakP1600_OverwriteWithZeroes() argument
250 ((UINT64*)state)[lanePosition] = ~0; in KeccakP1600_OverwriteWithZeroes()
252 ((UINT64*)state)[lanePosition] = 0; in KeccakP1600_OverwriteWithZeroes()
256 memset((unsigned char*)state+lanePosition*8, 0xFF, byteCount%8); in KeccakP1600_OverwriteWithZeroes()
258 memset((unsigned char*)state+lanePosition*8, 0, byteCount%8); in KeccakP1600_OverwriteWithZeroes()
261 memset(state, 0, byteCount); in KeccakP1600_OverwriteWithZeroes()
270 void KeccakP1600_Permute_Nrounds(void *state, unsigned int nr) in KeccakP1600_Permute_Nrounds() argument
274 UINT64 *stateAsLanes = (UINT64*)state; in KeccakP1600_Permute_Nrounds()
284 void KeccakP1600_Permute_24rounds(void *state) in KeccakP1600_Permute_24rounds() argument
290 UINT64 *stateAsLanes = (UINT64*)state; in KeccakP1600_Permute_24rounds()
299 void KeccakP1600_Permute_12rounds(void *state) in KeccakP1600_Permute_12rounds() argument
305 UINT64 *stateAsLanes = (UINT64*)state; in KeccakP1600_Permute_12rounds()
314 void KeccakP1600_ExtractBytesInLane(const void *state, unsigned int lanePosition, unsigned char *da… in KeccakP1600_ExtractBytesInLane() argument
316 UINT64 lane = ((UINT64*)state)[lanePosition]; in KeccakP1600_ExtractBytesInLane()
349 void KeccakP1600_ExtractLanes(const void *state, unsigned char *data, unsigned int laneCount) in KeccakP1600_ExtractLanes() argument
352 memcpy(data, state, laneCount*8); in KeccakP1600_ExtractLanes()
357 fromWordToBytes(data+(i*8), ((const UINT64*)state)[i]); in KeccakP1600_ExtractLanes()
383 void KeccakP1600_ExtractBytes(const void *state, unsigned char *data, unsigned int offset, unsigned… in KeccakP1600_ExtractBytes() argument
385 …SnP_ExtractBytes(state, data, offset, length, KeccakP1600_ExtractLanes, KeccakP1600_ExtractBytesIn… in KeccakP1600_ExtractBytes()
390 void KeccakP1600_ExtractAndAddBytesInLane(const void *state, unsigned int lanePosition, const unsig… in KeccakP1600_ExtractAndAddBytesInLane() argument
392 UINT64 lane = ((UINT64*)state)[lanePosition]; in KeccakP1600_ExtractAndAddBytesInLane()
417 void KeccakP1600_ExtractAndAddLanes(const void *state, const unsigned char *input, unsigned char *o… in KeccakP1600_ExtractAndAddLanes() argument
427 ((UINT64*)output)[i] = ((UINT64*)input)[i] ^ ((const UINT64*)state)[i]; in KeccakP1600_ExtractAndAddLanes()
429 fromWordToBytes(temp, ((const UINT64*)state)[i]); in KeccakP1600_ExtractAndAddLanes()
458 void KeccakP1600_ExtractAndAddBytes(const void *state, const unsigned char *input, unsigned char *o… in KeccakP1600_ExtractAndAddBytes() argument
460 …SnP_ExtractAndAddBytes(state, input, output, offset, length, KeccakP1600_ExtractAndAddLanes, Kecca… in KeccakP1600_ExtractAndAddBytes()
465 size_t KeccakF1600_FastLoop_Absorb(void *state, unsigned int laneCount, const unsigned char *data, … in KeccakF1600_FastLoop_Absorb() argument
472 UINT64 *stateAsLanes = (UINT64*)state; in KeccakF1600_FastLoop_Absorb()