Last active
June 1, 2018 11:21
-
-
Save kaworu/12a34db590095c92dcc4e6a74ba41c3b to your computer and use it in GitHub Desktop.
dieharder on java's SecureRandom and OpenBSD arc4random(3)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* arc4random.c | |
* | |
* Output a lot of (random) stuff on stdout, written to run on OpenBSD. | |
*/ | |
#include <limits.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sysexits.h> | |
#define CHUNK_SIZE (1024 * 100) /* 100KiB */ | |
int | |
main(int argc, char **argv) | |
{ | |
long long n; | |
size_t nw; | |
uint8_t buf[CHUNK_SIZE]; | |
if (argc != 2 || (n = strtonum(argv[1], 1, LLONG_MAX, NULL)) == 0) | |
errx(EX_USAGE, "usage %s nbytes", getprogname()); | |
while (n >= CHUNK_SIZE) { | |
arc4random_buf(buf, CHUNK_SIZE); | |
nw = fwrite(buf, sizeof(uint8_t), CHUNK_SIZE, stdout); | |
if (nw != CHUNK_SIZE) | |
errx(EX_IOERR, "fwrite"); | |
n -= CHUNK_SIZE; | |
} | |
arc4random_buf(buf, n); | |
if (fwrite(buf, sizeof(uint8_t), n, stdout) != n) | |
errx(EX_IOERR, "fwrite"); | |
return (EX_OK); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% dieharder -a -g file_input_raw -f 500.MiB.java.SecureRandom.bin | |
#=============================================================================# | |
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown # | |
#=============================================================================# | |
rng_name | filename |rands/second| | |
file_input_raw| 500.MiB.java.SecureRandom.bin| 4.76e+07 | | |
#=============================================================================# | |
test_name |ntup| tsamples |psamples| p-value |Assessment | |
#=============================================================================# | |
diehard_birthdays| 0| 100| 100|0.90666348| PASSED | |
diehard_operm5| 0| 1000000| 100|0.71728433| PASSED | |
# The file file_input_raw was rewound 1 times | |
diehard_rank_32x32| 0| 40000| 100|0.67438695| PASSED | |
# The file file_input_raw was rewound 2 times | |
diehard_rank_6x8| 0| 100000| 100|0.25564462| PASSED | |
# The file file_input_raw was rewound 2 times | |
diehard_bitstream| 0| 2097152| 100|0.89073191| PASSED | |
# The file file_input_raw was rewound 4 times | |
diehard_opso| 0| 2097152| 100|0.07671603| PASSED | |
# The file file_input_raw was rewound 5 times | |
diehard_oqso| 0| 2097152| 100|0.69504968| PASSED | |
# The file file_input_raw was rewound 5 times | |
diehard_dna| 0| 2097152| 100|0.44245582| PASSED | |
# The file file_input_raw was rewound 5 times | |
diehard_count_1s_str| 0| 256000| 100|0.50941396| PASSED | |
# The file file_input_raw was rewound 6 times | |
diehard_count_1s_byt| 0| 256000| 100|0.67673372| PASSED | |
# The file file_input_raw was rewound 6 times | |
diehard_parking_lot| 0| 12000| 100|0.94278939| PASSED | |
# The file file_input_raw was rewound 6 times | |
diehard_2dsphere| 2| 8000| 100|0.42329470| PASSED | |
# The file file_input_raw was rewound 6 times | |
diehard_3dsphere| 3| 4000| 100|0.36212849| PASSED | |
# The file file_input_raw was rewound 8 times | |
diehard_squeeze| 0| 100000| 100|0.03960522| PASSED | |
# The file file_input_raw was rewound 8 times | |
diehard_sums| 0| 100| 100|0.02094415| PASSED | |
# The file file_input_raw was rewound 8 times | |
diehard_runs| 0| 100000| 100|0.38644287| PASSED | |
diehard_runs| 0| 100000| 100|0.56200442| PASSED | |
# The file file_input_raw was rewound 9 times | |
diehard_craps| 0| 200000| 100|0.82970714| PASSED | |
diehard_craps| 0| 200000| 100|0.72776690| PASSED | |
# The file file_input_raw was rewound 24 times | |
marsaglia_tsang_gcd| 0| 10000000| 100|0.03245515| PASSED | |
marsaglia_tsang_gcd| 0| 10000000| 100|0.06535721| PASSED | |
# The file file_input_raw was rewound 24 times | |
sts_monobit| 1| 100000| 100|0.45707587| PASSED | |
# The file file_input_raw was rewound 25 times | |
sts_runs| 2| 100000| 100|0.56072841| PASSED | |
# The file file_input_raw was rewound 25 times | |
sts_serial| 1| 100000| 100|0.17349594| PASSED | |
sts_serial| 2| 100000| 100|0.82194209| PASSED | |
sts_serial| 3| 100000| 100|0.76830411| PASSED | |
sts_serial| 3| 100000| 100|0.97710534| PASSED | |
sts_serial| 4| 100000| 100|0.90034007| PASSED | |
sts_serial| 4| 100000| 100|0.91965697| PASSED | |
sts_serial| 5| 100000| 100|0.52100941| PASSED | |
sts_serial| 5| 100000| 100|0.05287188| PASSED | |
sts_serial| 6| 100000| 100|0.17312316| PASSED | |
sts_serial| 6| 100000| 100|0.69703641| PASSED | |
sts_serial| 7| 100000| 100|0.12492193| PASSED | |
sts_serial| 7| 100000| 100|0.68004669| PASSED | |
sts_serial| 8| 100000| 100|0.08276850| PASSED | |
sts_serial| 8| 100000| 100|0.78407490| PASSED | |
sts_serial| 9| 100000| 100|0.28660661| PASSED | |
sts_serial| 9| 100000| 100|0.35819981| PASSED | |
sts_serial| 10| 100000| 100|0.64124036| PASSED | |
sts_serial| 10| 100000| 100|0.92912891| PASSED | |
sts_serial| 11| 100000| 100|0.24334852| PASSED | |
sts_serial| 11| 100000| 100|0.29638603| PASSED | |
sts_serial| 12| 100000| 100|0.25705741| PASSED | |
sts_serial| 12| 100000| 100|0.43234484| PASSED | |
sts_serial| 13| 100000| 100|0.15630843| PASSED | |
sts_serial| 13| 100000| 100|0.84405778| PASSED | |
sts_serial| 14| 100000| 100|0.95240922| PASSED | |
sts_serial| 14| 100000| 100|0.21992070| PASSED | |
sts_serial| 15| 100000| 100|0.30905668| PASSED | |
sts_serial| 15| 100000| 100|0.23058931| PASSED | |
sts_serial| 16| 100000| 100|0.08774939| PASSED | |
sts_serial| 16| 100000| 100|0.25943204| PASSED | |
# The file file_input_raw was rewound 25 times | |
rgb_bitdist| 1| 100000| 100|0.27015324| PASSED | |
# The file file_input_raw was rewound 25 times | |
rgb_bitdist| 2| 100000| 100|0.45938139| PASSED | |
# The file file_input_raw was rewound 26 times | |
rgb_bitdist| 3| 100000| 100|0.48538175| PASSED | |
# The file file_input_raw was rewound 26 times | |
rgb_bitdist| 4| 100000| 100|0.77166873| PASSED | |
# The file file_input_raw was rewound 27 times | |
rgb_bitdist| 5| 100000| 100|0.22626328| PASSED | |
# The file file_input_raw was rewound 28 times | |
rgb_bitdist| 6| 100000| 100|0.27044648| PASSED | |
# The file file_input_raw was rewound 29 times | |
rgb_bitdist| 7| 100000| 100|0.52063921| PASSED | |
# The file file_input_raw was rewound 30 times | |
rgb_bitdist| 8| 100000| 100|0.72194237| PASSED | |
# The file file_input_raw was rewound 31 times | |
rgb_bitdist| 9| 100000| 100|0.73915422| PASSED | |
# The file file_input_raw was rewound 33 times | |
rgb_bitdist| 10| 100000| 100|0.97759407| PASSED | |
# The file file_input_raw was rewound 35 times | |
rgb_bitdist| 11| 100000| 100|0.70012459| PASSED | |
# The file file_input_raw was rewound 36 times | |
rgb_bitdist| 12| 100000| 100|0.41798784| PASSED | |
# The file file_input_raw was rewound 37 times | |
rgb_minimum_distance| 2| 10000| 1000|0.90111974| PASSED | |
# The file file_input_raw was rewound 37 times | |
rgb_minimum_distance| 3| 10000| 1000|0.36977036| PASSED | |
# The file file_input_raw was rewound 37 times | |
rgb_minimum_distance| 4| 10000| 1000|0.38600201| PASSED | |
# The file file_input_raw was rewound 38 times | |
rgb_minimum_distance| 5| 10000| 1000|0.29574333| PASSED | |
# The file file_input_raw was rewound 38 times | |
rgb_permutations| 2| 100000| 100|0.85578324| PASSED | |
# The file file_input_raw was rewound 38 times | |
rgb_permutations| 3| 100000| 100|0.60338760| PASSED | |
# The file file_input_raw was rewound 38 times | |
rgb_permutations| 4| 100000| 100|0.24208375| PASSED | |
# The file file_input_raw was rewound 39 times | |
rgb_permutations| 5| 100000| 100|0.28212752| PASSED | |
# The file file_input_raw was rewound 39 times | |
rgb_lagged_sum| 0| 1000000| 100|0.61789957| PASSED | |
# The file file_input_raw was rewound 41 times | |
rgb_lagged_sum| 1| 1000000| 100|0.79463504| PASSED | |
# The file file_input_raw was rewound 43 times | |
rgb_lagged_sum| 2| 1000000| 100|0.41965545| PASSED | |
# The file file_input_raw was rewound 46 times | |
rgb_lagged_sum| 3| 1000000| 100|0.11616337| PASSED | |
# The file file_input_raw was rewound 50 times | |
rgb_lagged_sum| 4| 1000000| 100|0.45344379| PASSED | |
# The file file_input_raw was rewound 55 times | |
rgb_lagged_sum| 5| 1000000| 100|0.57756742| PASSED | |
# The file file_input_raw was rewound 60 times | |
rgb_lagged_sum| 6| 1000000| 100|0.84796300| PASSED | |
# The file file_input_raw was rewound 66 times | |
rgb_lagged_sum| 7| 1000000| 100|0.00023293| WEAK | |
# The file file_input_raw was rewound 73 times | |
rgb_lagged_sum| 8| 1000000| 100|0.79875339| PASSED | |
# The file file_input_raw was rewound 81 times | |
rgb_lagged_sum| 9| 1000000| 100|0.00027529| WEAK | |
# The file file_input_raw was rewound 89 times | |
rgb_lagged_sum| 10| 1000000| 100|0.58347981| PASSED | |
# The file file_input_raw was rewound 98 times | |
rgb_lagged_sum| 11| 1000000| 100|0.00379515| WEAK | |
# The file file_input_raw was rewound 108 times | |
rgb_lagged_sum| 12| 1000000| 100|0.23052529| PASSED | |
# The file file_input_raw was rewound 119 times | |
rgb_lagged_sum| 13| 1000000| 100|0.58813443| PASSED | |
# The file file_input_raw was rewound 130 times | |
rgb_lagged_sum| 14| 1000000| 100|0.38662802| PASSED | |
# The file file_input_raw was rewound 142 times | |
rgb_lagged_sum| 15| 1000000| 100|0.00000000| FAILED | |
# The file file_input_raw was rewound 155 times | |
rgb_lagged_sum| 16| 1000000| 100|0.67143898| PASSED | |
# The file file_input_raw was rewound 169 times | |
rgb_lagged_sum| 17| 1000000| 100|0.13198301| PASSED | |
# The file file_input_raw was rewound 184 times | |
rgb_lagged_sum| 18| 1000000| 100|0.83900569| PASSED | |
# The file file_input_raw was rewound 199 times | |
rgb_lagged_sum| 19| 1000000| 100|0.06336791| PASSED | |
# The file file_input_raw was rewound 215 times | |
rgb_lagged_sum| 20| 1000000| 100|0.96807955| PASSED | |
# The file file_input_raw was rewound 232 times | |
rgb_lagged_sum| 21| 1000000| 100|0.69898110| PASSED | |
# The file file_input_raw was rewound 249 times | |
rgb_lagged_sum| 22| 1000000| 100|0.67608280| PASSED | |
# The file file_input_raw was rewound 268 times | |
rgb_lagged_sum| 23| 1000000| 100|0.00000960| WEAK | |
# The file file_input_raw was rewound 287 times | |
rgb_lagged_sum| 24| 1000000| 100|0.00000000| FAILED | |
# The file file_input_raw was rewound 306 times | |
rgb_lagged_sum| 25| 1000000| 100|0.62580240| PASSED | |
# The file file_input_raw was rewound 327 times | |
rgb_lagged_sum| 26| 1000000| 100|0.76073412| PASSED | |
# The file file_input_raw was rewound 348 times | |
rgb_lagged_sum| 27| 1000000| 100|0.16223968| PASSED | |
# The file file_input_raw was rewound 371 times | |
rgb_lagged_sum| 28| 1000000| 100|0.56268171| PASSED | |
# The file file_input_raw was rewound 393 times | |
rgb_lagged_sum| 29| 1000000| 100|0.02239340| PASSED | |
# The file file_input_raw was rewound 417 times | |
rgb_lagged_sum| 30| 1000000| 100|0.98873911| PASSED | |
# The file file_input_raw was rewound 441 times | |
rgb_lagged_sum| 31| 1000000| 100|0.00000000| FAILED | |
# The file file_input_raw was rewound 467 times | |
rgb_lagged_sum| 32| 1000000| 100|0.44930701| PASSED | |
# The file file_input_raw was rewound 467 times | |
rgb_kstest_test| 0| 10000| 1000|0.16572888| PASSED | |
# The file file_input_raw was rewound 468 times | |
dab_bytedistrib| 0| 51200000| 1|0.95280608| PASSED | |
# The file file_input_raw was rewound 468 times | |
dab_dct| 256| 50000| 1|0.84231740| PASSED | |
Preparing to run test 207. ntuple = 0 | |
# The file file_input_raw was rewound 469 times | |
dab_filltree| 32| 15000000| 1|0.78822775| PASSED | |
dab_filltree| 32| 15000000| 1|0.84579613| PASSED | |
Preparing to run test 208. ntuple = 0 | |
# The file file_input_raw was rewound 469 times | |
dab_filltree2| 0| 5000000| 1|0.43980785| PASSED | |
dab_filltree2| 1| 5000000| 1|0.19694109| PASSED | |
Preparing to run test 209. ntuple = 0 | |
# The file file_input_raw was rewound 470 times | |
dab_monobit2| 12| 65000000| 1|0.47132700| PASSED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% dieharder -a -g file_input_raw -f 500.MiB.OpenBSD.arc4random.bin | |
#=============================================================================# | |
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown # | |
#=============================================================================# | |
rng_name | filename |rands/second| | |
file_input_raw| 500.MiB.OpenBSD.arc4random.bin| 5.39e+07 | | |
#=============================================================================# | |
test_name |ntup| tsamples |psamples| p-value |Assessment | |
#=============================================================================# | |
diehard_birthdays| 0| 100| 100|0.14918853| PASSED | |
diehard_operm5| 0| 1000000| 100|0.20153728| PASSED | |
# The file file_input_raw was rewound 1 times | |
diehard_rank_32x32| 0| 40000| 100|0.78517773| PASSED | |
# The file file_input_raw was rewound 2 times | |
diehard_rank_6x8| 0| 100000| 100|0.88617529| PASSED | |
# The file file_input_raw was rewound 2 times | |
diehard_bitstream| 0| 2097152| 100|0.97463885| PASSED | |
# The file file_input_raw was rewound 4 times | |
diehard_opso| 0| 2097152| 100|0.13855209| PASSED | |
# The file file_input_raw was rewound 5 times | |
diehard_oqso| 0| 2097152| 100|0.81694970| PASSED | |
# The file file_input_raw was rewound 5 times | |
diehard_dna| 0| 2097152| 100|0.60891908| PASSED | |
# The file file_input_raw was rewound 5 times | |
diehard_count_1s_str| 0| 256000| 100|0.74269882| PASSED | |
# The file file_input_raw was rewound 6 times | |
diehard_count_1s_byt| 0| 256000| 100|0.58762950| PASSED | |
# The file file_input_raw was rewound 6 times | |
diehard_parking_lot| 0| 12000| 100|0.98270555| PASSED | |
# The file file_input_raw was rewound 6 times | |
diehard_2dsphere| 2| 8000| 100|0.56659711| PASSED | |
# The file file_input_raw was rewound 6 times | |
diehard_3dsphere| 3| 4000| 100|0.59552875| PASSED | |
# The file file_input_raw was rewound 8 times | |
diehard_squeeze| 0| 100000| 100|0.92575734| PASSED | |
# The file file_input_raw was rewound 8 times | |
diehard_sums| 0| 100| 100|0.00635245| PASSED | |
# The file file_input_raw was rewound 8 times | |
diehard_runs| 0| 100000| 100|0.21904104| PASSED | |
diehard_runs| 0| 100000| 100|0.54903685| PASSED | |
# The file file_input_raw was rewound 9 times | |
diehard_craps| 0| 200000| 100|0.49319697| PASSED | |
diehard_craps| 0| 200000| 100|0.02164811| PASSED | |
# The file file_input_raw was rewound 24 times | |
marsaglia_tsang_gcd| 0| 10000000| 100|0.00085226| WEAK | |
marsaglia_tsang_gcd| 0| 10000000| 100|0.09184483| PASSED | |
# The file file_input_raw was rewound 24 times | |
sts_monobit| 1| 100000| 100|0.11527518| PASSED | |
# The file file_input_raw was rewound 25 times | |
sts_runs| 2| 100000| 100|0.14220393| PASSED | |
# The file file_input_raw was rewound 25 times | |
sts_serial| 1| 100000| 100|0.44630723| PASSED | |
sts_serial| 2| 100000| 100|0.56033132| PASSED | |
sts_serial| 3| 100000| 100|0.98213262| PASSED | |
sts_serial| 3| 100000| 100|0.85696548| PASSED | |
sts_serial| 4| 100000| 100|0.64257198| PASSED | |
sts_serial| 4| 100000| 100|0.72108521| PASSED | |
sts_serial| 5| 100000| 100|0.99963251| WEAK | |
sts_serial| 5| 100000| 100|0.33920389| PASSED | |
sts_serial| 6| 100000| 100|0.84554884| PASSED | |
sts_serial| 6| 100000| 100|0.63320851| PASSED | |
sts_serial| 7| 100000| 100|0.73035523| PASSED | |
sts_serial| 7| 100000| 100|0.07580829| PASSED | |
sts_serial| 8| 100000| 100|0.93155290| PASSED | |
sts_serial| 8| 100000| 100|0.59598047| PASSED | |
sts_serial| 9| 100000| 100|0.90274083| PASSED | |
sts_serial| 9| 100000| 100|0.42094584| PASSED | |
sts_serial| 10| 100000| 100|0.71417171| PASSED | |
sts_serial| 10| 100000| 100|0.35802638| PASSED | |
sts_serial| 11| 100000| 100|0.38478659| PASSED | |
sts_serial| 11| 100000| 100|0.18062315| PASSED | |
sts_serial| 12| 100000| 100|0.75858222| PASSED | |
sts_serial| 12| 100000| 100|0.98121381| PASSED | |
sts_serial| 13| 100000| 100|0.71933570| PASSED | |
sts_serial| 13| 100000| 100|0.65516036| PASSED | |
sts_serial| 14| 100000| 100|0.65614920| PASSED | |
sts_serial| 14| 100000| 100|0.87660855| PASSED | |
sts_serial| 15| 100000| 100|0.20506885| PASSED | |
sts_serial| 15| 100000| 100|0.05756555| PASSED | |
sts_serial| 16| 100000| 100|0.09916943| PASSED | |
sts_serial| 16| 100000| 100|0.12956451| PASSED | |
# The file file_input_raw was rewound 25 times | |
rgb_bitdist| 1| 100000| 100|0.41670471| PASSED | |
# The file file_input_raw was rewound 25 times | |
rgb_bitdist| 2| 100000| 100|0.70169111| PASSED | |
# The file file_input_raw was rewound 26 times | |
rgb_bitdist| 3| 100000| 100|0.01886731| PASSED | |
# The file file_input_raw was rewound 26 times | |
rgb_bitdist| 4| 100000| 100|0.66667369| PASSED | |
# The file file_input_raw was rewound 27 times | |
rgb_bitdist| 5| 100000| 100|0.54993841| PASSED | |
# The file file_input_raw was rewound 28 times | |
rgb_bitdist| 6| 100000| 100|0.99521713| WEAK | |
# The file file_input_raw was rewound 29 times | |
rgb_bitdist| 7| 100000| 100|0.25575410| PASSED | |
# The file file_input_raw was rewound 30 times | |
rgb_bitdist| 8| 100000| 100|0.63818270| PASSED | |
# The file file_input_raw was rewound 31 times | |
rgb_bitdist| 9| 100000| 100|0.25646872| PASSED | |
# The file file_input_raw was rewound 33 times | |
rgb_bitdist| 10| 100000| 100|0.18360463| PASSED | |
# The file file_input_raw was rewound 35 times | |
rgb_bitdist| 11| 100000| 100|0.39919858| PASSED | |
# The file file_input_raw was rewound 36 times | |
rgb_bitdist| 12| 100000| 100|0.74236252| PASSED | |
# The file file_input_raw was rewound 37 times | |
rgb_minimum_distance| 2| 10000| 1000|0.98284639| PASSED | |
# The file file_input_raw was rewound 37 times | |
rgb_minimum_distance| 3| 10000| 1000|0.44354648| PASSED | |
# The file file_input_raw was rewound 37 times | |
rgb_minimum_distance| 4| 10000| 1000|0.63511141| PASSED | |
# The file file_input_raw was rewound 38 times | |
rgb_minimum_distance| 5| 10000| 1000|0.03472498| PASSED | |
# The file file_input_raw was rewound 38 times | |
rgb_permutations| 2| 100000| 100|0.38217923| PASSED | |
# The file file_input_raw was rewound 38 times | |
rgb_permutations| 3| 100000| 100|0.82490840| PASSED | |
# The file file_input_raw was rewound 38 times | |
rgb_permutations| 4| 100000| 100|0.81423639| PASSED | |
# The file file_input_raw was rewound 39 times | |
rgb_permutations| 5| 100000| 100|0.58788975| PASSED | |
# The file file_input_raw was rewound 39 times | |
rgb_lagged_sum| 0| 1000000| 100|0.13794382| PASSED | |
# The file file_input_raw was rewound 41 times | |
rgb_lagged_sum| 1| 1000000| 100|0.80771914| PASSED | |
# The file file_input_raw was rewound 43 times | |
rgb_lagged_sum| 2| 1000000| 100|0.53383978| PASSED | |
# The file file_input_raw was rewound 46 times | |
rgb_lagged_sum| 3| 1000000| 100|0.13404934| PASSED | |
# The file file_input_raw was rewound 50 times | |
rgb_lagged_sum| 4| 1000000| 100|0.33342976| PASSED | |
# The file file_input_raw was rewound 55 times | |
rgb_lagged_sum| 5| 1000000| 100|0.58446779| PASSED | |
# The file file_input_raw was rewound 60 times | |
rgb_lagged_sum| 6| 1000000| 100|0.71100229| PASSED | |
# The file file_input_raw was rewound 66 times | |
rgb_lagged_sum| 7| 1000000| 100|0.16658076| PASSED | |
# The file file_input_raw was rewound 73 times | |
rgb_lagged_sum| 8| 1000000| 100|0.71209966| PASSED | |
# The file file_input_raw was rewound 81 times | |
rgb_lagged_sum| 9| 1000000| 100|0.55527498| PASSED | |
# The file file_input_raw was rewound 89 times | |
rgb_lagged_sum| 10| 1000000| 100|0.52167626| PASSED | |
# The file file_input_raw was rewound 98 times | |
rgb_lagged_sum| 11| 1000000| 100|0.35796222| PASSED | |
# The file file_input_raw was rewound 108 times | |
rgb_lagged_sum| 12| 1000000| 100|0.89345336| PASSED | |
# The file file_input_raw was rewound 119 times | |
rgb_lagged_sum| 13| 1000000| 100|0.79111713| PASSED | |
# The file file_input_raw was rewound 130 times | |
rgb_lagged_sum| 14| 1000000| 100|0.10102914| PASSED | |
# The file file_input_raw was rewound 142 times | |
rgb_lagged_sum| 15| 1000000| 100|0.00000389| WEAK | |
# The file file_input_raw was rewound 155 times | |
rgb_lagged_sum| 16| 1000000| 100|0.93850308| PASSED | |
# The file file_input_raw was rewound 169 times | |
rgb_lagged_sum| 17| 1000000| 100|0.43063803| PASSED | |
# The file file_input_raw was rewound 184 times | |
rgb_lagged_sum| 18| 1000000| 100|0.32494064| PASSED | |
# The file file_input_raw was rewound 199 times | |
rgb_lagged_sum| 19| 1000000| 100|0.02085119| PASSED | |
# The file file_input_raw was rewound 215 times | |
rgb_lagged_sum| 20| 1000000| 100|0.41864786| PASSED | |
# The file file_input_raw was rewound 232 times | |
rgb_lagged_sum| 21| 1000000| 100|0.44094682| PASSED | |
# The file file_input_raw was rewound 249 times | |
rgb_lagged_sum| 22| 1000000| 100|0.98087238| PASSED | |
# The file file_input_raw was rewound 268 times | |
rgb_lagged_sum| 23| 1000000| 100|0.00086939| WEAK | |
# The file file_input_raw was rewound 287 times | |
rgb_lagged_sum| 24| 1000000| 100|0.00944516| PASSED | |
# The file file_input_raw was rewound 306 times | |
rgb_lagged_sum| 25| 1000000| 100|0.26100620| PASSED | |
# The file file_input_raw was rewound 327 times | |
rgb_lagged_sum| 26| 1000000| 100|0.38346795| PASSED | |
# The file file_input_raw was rewound 348 times | |
rgb_lagged_sum| 27| 1000000| 100|0.05156653| PASSED | |
# The file file_input_raw was rewound 371 times | |
rgb_lagged_sum| 28| 1000000| 100|0.99812926| WEAK | |
# The file file_input_raw was rewound 393 times | |
rgb_lagged_sum| 29| 1000000| 100|0.26171541| PASSED | |
# The file file_input_raw was rewound 417 times | |
rgb_lagged_sum| 30| 1000000| 100|0.50805514| PASSED | |
# The file file_input_raw was rewound 441 times | |
rgb_lagged_sum| 31| 1000000| 100|0.00001507| WEAK | |
# The file file_input_raw was rewound 467 times | |
rgb_lagged_sum| 32| 1000000| 100|0.92636443| PASSED | |
# The file file_input_raw was rewound 467 times | |
rgb_kstest_test| 0| 10000| 1000|0.69314905| PASSED | |
# The file file_input_raw was rewound 468 times | |
dab_bytedistrib| 0| 51200000| 1|0.58193378| PASSED | |
# The file file_input_raw was rewound 468 times | |
dab_dct| 256| 50000| 1|0.90677849| PASSED | |
Preparing to run test 207. ntuple = 0 | |
# The file file_input_raw was rewound 469 times | |
dab_filltree| 32| 15000000| 1|0.17342569| PASSED | |
dab_filltree| 32| 15000000| 1|0.16764050| PASSED | |
Preparing to run test 208. ntuple = 0 | |
# The file file_input_raw was rewound 469 times | |
dab_filltree2| 0| 5000000| 1|0.90622779| PASSED | |
dab_filltree2| 1| 5000000| 1|0.31752599| PASSED | |
Preparing to run test 209. ntuple = 0 | |
# The file file_input_raw was rewound 470 times | |
dab_monobit2| 12| 65000000| 1|0.35217162| PASSED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* SecureRandomGenerator.java | |
* | |
* Output a lot of (random) stuff on stdout. | |
*/ | |
import java.io.IOException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.NoSuchProviderException; | |
import java.security.SecureRandom; | |
class SecureRandomGenerator { | |
static final int CHUNK_SIZE = 1024 * 100; // 100KiB | |
public static SecureRandom createPRNG() | |
throws NoSuchAlgorithmException, NoSuchProviderException { | |
return SecureRandom.getInstance("SHA1PRNG", "SUN"); | |
} | |
public static void main(String[] argv) | |
throws IOException, NoSuchAlgorithmException, | |
NoSuchProviderException { | |
SecureRandom generator = createPRNG(); | |
long n = Long.parseLong(argv[0], 10); | |
byte[] chunk = new byte[CHUNK_SIZE]; | |
while (n >= CHUNK_SIZE) { | |
generator.nextBytes(chunk); | |
System.out.write(chunk); | |
n -= CHUNK_SIZE; | |
} | |
byte[] rest = new byte[(int)n]; | |
generator.nextBytes(rest); | |
System.out.write(rest); | |
} | |
} |
500.MiB.OpenBSD.arc4random.bin generation:
% cc --version
cc (GCC) 4.2.1 20070719
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% uname -a
OpenBSD balin.enospoon.net 6.0 GENERIC.MP#0 amd64
% cc arc4random.c -o arc4random
% ./arc4random 524288000 > 500.MiB.OpenBSD.arc4random.bin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
500.MiB.java.SecureRandom.bin generation: