A Simple Sequence

Let's presume there is a poll on the jersey color of the soccer team of the Earls of England.

The poll is as serious as it can be: All players are computer geeks ready to mess with the poll, all are present, watching each other suspected of cheating closely during the ceremony.

For purpose of the demo, we use this "computer":

5 core ARM network in a suitcase

I hope the fictional example sounds strange enough to make clear, that we are not at all serious about the problem itself. It's only purpose is to serve as a demo for coding simple applications.

In this suitcase we find a router and five bricks (Seagate dockstar's) each running Debian and an Askemos peer (the Chicken version, since RScheme is not available on ARM systems). Furthermore we need a normal PC running a live CD with the client software installed (here are screenshots from a german "how to" start it). There are no other machines on the network.

BTW: running an Askemos peer shall mean: be wire compatible wrt. the agreement protocol. There is no implied requirement to actually run the - presumably buggy - software from the website.

We further assume, that each of those Earls who are in favor for a particular color have brought their own brick and trust their own judgement; their installation has no backdoor. (Except that they know to have full control over their own device in any case...the attack scenarios, which are promised at the end of this article, will assume hidden wireless network hardware. As a side note: seven earls do probably still have black-and-white emblems - strangely enough these days. ;-) At least four of those who brought their own brick share one more comment interest: win, i.e., while trying to cheat, let the poll complete.

Also a prerequisite to complete the poll: all bricks became part of the quorum where this script runs.

Note that the bricks in the picture are artificially colored according to the players preference. In reality those units are plain white.

Initial State

When the script is started, it asks for a subject ("Betreff") of the poll. Once a name is submitted, the next state (setup) is entered.

We entered jersey color poll to begin:

Auswahl Betreff

Setup State

During the setup, options (german "Möglichkeiten") are added (german "hinzufügen").

Just before we enter the last option, the poll pages looks like this:

jersey color poll

Möglichkeiten

Hinzufügen:

yellow
red
dark red
black

Once the = button is pushed, the process proceeds to the next step.

Counting Vassals (The count state.)

Next we need to define how many votes can be cast.

As this time our poll box looks like this, except that we already changed the useless default value of one to one voice per player.

jersey color poll

Durchzählen

Kandidaten

yellow
red
dark red
black
purple

Vasallen

Anzahl:

11 Stimmen

Note that behind the scene, in hidden form fields that is, we will supply 11 random numbers. Here a peek into the HTML source.

<input name="tan" type="hidden" value="333"></input> 
...
<input name="tan" type="hidden" value="10240"></input> 

Preparing The Poll (the prepare state)

Now we are first directed to print/write the (now registered) TAN's on a slip of paper each and put them into a lottery wheel.

Each vassal may then draw one slip to be used during the poll period.

jersey color poll

TAN Liste

Diese TAN-Liste muß in die Lostrommel:

333
360
3787
3858
5772
6055
6145
7219
7952
8449
10240

Starten

Ab jetzt
Frist: (sec.)
Im Zeitraum
Von: bis:

When done so far, we shall start the poll either by submitting a duration (german "Frist") in seconds starting from now (german "Ab jetzt") or a period ("Zeitraum").

Running The Poll

Poll Period

During the poll period the poll box presents an input field for the TAN to be imputted and a button for each option:

jersey color poll

Von 2010-12-07T15:55:37.305000066+0100 bis 2010-12-07T15:56:37.305000066+0100 entscheiden:

TAN:

  • yellow
  • red
  • dark red
  • black
  • purple

We cast eight votes here. One for each, a total of two for "red" and "purple" got three.

Past Deadline

Once the poll is closed (german "abgeschlossen") we find a consensus ("Zustimmung") of 50% for "purple".

jersey color poll

Abgeschlossen

Ergebnis 0.5 Zustimmung zu purple

Final Notes


Editing History

2013-10-18
Fixed link into the blog.