escapin / ElectionManager

An Election Manager for the sElect e-voting system
https://select.sec.uni-stuttgart.de/
Apache License 2.0
0 stars 0 forks source link

Egg or the Chicken problem #4

Closed escapin closed 7 years ago

escapin commented 8 years ago

Find a way to get rid of the ports in the URL addresses of the servers which run for a given election.

To get rid of the ports we would have to insert the URL address containing the election id to the egg (i.e., the ElectionManifest), but we can't because we haven't generated the essential part of the URL address yet: That is, the chicken (i.e., the election id)...

...and, as we all know, we need a chicken to generate an egg!

escapin commented 8 years ago

Possible solution

Use Subdomains + starting date as URL address.

Idea

  1. Create 5 subdomains, one for each server of sElect.

    • cs.<nameOfTheServ.er>
    • m1.<nameOfTheServ.er>
    • m2.<nameOfTheServ.er>
    • m3.<nameOfTheServ.er>
    • bb.<nameOfTheServ.er>

    This solution has several advantages on his own. For instance, a different host for each server implies a different origin (see https://en.wikipedia.org/wiki/Same-origin_policy, for more details).

  2. For each election created, the addresses of the 5 servers are: the subdomain / the starting time _ an incremental number. For instance, the URL of the Collecting Server of a given election would be:

    cs.<nameOfTheServ.er>/YYYYMMDDhhmm_<incrementalNumber>
    • The starting time is in UTC since we assume that the election manager server works in that timezone.
    • The incremental number is to differentiate between two elections created at the same time. There is a different counter for each election created at a given time.
    • Regarding the same origin policy, collecting servers of different elections running at the same server <nameOfTheServ.er> would of course have the same origin.

    In this way, the correct URL of each server is completely independent from the election id and can therefore be injected into the election manifest (ElectionManifest.json) of sElect so that the 5 servers of that instance already know the correct URL of each other.

  3. In the folder elections each election folder should start with the same code of the election address:

    YYYYMMDDhhmm_<incrementalNumber>

    In this way we already have this folder sorted by the starting time of the election and, when the starting time is the same, by the creation time of the election.

escapin commented 8 years ago

This solution does not completely solve the problem of having each election on a different origin. However, since it is important that the voting booth of each election is on a different origin (because we save data in the local storage, which is per origin) and since the voting booth URI is not part of the election manifest, the voting booth URI of each election could be:

 <first6charsOfElectionID>.vb.<nameOfTheServ.er>

In this case, each voting booth of each election has a different origin. Hence, in case the same browser is used in different elections the cryptographic data used for ensuring verifiability and accountability of different elections are saved on different origins.

escapin commented 8 years ago

Another solution:

  1. Add the field ELS (Election Lookup String) to the election manifest of sElect: An (maybe, human readable?) unique identifier of each election. This field could also be left empty so that it is amended by the election manager.
  2. In the demo version of the election manager, ELS would be the port number listened to for the statically served voting booth. The voting booth URI would then be:

    vb.<nameOfTheServ.er>:ELS

    (localhost:ELS for the offline version) This allows having each election on a different origin.

  3. The URI of the other servers would then be:

    • cs.<nameOfTheServ.er>/ELS
    • m0.<nameOfTheServ.er>/ELS
    • m1.<nameOfTheServ.er>/ELS
    • m2.<nameOfTheServ.er>/ELS
    • m3.<nameOfTheServ.er>/ELS
    • m4.<nameOfTheServ.er>/ELS
    • bb.<nameOfTheServ.er>/ELS

    (localhost/subdomain/ELS for the offline version)

    We assume we don't have more than 5 mix servers for each election: this is a reasonable assumption, since it is enough that at least one is honest.