The Shœstring Foundation Weblog

The Shœstring Foundation Weblog, Miscellaneous Byproducts

Matthias Bauer
bauerm (at) shoestringfoundation · org
reop pubkey
Vignettes by George Herriman


Blosxom Logo

Wed, 30 Jun 2004

Pingsweeps go BOING

Fascinated by the Auralizer, I started my own, simplified version, Netsound. The idea is to define sound events to be triggered by network events. In netsound, you can set pcap(3) filters together with bounds and the sound to play if the event occured that often. E.g.:
filter: icmp and not src net 131.188
max: 10
soundfile: sounds/
You can define many of these events. Netsound uses libesd to play and mix the sounds.

[/projects] permanent link


The Blum-Blum-Shub Pseudo Random Number Generator works basically as follows:
  1. Setup
    1. Generate two large primes such that they both equal 3 mod 4
    2. Take the product N and forget the primes
    3. Fetch an initial state x_0 from a true RNG
  2. Operation per step
    1. compute next state: x_{i+1} = x_i^2 mod N
    2. output the least significant bit of x_{i+1}
Blum, Blum and Shub show that predicting the next bit from the observed output is as hard as factoring N. In addition, after erasing the primes computing previous states from the current one is as hard as factorization.
A problem exists with the expected cycle length of the produced random bits. As Terry Ritter pointed out, maximum cycles (near the size of N) can be assured by choosing the primes as “double--Germain”, i.e. p = p'*2 + 1, p' = p''*2 + 1, with p, p', p'' all prime.
My implementation generates such primes. A possible application for BBS is generating strong randomness on embedded devices without physical sources of randomness. Upon initialization, a truely random seed could be stored on the device, which later is updated synchronously after each step of the algorithm.

[/projects] permanent link