Update aes.c

This commit is contained in:
kokke 2014-06-03 00:08:07 +02:00
parent cde9cf2e65
commit 6acd653909
1 changed files with 4 additions and 4 deletions

8
aes.c
View File

@ -179,10 +179,10 @@ static void KeyExpansion()
tempa[3] = getSBoxValue(tempa[3]);
}
}
RoundKey[ i * 4 ] = RoundKey[(i - Nk) * 4 ] ^ tempa[0];
RoundKey[(i * 4) + 1] = RoundKey[(i - Nk) * (4 + 1)] ^ tempa[1];
RoundKey[(i * 4) + 2] = RoundKey[(i - Nk) * (4 + 2)] ^ tempa[2];
RoundKey[(i * 4) + 3] = RoundKey[(i - Nk) * (4 + 3)] ^ tempa[3];
RoundKey[i * 4] = RoundKey[(i - Nk) * 4] ^ tempa[0];
RoundKey[i * 4 + 1] = RoundKey[(i - Nk) * 4 + 1] ^ tempa[1];
RoundKey[i * 4 + 2] = RoundKey[(i - Nk) * 4 + 2] ^ tempa[2];
RoundKey[i * 4 + 3] = RoundKey[(i - Nk) * 4 + 3] ^ tempa[3];
}
}