diff options
author | lloyd <[email protected]> | 2006-08-15 14:17:53 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-08-15 14:17:53 +0000 |
commit | 3ba05971bb1ac7b689a636d78680f3abc1cbf14d (patch) | |
tree | 59e7c3ab09ebe207ba659eef8a97c475732613e7 /src | |
parent | ae95c1e7e4aafe9fe9adafe7ce7b3e4a379de586 (diff) |
Remove some variables we didn't really need in the key schedule
Diffstat (limited to 'src')
-rw-r--r-- | src/aes.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/aes.cpp b/src/aes.cpp index f06518f22..d9f640df0 100644 --- a/src/aes.cpp +++ b/src/aes.cpp @@ -155,13 +155,11 @@ void AES::key(const byte key[], u32bit length) XDK[j+3] = XEK[4*ROUNDS-j+3]; } - const u32bit* TD0 = TD; - const u32bit* TD1 = TD + 256; - const u32bit* TD2 = TD + 512; - const u32bit* TD3 = TD + 768; for(u32bit j = 4; j != length + 24; ++j) - XDK[j] = TD0[SE[get_byte(0, XDK[j])]] ^ TD1[SE[get_byte(1, XDK[j])]] ^ - TD2[SE[get_byte(2, XDK[j])]] ^ TD3[SE[get_byte(3, XDK[j])]]; + XDK[j] = TD[SE[get_byte(0, XDK[j])] + 0] ^ + TD[SE[get_byte(1, XDK[j])] + 256] ^ + TD[SE[get_byte(2, XDK[j])] + 512] ^ + TD[SE[get_byte(3, XDK[j])] + 768]; for(u32bit j = 0; j != 4; ++j) for(u32bit k = 0; k != 4; ++k) |