aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/aes/aes.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-17 02:03:18 +0000
committerlloyd <[email protected]>2008-11-17 02:03:18 +0000
commitd333291a4d7c3823c3c667af479c5c08de1af990 (patch)
treecda184086f28fabe607781892a6c4bb138dd7273 /src/block/aes/aes.cpp
parentdff993e8ab2a0b744d2787d61b1a2a55af51c3b8 (diff)
Fix indexing in EK_[4-7]
Diffstat (limited to 'src/block/aes/aes.cpp')
-rw-r--r--src/block/aes/aes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp
index ff298a697..ea56ca22a 100644
--- a/src/block/aes/aes.cpp
+++ b/src/block/aes/aes.cpp
@@ -36,10 +36,10 @@ void AES::enc(const byte in[], byte out[]) const
const u32bit EK_2 = EK[4*j+2];
const u32bit EK_3 = EK[4*j+3];
- const u32bit EK_4 = EK[4*j+0];
- const u32bit EK_5 = EK[4*j+1];
- const u32bit EK_6 = EK[4*j+2];
- const u32bit EK_7 = EK[4*j+3];
+ const u32bit EK_4 = EK[4*j+4];
+ const u32bit EK_5 = EK[4*j+5];
+ const u32bit EK_6 = EK[4*j+6];
+ const u32bit EK_7 = EK[4*j+7];
T0 = TE0[get_byte(0, B0)] ^ TE1[get_byte(1, B1)] ^
TE2[get_byte(2, B2)] ^ TE3[get_byte(3, B3)] ^ EK_0;