From f063d2a6683320dd8b484d6bf77703bb8e9f9556 Mon Sep 17 00:00:00 2001 From: kokke Date: Fri, 30 May 2014 14:51:16 +0200 Subject: Update aes.c --- aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aes.c b/aes.c index 3025fa4..0ef4994 100644 --- a/aes.c +++ b/aes.c @@ -180,7 +180,7 @@ static void KeyExpansion() tempa[3] = getSBoxValue(tempa[3]); } } - RoundKey[ i * 4 ] = RoundKey[ i - Nk * 4 ] ^ tempa[0]; + 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]; -- cgit v1.2.3