2 ms·
My silly random number generator: strace -Tiv -ttt nice -n 19 curl -Lv --raw https://google.com/news https://google.com/news 2>&1 | shasum -a 512 | dd bs=1 cou
by cpeterso 12y ago
My silly random number generator:
strace -Tiv -ttt nice -n 19 curl -Lv --raw https://google.com/news https://google.com/news 2>&1 | shasum -a 512 | dd bs=1 count=2 2>/dev/null
This assumes Google News serves frequently changing content. The noncanonical Google News URL generates extra entropy from an HTTP 302 Moved Temporarily to an HTTP 301 Moved Permanently to an HTTP 200 OK with the final news page. strace and nice and curl add entropy from OS syscall timings and HTTP headers.
(OS X doesn't have strace, so you can just skip it.)
- bdhe 12y agoA lot of the time, the randomness used must be secret (for nonces etc.) but your solution is an interesting way to implement a CRS (http://en.wikipedia.org/wiki/Common_reference_string_model http://en.wikipedia.org/wiki/Common_reference_string_model) which is very useful in some cryptographic primitives. A CRS is a common string, typically random, that anyone can access, but cannot be controlled by any one party. Another typical thought-implementation of this is using stock market prices -- predict those accurately and you'd do better things with your time than break some crypto protocols.