summaryrefslogtreecommitdiff
path: root/aes-set-encrypt-key.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2012-03-31 21:26:07 +0200
committerNiels Möller <nisse@lysator.liu.se>2012-03-31 21:26:07 +0200
commit67cd46aad27bdfee385048d1e256e8a5a03ad22d (patch)
treec766dfa3ca71f99017ac6d374de2a8c884da5685 /aes-set-encrypt-key.c
parentf13fd113b07c351e8024ec85fa339b64c31994cc (diff)
downloadnettle-67cd46aad27bdfee385048d1e256e8a5a03ad22d.tar.gz
Use ROTL32 in the aes code.
Diffstat (limited to 'aes-set-encrypt-key.c')
-rw-r--r--aes-set-encrypt-key.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/aes-set-encrypt-key.c b/aes-set-encrypt-key.c
index 71f9f9f8..dfd102f7 100644
--- a/aes-set-encrypt-key.c
+++ b/aes-set-encrypt-key.c
@@ -32,6 +32,7 @@
#include <assert.h>
#include "aes-internal.h"
+#include "macros.h"
static unsigned
xtime(unsigned x)
@@ -83,7 +84,7 @@ aes_set_encrypt_key(struct aes_ctx *ctx,
temp = ctx->keys[i-1];
if (i % nk == 0)
{
- temp = SUBBYTE(ROTBYTE(temp), aes_sbox) ^ rcon;
+ temp = SUBBYTE(ROTL32(24, temp), aes_sbox) ^ rcon;
rcon = (uint32_t)xtime((uint8_t)rcon&0xff);
}
else if (nk > 6 && (i%nk) == 4)