X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/5d14574bbab9c46c38a8ed591099885dbc986bb5..cc3ca08f22460b15423bb88632f3a12741b19003:/fipstest.c diff --git a/fipstest.c b/fipstest.c index 30f270b..4563882 100644 --- a/fipstest.c +++ b/fipstest.c @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: fipstest.c,v 1.3 2000/08/11 21:34:34 mdw Exp $ + * $Id: fipstest.c,v 1.4 2004/04/08 01:36:15 mdw Exp $ * * FIPS140 randomness tests * * (c) 2000 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: fipstest.c,v $ - * Revision 1.3 2000/08/11 21:34:34 mdw - * Change to use the new thresholds given in the draft FIPS140-2. - * - * Revision 1.2 2000/06/17 12:21:39 mdw - * Add braces to shut compiler up. Reformat code slightly. - * - * Revision 1.1 2000/06/17 10:55:38 mdw - * FIPS 140-1 random generator test. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -163,7 +149,7 @@ static unsigned runs(const octet *p) } } } - + if (r >= 26) rc |= FIPSTEST_LONGRUNS; if (r > 6) @@ -180,7 +166,7 @@ static unsigned runs(const octet *p) 111 > f[0][5] || f[0][5] > 201 || 111 > f[1][5] || f[1][5] > 201) rc |= FIPSTEST_RUNS; - return (rc); + return (rc); } /* --- @fipstest@ --- *