cpython: 68df416e94ba (original) (raw)
--- a/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c +++ b/Modules/_sha3/kcp/KeccakP-1600-inplace32BI.c @@ -188,17 +188,18 @@ void KeccakP1600_AddLanes(void *state, c unsigned int lanePosition; for(lanePosition=0; lanePosition<laneCount; lanePosition++) { UINT8 laneAsBytes[8];
UINT32 low, high, temp, temp0, temp1;[](#l1.7)
UINT32 *stateAsHalfLanes;[](#l1.8) memcpy(laneAsBytes, data+lanePosition*8, 8);[](#l1.9)
UINT32 low = laneAsBytes[0][](#l1.10)
low = laneAsBytes[0][](#l1.11) | ((UINT32)(laneAsBytes[1]) << 8)[](#l1.12) | ((UINT32)(laneAsBytes[2]) << 16)[](#l1.13) | ((UINT32)(laneAsBytes[3]) << 24);[](#l1.14)
UINT32 high = laneAsBytes[4][](#l1.15)
high = laneAsBytes[4][](#l1.16) | ((UINT32)(laneAsBytes[5]) << 8)[](#l1.17) | ((UINT32)(laneAsBytes[6]) << 16)[](#l1.18) | ((UINT32)(laneAsBytes[7]) << 24);[](#l1.19)
UINT32 even, odd, temp, temp0, temp1;[](#l1.20)
UINT32 *stateAsHalfLanes = (UINT32*)state;[](#l1.21)
}stateAsHalfLanes = (UINT32*)state;[](#l1.22) toBitInterleavingAndXOR(low, high, stateAsHalfLanes[lanePosition*2+0], stateAsHalfLanes[lanePosition*2+1], temp, temp0, temp1);[](#l1.23)
#endif @@ -243,17 +244,18 @@ void KeccakP1600_OverwriteLanes(void *st unsigned int lanePosition; for(lanePosition=0; lanePosition<laneCount; lanePosition++) { UINT8 laneAsBytes[8];
UINT32 low, high, temp, temp0, temp1;[](#l1.30)
UINT32 *stateAsHalfLanes;[](#l1.31) memcpy(laneAsBytes, data+lanePosition*8, 8);[](#l1.32)
UINT32 low = laneAsBytes[0][](#l1.33)
low = laneAsBytes[0][](#l1.34) | ((UINT32)(laneAsBytes[1]) << 8)[](#l1.35) | ((UINT32)(laneAsBytes[2]) << 16)[](#l1.36) | ((UINT32)(laneAsBytes[3]) << 24);[](#l1.37)
UINT32 high = laneAsBytes[4][](#l1.38)
high = laneAsBytes[4][](#l1.39) | ((UINT32)(laneAsBytes[5]) << 8)[](#l1.40) | ((UINT32)(laneAsBytes[6]) << 16)[](#l1.41) | ((UINT32)(laneAsBytes[7]) << 24);[](#l1.42)
UINT32 even, odd, temp, temp0, temp1;[](#l1.43)
UINT32 *stateAsHalfLanes = (UINT32*)state;[](#l1.44)
}stateAsHalfLanes = (UINT32*)state;[](#l1.45) toBitInterleavingAndSet(low, high, stateAsHalfLanes[lanePosition*2+0], stateAsHalfLanes[lanePosition*2+1], temp, temp0, temp1);[](#l1.46)
#endif @@ -406,8 +408,8 @@ void KeccakP1600_ExtractAndAddLanes(cons for(lanePosition=0; lanePosition<laneCount; lanePosition++) { UINT32 stateAsHalfLanes = (UINT32)state; UINT32 low, high, temp, temp0, temp1;
UINT8 laneAsBytes[8];[](#l1.53) fromBitInterleaving(stateAsHalfLanes[lanePosition*2], stateAsHalfLanes[lanePosition*2+1], low, high, temp, temp0, temp1);[](#l1.54)
UINT8 laneAsBytes[8];[](#l1.55) laneAsBytes[0] = low & 0xFF;[](#l1.56) laneAsBytes[1] = (low >> 8) & 0xFF;[](#l1.57) laneAsBytes[2] = (low >> 16) & 0xFF;[](#l1.58)