The Shœstring Foundation Weblog
https://pestilenz.org/~bauerm/shoestring
Miscellaneous ByproductsenPingsweeps go BOING
https://pestilenz.org/~bauerm/shoestring/2004/06/30#netsound
<p>
Fascinated by the <a href="http://www.usenix.org/publications/library/proceedings/lisa2000/gilfix/gilfix_html/">Auralizer</a>, I started my own, simplified
version, <a href="https://pestilenz.org/~bauerm/shoestring/~bauerm/netsound.tar.gz">Netsound</a>. The idea is to define
sound events to be triggered by network events. In netsound, you can
set <code>pcap(3)</code> filters together with bounds and the sound
to play if the event occured that often. E.g.:
</p>
<pre>
<code>
filter: icmp and not src net 131.188
max: 10
soundfile: sounds/boing.au
</code>
</pre>
<p>
You can define many of these events. Netsound uses <code>libesd</code>
to play and mix the sounds.
</p>Blum-Blum-Shubb-Niggurath
https://pestilenz.org/~bauerm/shoestring/2004/06/30#bbs
<p>
The <a href="http://www.fact-index.com/b/bl/blum_blum_shub.html">Blum-Blum-Shub</a> Pseudo Random Number Generator works basically as follows:
<ol>
<li> Setup
<ol>
<li> <p>Generate two large primes such that they both equal 3 mod 4 </p>
<li><p> Take the product N and forget the primes</p>
<li><p> Fetch an initial state x<sub>0</sub> from a true RNG</p>
</ol>
<li> Operation per step
<ol>
<li> compute next state: x<sub>i+1</sub> = x<sub>i</sub><sup>2</sup> mod N
<li> output the least significant bit of x<sub>i+1</sub>
</ol>
</ol>
<p>
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. <br> 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.
<br> My <a href="https://pestilenz.org/~bauerm/shoestring/~bauerm/bbs.c">implementation</a> 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.
</p>