X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/4e66da02f19648ee1be862e67ba1d1fc5549fb7f..ab9168949ec2762698d6293adf17b637f30b891e:/blowfish.c diff --git a/blowfish.c b/blowfish.c index c57ebb2..2750cfb 100644 --- a/blowfish.c +++ b/blowfish.c @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: blowfish.c,v 1.3 2004/04/02 01:03:49 mdw Exp $ + * $Id: blowfish.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * The Blowfish block cipher * * (c) 1998 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,32 +15,18 @@ * 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, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: blowfish.c,v $ - * Revision 1.3 2004/04/02 01:03:49 mdw - * Miscellaneous constification. - * - * Revision 1.2 2000/06/17 10:47:56 mdw - * Tidy round function a little. Support new key size interface. - * - * Revision 1.1 1999/09/03 08:41:11 mdw - * Initial import. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -63,8 +49,8 @@ const octet blowfish_keysz[] = { KSZ_RANGE, BLOWFISH_KEYSZ, 1, 56, 1 }; x ^= *r; \ y ^= ((k->s0[U8(x >> 24)] + \ k->s1[U8(x >> 16)]) ^ \ - k->s2[U8(x >> 8)]) + \ - k->s3[U8(x >> 0)]; \ + k->s2[U8(x >> 8)]) + \ + k->s3[U8(x >> 0)]; \ } while (0) #define EBLK(k, a, b, c, d) do { \