|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: Source code implementing FIPS 140-1
From: Greg Rose (ggr
qualcomm.com)Date: Thu Jul 20 2000 - 02:04:34 CDT
- Next message: NetSemiconductor.com: "Netsemiconductor.com Mailing Service"
- Previous message: Arnold G. Reinhold: "Re: Extracting Entropy?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
FIPS (Federal Information Processing Standard) 140-1 "Security Requirements
for Cryptographic Modules" specifies a simple standalone test for random
number generators, primarily intended to detect if a hardware generator has
failed in some fashion. However, it is not a terrible test to use if you
have some data and want to see if it is obviously non-random. Just because
a file passes the test, does not of course mean that it actually is random;
a simple LFSR output would generally pass the test.
Freely usable source code implementing this test is at
http://www.home.aone.net.au/qualcomm/fips140.c . It supports a "-v" flag to
produce verbose output about the statistics collected from the sample, and
reports all errors found.
I will add tools to this web page over time, as I get around to
implementing them or making them presentable.
share and enjoy!
Greg.
-------------------
Here is a sample output:
$ gzip <fips140 | fips140 -v
10630 ones
Sample fails monobit test: 10630 ones
Poker test: 266 0x0s
Poker test: 278 0x1s
Poker test: 238 0x2s
Poker test: 271 0x3s
Poker test: 271 0x4s
Poker test: 324 0x5s
Poker test: 316 0x6s
Poker test: 346 0x7s
Poker test: 295 0x8s
Poker test: 298 0x9s
Poker test: 330 0xAs
Poker test: 325 0xBs
Poker test: 333 0xCs
Poker test: 318 0xDs
Poker test: 327 0xEs
Poker test: 464 0xFs
Sample fails poker test: parameter X = 122.259
2599 runs of 1 0s
2295 runs of 1 1s
1105 runs of 2 0s
1180 runs of 2 1s
588 runs of 3 0s
604 runs of 3 1s
290 runs of 4 0s
327 runs of 4 1s
141 runs of 5 0s
198 runs of 5 1s
135 runs of 6 0s
255 runs of 6 1s
Sample fails runs test: too many runs of 6 1s
3 errors found
Greg Rose INTERNET: ggr
Qualcomm.com
Qualcomm Australia VOICE: +61-2-9181-4851 FAX: +61-2-9181-5470
Suite 410, Birkenhead Point, http://people.qualcomm.com/ggr/
Drummoyne NSW 2047 232B EC8F 44C6 C853 D68F E107 E6BF CD2F 1081 A37C
- Next message: NetSemiconductor.com: "Netsemiconductor.com Mailing Service"
- Previous message: Arnold G. Reinhold: "Re: Extracting Entropy?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]