aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/rijndael.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/rijndael.c')
-rw-r--r--cipher/rijndael.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/cipher/rijndael.c b/cipher/rijndael.c
index a30cd5fee..c9eecbe95 100644
--- a/cipher/rijndael.c
+++ b/cipher/rijndael.c
@@ -1764,7 +1764,7 @@ do_setkey (RIJNDAEL_context *ctx, const byte *key, const unsigned keylen)
for (i = 0; i < keylen; i++) {
k[i >> 2][i & 3] = key[i];
}
- #define W (ctx->keySched)
+#define W (ctx->keySched)
for (j = KC-1; j >= 0; j--) {
*((u32*)tk[j]) = *((u32*)k[j]);
@@ -1819,7 +1819,7 @@ do_setkey (RIJNDAEL_context *ctx, const byte *key, const unsigned keylen)
}
}
- #undef W
+#undef W
return 0;
}
@@ -1844,7 +1844,7 @@ prepare_decryption( RIJNDAEL_context *ctx )
*((u32*)ctx->keySched2[r][2]) = *((u32*)ctx->keySched[r][2]);
*((u32*)ctx->keySched2[r][3]) = *((u32*)ctx->keySched[r][3]);
}
- #define W (ctx->keySched2)
+#define W (ctx->keySched2)
for (r = 1; r < ctx->ROUNDS; r++) {
w = W[r][0];
*((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
@@ -1862,7 +1862,7 @@ prepare_decryption( RIJNDAEL_context *ctx )
*((u32*)w) = *((u32*)U1[w[0]]) ^ *((u32*)U2[w[1]])
^ *((u32*)U3[w[2]]) ^ *((u32*)U4[w[3]]);
}
- #undef W
+#undef W
}
@@ -1874,7 +1874,7 @@ do_encrypt (const RIJNDAEL_context *ctx, byte *b, const byte *a)
int r;
byte temp[4][4];
int ROUNDS = ctx->ROUNDS;
- #define rk (ctx->keySched)
+#define rk (ctx->keySched)
*((u32*)temp[0]) = *((u32*)(a )) ^ *((u32*)rk[0][0]);
*((u32*)temp[1]) = *((u32*)(a+ 4)) ^ *((u32*)rk[0][1]);
@@ -1944,7 +1944,7 @@ do_encrypt (const RIJNDAEL_context *ctx, byte *b, const byte *a)
*((u32*)(b+ 4)) ^= *((u32*)rk[ROUNDS][1]);
*((u32*)(b+ 8)) ^= *((u32*)rk[ROUNDS][2]);
*((u32*)(b+12)) ^= *((u32*)rk[ROUNDS][3]);
- #undef rk
+#undef rk
}
static void
@@ -1959,7 +1959,7 @@ rijndael_encrypt (const RIJNDAEL_context *ctx, byte *b, const byte *a)
static void
do_decrypt (RIJNDAEL_context *ctx, byte *b, const byte *a)
{
- #define rk (ctx->keySched2)
+#define rk (ctx->keySched2)
int ROUNDS = ctx->ROUNDS;
int r;
byte temp[4][4];
@@ -2038,7 +2038,7 @@ do_decrypt (RIJNDAEL_context *ctx, byte *b, const byte *a)
*((u32*)(b+ 4)) ^= *((u32*)rk[0][1]);
*((u32*)(b+ 8)) ^= *((u32*)rk[0][2]);
*((u32*)(b+12)) ^= *((u32*)rk[0][3]);
- #undef rk
+#undef rk
}
static void
@@ -2223,12 +2223,3 @@ gnupgext_enum_func ( int what, int *sequence, int *class, int *vers )
return ret;
}
#endif
-
-
-
-
-
-
-
-
-