X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/69c31e3bc1a3dbb3b4a93c91b2daf2129875ff63..38333dc20fd97363d6e54260a5edeafe8a5adb1a:/rijndael-base.h diff --git a/rijndael-base.h b/rijndael-base.h index 684dadb..f88b2f7 100644 --- a/rijndael-base.h +++ b/rijndael-base.h @@ -57,12 +57,12 @@ extern const octet rijndael_rcon[]; /*----- Handy macros ------------------------------------------------------*/ #define SUB(s, a, b, c, d) \ - (s[U8((a) >> 0)] << 0 | s[U8((b) >> 8)] << 8 | \ - s[U8((c) >> 16)] << 16 | s[U8((d) >> 24)] << 24) + (s[U8((a) >> 24)] << 24 | s[U8((b) >> 16)] << 16 | \ + s[U8((c) >> 8)] << 8 | s[U8((d) >> 0)] << 0) #define MIX(t, a, b, c, d) \ - (t[0][U8((a) >> 0)] ^ t[1][U8((b) >> 8)] ^ \ - t[2][U8((c) >> 16)] ^ t[3][U8((d) >> 24)]) + (t[0][U8((a) >> 24)] ^ t[1][U8((b) >> 16)] ^ \ + t[2][U8((c) >> 8)] ^ t[3][U8((d) >> 0)]) /*----- That's all, folks -------------------------------------------------*/