.gitignore: Ignore `ylwrap'.
[u/mdw/catacomb] / square-mktab.c
index a80aceb..f1c7f02 100644 (file)
@@ -1,13 +1,13 @@
 /* -*-c-*-
  *
- * $Id: square-mktab.c,v 1.2 2000/08/04 18:03:19 mdw Exp $
+ * $Id: square-mktab.c,v 1.3 2004/04/08 01:36:15 mdw Exp $
  *
  * Build precomputed tables for the Square block cipher
  *
  * (c) 2000 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Catacomb.
  *
  * 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: square-mktab.c,v $
- * Revision 1.2  2000/08/04 18:03:19  mdw
- * Fix comment describing the field in which inversion is done.
- *
- * Revision 1.1  2000/07/27 18:10:27  mdw
- * Build precomuted tables for Square.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <assert.h>
@@ -95,7 +84,7 @@ static unsigned mul(unsigned x, unsigned y, unsigned m)
  * tables.  Let %$a$% be an element of the finite field.  If the inverse of
  * %$a$% is %$a^{-1}$%, then %$\log a a^{-1} = 0$%.  Hence
  * %$\log a = -\log a^{-1}$%.  This saves fiddling about with Euclidean
- * algorithm. 
+ * algorithm.
  */
 
 #define S_MOD 0x1f5
@@ -295,11 +284,11 @@ int main(void)
                                                                        \\\n\
   { ", stdout);
       } else if (i % 4 == 3)
-       fputs(",                        \\\n    ", stdout);
+       fputs(",                        \\\n    ", stdout);
       else
        fputs(", ", stdout);
     }
-  }  
+  }
 
   fputs("\
 #define SQUARE_TI {                                                    \\\n\
@@ -315,7 +304,7 @@ int main(void)
                                                                        \\\n\
   { ", stdout);
       } else if (i % 4 == 3)
-       fputs(",                        \\\n    ", stdout);
+       fputs(",                        \\\n    ", stdout);
       else
        fputs(", ", stdout);
     }
@@ -340,11 +329,11 @@ int main(void)
                                                                        \\\n\
   { ", stdout);
       } else if (i % 4 == 3)
-       fputs(",                        \\\n    ", stdout);
+       fputs(",                        \\\n    ", stdout);
       else
        fputs(", ", stdout);
     }
-  }  
+  }
 
   /* --- Round constants --- */
 
@@ -362,7 +351,7 @@ int main(void)
       fputs(",                 \\\n  ", stdout);
     else
       fputs(", ", stdout);
-  }  
+  }
 
   /* --- Done --- */