This commit is contained in:
Bill Cox
2014-10-20 11:35:35 -04:00
parent dfc5f45602
commit 6113e1dd29
4 changed files with 14 additions and 7 deletions

View File

@@ -24,7 +24,10 @@ Here's the board layout so far...
![Board layout of Infinite Noise Multiplier](eagle/infnoise_brd.png?raw=true "Infinite
Noise Multiplier")
The breadboard works!
The breadboard works! It generates 300,000 bits per second, resulting in 112,000 bits per
second after whitening. Estimated entropy per bit is 0.836. By design, it should be
0.796, so it's about 5% higher than predicted. This is likely due to high sources of
noise (such as EMI from my computer), and comonent tolerance.
![Breadboard of Infinite Noise Multiplier](infnoise_breadboard.jpg?raw=true "Infinite
Noise Multiplier")

View File

@@ -4,7 +4,7 @@ infnoise: infnoise.c healthcheck.c Keccak/KeccakF-1600-reference.c Keccak/brg_en
gcc -Wall -std=c11 -O3 -m64 -march=native -I Keccak -o infnoise infnoise.c healthcheck.c Keccak/KeccakF-1600-reference.c -lftdi -lm
healthcheck: healthcheck.c
gcc -Wall -std=c11 -g -m64 -march=native -D TEST_HEALTHCHECK -o healthcheck healthcheck.c -lm
gcc -Wall -std=c11 -O3 -m64 -march=native -D TEST_HEALTHCHECK -o healthcheck healthcheck.c -lm
clean:
rm -f healthcheck infnoise

View File

@@ -128,9 +128,12 @@ static void scaleEntropy(void) {
// This should be called for each bit generated.
bool inmHealthCheckAddBit(bool bit, bool even) {
inmTotalBits++;
if((inmTotalBits & 0xffff) == 0) {
printf("Estimated entropy per bit: %f, estimated K: %f\n", inmHealthCheckEstimateEntropyPerBit(),
inmHealthCheckEstimateK());
if((inmTotalBits & 0xfffff) == 0) {
printf("Generated %lu bots. Estimated entropy per bit: %f, estimated K: %f\n",
inmTotalBits, inmHealthCheckEstimateEntropyPerBit(), inmHealthCheckEstimateK());
if(inmTotalBits > 3000000) {
exit(0);
}
}
inmPrevBits = (inmPrevBits << 1) & ((1 << inmN)-1);
if(inmPrevBit) {
@@ -332,7 +335,7 @@ int main() {
printf("Failed health check!\n");
return 1;
}
if(inmTotalBits > 0 && (inmTotalBits & 0xfffff) == 0) {
if(inmTotalBits > 0 && (inmTotalBits & 0xfffffff) == 0) {
printf("Estimated entropy per bit: %f, estimated K: %f\n", inmHealthCheckEstimateEntropyPerBit(),
inmHealthCheckEstimateK());
checkLSBStats();

View File

@@ -116,7 +116,8 @@ int main(int argc, char **argv)
// Set high baud rate
int rc = 0;
rc = ftdi_set_baudrate(&ftdic, 3000000);
//rc = ftdi_set_baudrate(&ftdic, 3000000);
rc = ftdi_set_baudrate(&ftdic, 500000);
if(rc == -1) {
puts("Invalid baud rate\n");
return -1;