Merge pull request #212 from oneru/master

Assorted test suite related fixes
This commit is contained in:
Michael Rash
2016-04-19 20:14:28 -04:00
2 changed files with 10 additions and 10 deletions
+9 -9
View File
@@ -6,7 +6,7 @@
/*
Implementation by the Keccak, Keyak and Ketje Teams, namely, Guido Bertoni,
Joan Daemen, Michaël Peeters, Gilles Van Assche and Ronny Van Keer, hereby
Joan Daemen, Michael Peeters, Gilles Van Assche and Ronny Van Keer, hereby
denoted as "the implementer".
For more information, feedback or questions, please refer to our websites:
@@ -227,27 +227,27 @@ void KeccakF1600_StatePermute(void *state)
UINT8 LFSRstate = 0x01;
for(round=0; round<24; round++) {
{ // === θ step (see [Keccak Reference, Section 2.3.2]) ===
{ // === Theta step (see [Keccak Reference, Section 2.3.2]) ===
tKeccakLane C[5], D;
// Compute the parity of the columns
for(x=0; x<5; x++)
C[x] = readLane(x, 0) ^ readLane(x, 1) ^ readLane(x, 2) ^ readLane(x, 3) ^ readLane(x, 4);
for(x=0; x<5; x++) {
// Compute the θ effect for a given column
// Compute the theta effect for a given column
D = C[(x+4)%5] ^ ROL64(C[(x+1)%5], 1);
// Add the θ effect to the whole column
// Add the theta effect to the whole column
for (y=0; y<5; y++)
XORLane(x, y, D);
}
}
{ // === ρ and π steps (see [Keccak Reference, Sections 2.3.3 and 2.3.4]) ===
{ // === rho and pi steps (see [Keccak Reference, Sections 2.3.3 and 2.3.4]) ===
tKeccakLane current, temp;
// Start at coordinates (1 0)
x = 1; y = 0;
current = readLane(x, y);
// Iterate over ((0 1)(2 3))^t * (1 0) for 0 t 23
// Iterate over ((0 1)(2 3))^t * (1 0) for 0 <= t <= 23
for(t=0; t<24; t++) {
// Compute the rotation constant r = (t+1)(t+2)/2
unsigned int r = ((t+1)*(t+2)/2)%64;
@@ -260,19 +260,19 @@ void KeccakF1600_StatePermute(void *state)
}
}
{ // === χ step (see [Keccak Reference, Section 2.3.1]) ===
{ // === chi step (see [Keccak Reference, Section 2.3.1]) ===
tKeccakLane temp[5];
for(y=0; y<5; y++) {
// Take a copy of the plane
for(x=0; x<5; x++)
temp[x] = readLane(x, y);
// Compute χ on the plane
// Compute chi on the plane
for(x=0; x<5; x++)
writeLane(x, y, temp[x] ^((~temp[(x+1)%5]) & temp[(x+2)%5]));
}
}
{ // === ι step (see [Keccak Reference, Section 2.3.5]) ===
{ // === iota step (see [Keccak Reference, Section 2.3.5]) ===
for(j=0; j<7; j++) {
unsigned int bitPosition = (1<<j)-1; //2^j-1
if (LFSR86540(&LFSRstate))
+1 -1
View File
@@ -5796,7 +5796,7 @@ sub down_interface() {
&start_fwknopd($test_hr);
&run_cmd("$ifconfig_path lo down", $cmd_out_tmp, $curr_test_file);
sleep 1;
sleep 5;
&run_cmd("$ifconfig_path lo up", $cmd_out_tmp, $curr_test_file);
if (&is_fwknopd_running()) {