X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/b817bfc642225b8c3c0b6a7e42d1fb949b61a606..95d9246390251adba7e6e9f0cc70bf0ebe0b2e60:/rijndael-base.h diff --git a/rijndael-base.h b/rijndael-base.h index 684dadb..e3f168d 100644 --- a/rijndael-base.h +++ b/rijndael-base.h @@ -7,7 +7,7 @@ * (c) 2001 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,12 +15,12 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * Catacomb is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with Catacomb; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, @@ -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 -------------------------------------------------*/