28. März 2008

hrng 1.0

Juhu, endlich mal wieder ein Software-Release meinerseits: The Humanoid Random Number Generator. Ich zitiere mal die README, die zufälligerweise den selben Text enthält, wie die Seite, auf die der obige Link führt. Englischsprachige Inhalte folgen.

Motivation

One of the key features of modern computational systems is their ability to generate random numbers. Mathematicians and engineers have been and are still working out complex algorithms and hardware extensions to improve the entropy of random number generators (RNGs) by adding incalculable momentums to the deterministic chain of computer processing. On Linux systems, unpredictable hardware interrupts like HID events are fed to an entropy pool inside the kernel, which serves as the source of /dev/random and /dev/urandom. Quantum physicians have even manufactured PCI cards to allow the use of real physical randomness by analyzing radioactive decay or sending photons to a semi-transparent mirror and detecting the through-passing particles, as a further stage in this basic principle.

Especially in cryptography, indeterministic random numbers are needed to guarantee an adequate security. Predictable encryption keys undermine every attempt in creating a trustworthy environment inside the wide and rude spheres of the internet.

But still, there are circumstances in which it just doesn’t matter. Imagine the following situation: You are sitting in front of your computer and just can’t decide which MP3 to listen to. You want to listen to music, that’s all. You turn on “random” mode and press play. Seriously, you don’t give a f**k whether the song playing was chosen by the latest non-deterministic RNG algorithm or by the preference of some lazy programmer. This is the point, where hrng steps in.

Idea

The main principle of the Humanoid Random Number Generator (hrng) is the absence of randomness. Masses of human beings cannot act randomly, with “randomly” meaning “unpredictably”: they tend to imitate and do whatever The Others do. The imitation of third-party behaviour is unreasonable and with reason being the fundamental part of every scientific research that aims at being reproducible, absence of reason leads to irreproducible and therefore random results. Oh, wait a second. We just found out that unreasonable behaviour actually IS random. So is imitation.

If imitation is random, one can simply take the behaviour of another human being and imitate it to generate a random event. To you, I am one of these other humans, and I advise you to take 255 as your preferred random number.

Concept

The Humanoid Random Number Generator always returns 255.

Installation and Usage

Before using hrng, you have to unzip and compile it.

$ tar xzvf hrng-1.0.tar.gz
$ cd hrng-1.0/
$ make hrng

If you want to, you can copy the binary in a folder inside your $PATH (e.g. /usr/local/bin/).

# cp hrng /usr/local/bin/

That’s it! You can now enjoy the possibilites of the Humanoid Random Number Generator by running

hrng [-h] [N]

    -h    Prints the usage information
     N    Specifies the amount of random numbers to generate
          (default: infinite)

Have fun!

Ich habe sogar einen Direkt-Download-Link ausfindig machen können: Klick.

3. Januar 2008

Geschenkaktion

Ich habe mir mal erlaubt, ein bisschen Zufall für euch zu generieren. Nehmt was ihr braucht!

80	86	28	2	117	49	102	50	77	126
10	7	117	104	31	118	6	24	119	94
1	99	63	31	97	114	18	126	38	21
3	6	99	8	46	12	67	38	102	81
6	59	21	42	117	123	64	1	71	107
93	98	13	30	126	35	50	68	18	81
73	30	73	43	9	21	123	13	115	89
90	42	102	47	116	44	67	115	36	109
98	46	2	76	89	83	76	98	66	43
126	73	21	49	101	71	115	22	85	55

2. Dezember 2007

Random Access Music

Gerade eben bin ich über eine sehr interessante Musik-Installation aus dern 60ern gestolpert: Nam June Paiks Random Access Music. Paik hatte Tonbänder kreuz und quer auf einer Wand verteilt und ermöglichte es so dem Besucher, interaktiv mit einem modifizierten Tonabnehmer über die an der Wand montierten Bänder zu fahren und so eigene Interpretationen des Rohmaterials zu schaffen.

Wie kann man aber digitale “Random Access Music” spielen? Dem geneigten Leser ist vielleicht aufgefallen, dass das Begriffspaar “Random Access” auch im Computerbereich eine große Rolle spielt: Der Arbeitsspeicher, Random Access Memory, ist eine der zentralen Komponenten jedes Rechners — wieso sollte man ihn nicht nutzen, um Musik zu machen? Gesagt, getan:

# cat /dev/mem > /dev/dsp

Ok, das Resultat ist immerhin interessanter als das oft zu Testzwecken genutzte

$ cat /dev/urandom > /dev/dsp

denn statt Rauschen bekommt man, neben einiger Stille, tatsächlich den ein oder anderen Ton zu hören. Aber es geht noch besser: Die moderne Technik erlaubt es uns, Information zweckentfremdet in einer anderen Form (sogar über einen anderen Sinnesreiz) wahrzunehmen. Ein Bild macht man zum Musikstück, aus einem Videoclip zieht man einen Text heraus, aus einem Text generiert man ein Bild. Man nehme sich zum Beispiel den 54 Byte langen Header einer Windows-Bitmap-Datei (ichhabedaschonmalwasvorbereitet, Bildgröße 200×200 Pixel, 24 Bit Farbtiefe), und hänge an diesen einen ausreichend langen Text (zum Beispiel RFC 2616) und schaue sich das Ergebnis (Bitmap hier) an:

RFC Image

Der Fantasie sind kaum Grenzen gesetzt! Aus Random Access Music wird Random Access Information. Aber Vorsicht: Bei aufgedrehten Lautsprechern kann der Nachbar eventuell sensible Daten, wie zum Beispiel das noch im Arbeitsspeicher liegende Root-Passwort, erhorchen.

Viel Spaß beim Experimentieren!

Archiv · Impressum · RSS
Copyright (c) Erik Scharwächter

Random ·