summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2014-05-30 14:51:16 +0200
committerkokke <spam@rowdy.dk>2014-05-30 14:51:16 +0200
commitf063d2a6683320dd8b484d6bf77703bb8e9f9556 (patch)
treeba49af69b0f9f3f5aa4e2c0ed6a4c2abbc90f2b5
parentUpdate README.md (diff)
downloadtiny-AES-c-f063d2a6683320dd8b484d6bf77703bb8e9f9556.tar
tiny-AES-c-f063d2a6683320dd8b484d6bf77703bb8e9f9556.tar.gz
tiny-AES-c-f063d2a6683320dd8b484d6bf77703bb8e9f9556.tar.bz2
tiny-AES-c-f063d2a6683320dd8b484d6bf77703bb8e9f9556.tar.lz
tiny-AES-c-f063d2a6683320dd8b484d6bf77703bb8e9f9556.tar.xz
tiny-AES-c-f063d2a6683320dd8b484d6bf77703bb8e9f9556.tar.zst
tiny-AES-c-f063d2a6683320dd8b484d6bf77703bb8e9f9556.zip
-rw-r--r--aes.c2
1 files changed, 1 insertions, 1 deletions
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];