From 6a7eabbfee8c8df1a21f3da6e0fd5643c40ee607 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 14 Oct 2021 00:20:14 +0200 Subject: some fixes Signed-off-by: Toni Uhlig --- aes.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'aes.c') diff --git a/aes.c b/aes.c index 4a3550d..bd94b01 100644 --- a/aes.c +++ b/aes.c @@ -41,11 +41,10 @@ typedef struct { void aes_init(); aes_ctx_t *aes_alloc_ctx(unsigned char *key, size_t keyLen); -inline unsigned long aes_subword(unsigned long w); -inline unsigned long aes_rotword(unsigned long w); +unsigned long aes_subword(unsigned long w); +unsigned long aes_rotword(unsigned long w); void aes_keyexpansion(aes_ctx_t *ctx); - -inline unsigned char aes_mul_manual(unsigned char a, unsigned char b); // use aes_mul instead +unsigned char aes_mul_manual(unsigned char a, unsigned char b); // use aes_mul instead void aes_subbytes(aes_ctx_t *ctx); void aes_shiftrows(aes_ctx_t *ctx); @@ -204,7 +203,7 @@ aes_ctx_t *aes_alloc_ctx(unsigned char *key, size_t keyLen) return ctx; } -inline unsigned long aes_subword(unsigned long w) +unsigned long aes_subword(unsigned long w) { return g_aes_sbox[w & 0x000000ff] | (g_aes_sbox[(w & 0x0000ff00) >> 8] << 8) | @@ -212,7 +211,7 @@ inline unsigned long aes_subword(unsigned long w) (g_aes_sbox[(w & 0xff000000) >> 24] << 24); } -inline unsigned long aes_rotword(unsigned long w) +unsigned long aes_rotword(unsigned long w) { // May seem a bit different from the spec // It was changed because unsigned long is represented with little-endian convention on x86 @@ -241,7 +240,7 @@ void aes_keyexpansion(aes_ctx_t *ctx) } } -inline unsigned char aes_mul_manual(unsigned char a, unsigned char b) +unsigned char aes_mul_manual(unsigned char a, unsigned char b) { register unsigned short ac; register unsigned char ret; -- cgit v1.2.3