bitstat.txt
b4307fa8ca2d11f47ea9810fa39e7862e0eed356321940c6bd070207f2dcb98c
BITSTAT
Generate bit-wise [and byte-wise] statistics of a file
Usage: bitstat [-v] file (normal usage)
or: bitstat [-v] < file
or: type file | bitstat [-v]
or: bitstat [-v] (keyboard input (terminate with ^Z))
Version: 1.0
Platform: DOS (but easily transportable)
Compiler: gcc (but easily transportable)
Date: 07/09/96
License: Freeware
Author: Winston Rayburn
----------------------------------------------------------------------------
This C program generates bit-wise statistics about a file for cryptoanalytic
purposes.
These statistics give a general idea about the value of bits and bytes in
file relative to true noise. It gives a total picture of bit and byte-
value distribution throughout the file, but only bit-position distribution
within the file. Thus, it is useful in seeing a files total deviance from
noise, and to a lesser extent, its compressability.
Uses include testing random number generators (e.g. 'pgp +MAKERANDOM=10000
random.dat'), the effectiveness of compression algorithms, character
distribution in cyphertexts, output analysis of stego programs, etc.
Generally, the program is invoked by "bitstat file.dat", to give a bit-wise
report. "bitstat -v file.dat" gives both a byte and bit-wise report.
To use keyboard input rather than a file, simply type "bitstat". Everything
typed will then be taken as input until the first control-z. To terminate
input, type "^z<enter>" (control-z, enter) on a line by itself.
----------------------------------------------------------------------------
Example output:
----------------------------------------------------------------------------
bitstat.c contains 5343 bytes (42744 bits)
BIT ANALYSIS
Value Count Percentage
----- ----- ----------
one 15441 36.124367
zero 27303 63.875633
Bit Count Percentage
--- ----- ----------
msb 7 0 0.000000
6 2116 39.603218
5 4669 87.385361
4 1207 22.590305
3 2051 38.386673
2 1706 31.929628
1 1859 34.793186
lsb 0 1833 34.306568
1/0 ratio 0.565542
Deviance from unity -0.434458
----------------------------------------------------------------------------
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2
mQEFAzHjBUYAAAEHwMb/7+41kLlWzWCEWKd77KcH0QC4P1JA14ZEoITV+80bAzI4
eW6fEoagvBAp/1YJhttNastcvO6jNW1VQpt81GOnBpQKJ77NDuSYE79mntLCmmst
i5urVHEa/yOW+jMQhQ+kXnJnVCxKlXg7hRVZdonv9jmakOTgYbHvPfME/YfeYcpl
o8TiEud7flzMm1Mh1Qd1kxnXhZYsCNKQj7FQ6LXt0iY3AqlUty3zv0+Gh3/AJhvY
NAwgomnAUNWIiQa/xslVblKGNqhbvpsAZ7o+hU/k3XTGzmriz+aqgFekc8MpXXKp
k5IiW1QXPX4YG5er3M0jZejG4eKBAAURtA9XaW5zdG9uIFJheWJ1cm4=
=YI8u
-----END PGP PUBLIC KEY BLOCK-----