Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digital voting pass #2918

Closed
synctext opened this issue Apr 26, 2017 · 32 comments
Closed

Digital voting pass #2918

synctext opened this issue Apr 26, 2017 · 32 comments
Assignees
Milestone

Comments

@synctext
Copy link
Member

synctext commented Apr 26, 2017

Goal is to digitize the current Dutch voting pass (first prototype).

This voting pass prevents double voting and check if this citizen is allowed to vote.

This project is a first step to increase the digital steps in the voting process. Critical requirement is ensuring trust, integrity, security, auditability, etc. Currently it seems to have occurred that people moving between municipalities obtained two voting passes, obviously we want to prevent this irregularity.

Manual counting takes hours to process but is highly trusted, see this stone-age analog process in detail.

specifications of voting pass

Trust is the cardinal issue in this BEP project.

Currently the government is experimenting with creating a smaller and more managable analog voting pass.
image

blockchain could this solve various fraud issues?

@landgenoot
Copy link
Member

Repositories:
https://github.com/landgenoot/digital-voting-pass-server
https://github.com/landgenoot/digital-voting-pass-app

The research process is tracked in the issues in the server repo.

@wkmeijer
Copy link

wkmeijer commented May 1, 2017

Project Plan
Digital_voting_pass_Project_Plan.pdf

@synctext
Copy link
Member Author

synctext commented May 4, 2017

Scope question: partly digital voting. No changes required in legacy procedures and infrastructure.
Current law does not permit digital voting, it specifies analog world : 80 gram paper only.
Problem of identification and authentication in voting station. Role of smartphone?
Private key location, airgapped ?
How historic and old is the voting pass (e.g. procedure never changed in decades)?
key lib: An Open Source Java Implementation of Machine Readable Travel Documents. Dutch pasport from French company uses Elyptic curve crypto, not compatible with standard binary OpenSSL signature validator. Support challenge response, access photo etc in .apk.

Create fully documented docker Alpine-based image to talk to drivers license or e-passport.

Possible architectures (explore in report):

  • publish all voting passes on blockchain
    • personalized and in encrypted domain
    • requires government database of BSN, public keys
    • great simplification and security boost
    • Each voting station publishes the spend public keys/voting passes on our own Delft-style blockchain
    • put all valid IDs on blockchain (both ID card and epassport).
    • proxy voting ?
  • smartphone contacts epassport and fetches voting pass from cloud
    • unique voting token
    • check at voting station

Perhaps link to our biometric validation basic building block. #2812

@landgenoot
Copy link
Member

landgenoot commented May 7, 2017

We tackled the problem that we were unable to verify a signature from a dutch travel document due to Elliptic Curves signatures instead of RSA.
Will update the pypassport library and add support asap.

We are still having an issue with the limit of bytes which can be signed by the travel document. This is limited to exactly 8 bytes according to the ICAO standard.
SHA1 or SHA256 hashes have lengths 20 and 32 byte respectively. Therefore these hashes cannot be signed by a travel document.

Hashfunctions with smaller sizes a not recommended for cryptographic usage.
@synctext Do you think that it is still secure to sign a hash in parts?

@sgort
Copy link

sgort commented May 8, 2017

Concept

Voornemen is oplossing bieden voor digitaal verkrijgen stem pas.

  1. Tip: Benader het vanuit de functie van de stem pas, niet de stem pas zelf, nl. het persoonlijk kunnen claimen van je recht om te stemmen!

  2. We blijven de stem pas uitdelen
    a. Papier
    b. BSN + public key reisdocument = digitaal token

  3. Stemmen
    a. Zelf aangeven dat je digitaal wilt stemmen
    i. Reisdocument is het vehicle (omdat elk reisdocument een unieke privé sleutel heeft)
    ii. Met reisdocument verkrijg je stembiljet door eenmalig uitgave digitaal token
    b. Papier
    i. Papieren stem pas inleveren
    ii. Stembiljet verkrijgen

  4. Met stembiljet stemmen <-- het stemmen zelf is verder buiten scope

Architectuur vragen

Complimenten voor de praktische benadering en tastbaar zoeken naar te realiseren prototype / concept. Realiseer je dat er vele vragen onderweg zijn die (on)bewust een antwoord krijgen. Probeer die te benoemen en formuleer je keuze(s) en overwegingen daarbij.

  • Hoe self-sovereign is een reisdocument eigenlijk?
  • Standaard ECDSA mogelijk aanpassen tgv cryptotechnologie?
  • Plaatsen we de (betere?) beveiliging van deze oplossing in referentie t.o.v. het bestaande proces?
  • Is gas ‘prijs’ ethereum echt relevant?
  • Welke opties zijn er voor het elimineren geclaimde recht (ie voorkomen double spending digitale token)
    o (…)
    o (…)

@wkmeijer
Copy link

wkmeijer commented May 10, 2017

Attached: research report concludes the research phase of the project.
Digital_Voting_Pass_Research_report.pdf
Digital_Voting_Pass_Research_report_v2.pdf
Digital_Voting_Pass_Research_report_v3.pdf

@synctext
Copy link
Member Author

thnx! good stuff. please include the ICTU argumentation:
We have self-driving cars soon. In the future it is likely that the new generation of citizens are not willing willing to vote, unless it is electronic from any place using any approved device.

Please add 4.2 "trust requires uncompromising usage of open source technology" or something. all hardware used should be open hardware licensed to build trust with voters.... it is essential to provide end-to-end integrity checks to ensure correct functioning of the ecosystem.. etc.

Bonus: that 8 Byte sign restriction.. try to get rid of that using a 3DES aanpak (CBC chaining):
by using a standard string of specially crafted repeated and chained signatures we are able to iteratively sign standard SHA256 signatures... hash collision.. etc... (argument/proof included..)..

@landgenoot
Copy link
Member

landgenoot commented May 10, 2017

CBC seems to be a really clever solution, thanks!
Need to find out if it works with non deterministic signatures.

@wkmeijer
Copy link

wkmeijer commented May 15, 2017

@synctext
Thanks for your feedback, we added the ICTU argument in the introduction and updated 4.2.
Digital_Voting_Pass_Research_report_v2.pdf

@synctext
Copy link
Member Author

synctext commented May 15, 2017

Please include the foundation for trusted identity: https://en.wikipedia.org/wiki/Physical_unclonable_function
That is the key component to guarantee the system integrity.

Tip: use readthedocs approach for details explanation of tech matters in Appendix B.

ToDo: screenshots for presentation at One Conference tomorrow

@wkmeijer
Copy link

wkmeijer commented May 15, 2017

Pictures of our wall. Our global planning as we drew it in the sprint planning meeting.
Wall picture 1 (global planning of sprints
Wall picture 2

@wkmeijer
Copy link

wkmeijer commented May 15, 2017

@synctext Here are the screenshots of the app, I've included all the possible screens, feel free to use as little or as many as you want. Retrieved data is the signed 8-byte '0a1b2c3d4e5faabb' hexstring, signed with my passport.
Starting screen
NFC disabled error
Retrieved signed data (192 byte)
Retrieved signed data 2 (different because non-deterministic)
Retrieved signed data 3 with pop-up of BSN from datagroup 1 of passport

@landgenoot
Copy link
Member

Research report updated according to feedback (thanks to @jellelicht !).

Digital_Voting_Pass___Research_report.pdf

@wkmeijer
Copy link

@synctext
Copy link
Member Author

synctext commented Jun 7, 2017

The current operational app can now (.apk):

  • app is developed for use by officials working at a voting stations
  • e-passport lib: fully talk to Dutch identity documents, both NFC and OCR of the machine readable zone.
  • integrated blockchain fabric. Enhanced C++ library of Multichain with full-node Bitcoin support.
  • created new Multichain fabric, using the Eliptic Curve similar to the one used within the Dutch e-passport
  • On top of Passport-Multichain voting tokens can be created. Allowing the owner of a passport to vote, the electronic equivalent of a voting pass.

@landgenoot
Copy link
Member

landgenoot commented Jun 7, 2017

Draft final report:
Digital_voting_pass___Final_report.pdf

@wkmeijer
Copy link

wkmeijer commented Jun 7, 2017

Overview of the current voting process and the proposed new voting process using the digital voting pass.
Current voting process
New proposed voting process

@wkmeijer
Copy link

wkmeijer commented Jun 7, 2017

Paper voting is far from flawless: Ruim 7.600 stemmen niet meegeteld bij verkiezingen (NRC)

@synctext
Copy link
Member Author

synctext commented Jun 7, 2017

Chapter: Problem description:

Chapter: performance analysis and evaluation

  • blockchain download speed in time on a real Android device.
  • storage space for 1 million voting passes.

@landgenoot
Copy link
Member

Feedback first SIG upload:

Beste,

Hierbij ontvang je onze evaluatie van de door jou opgestuurde code. De evaluatie bevat een aantal aanbevelingen die meegenomen kunnen worden in de laatste fase van het project.

Deze evaluatie heeft als doel om studenten bewuster te maken van de onderhoudbaarheid van hun code en dient niet gebruikt te worden voor andere doeleinden.

Mochten er nog vragen of opmerkingen zijn dan hoor ik dat graag.

Met vriendelijke groet,
Dennis Bijlsma

[Analyse]
De code van het systeem scoort 4 sterren op ons onderhoudbaarheidsmodel, wat betekent dat de code bovengemiddeld onderhoudbaar is. De hoogste score is niet behaald door een lagere score voor Unit Size.

Voor Unit Size wordt er gekeken naar het percentage code dat bovengemiddeld lang is. Het opsplitsen van dit soort methodes in kleinere stukken zorgt ervoor dat elk onderdeel makkelijker te begrijpen, te testen en daardoor eenvoudiger te onderhouden wordt. Binnen de langere methodes in dit systeem, zoals bijvoorbeeld de 'Camera2BasicFragment.setUpCameraOutputs'-methode, zijn aparte stukken functionaliteit te vinden welke ge-refactored kunnen worden naar aparte methodes. Commentaarregels zoals bijvoorbeeld 'Find out if we need to swap dimension to get the preview size relative to sensor coordinate' zijn een goede indicatie dat er een autonoom stuk functionaliteit te ontdekken is. Het is aan te raden kritisch te kijken naar de langere methodes binnen dit systeem en deze waar mogelijk op te splitsen.

In bovenstaand voorbeeld valt het overigens op dat het bestand "Copyright 2014 The Android Open Source Project" bevat. De packagenaam (com.digitalvotingpass.camera) is echter van jullie, dus het wekt de indruk dat jullie het oorspronkelijke bestand hebben aangepast. Ik heb dit daarom opzettelijk als voorbeeld genomen: als je er voor kiest om andermans code te adopteren en aan te passen, ben je vanaf nu ook verantwoordelijk voor het onderhoud van deze code.

De aanwezigheid van test-code is in ieder geval veelbelovend, hopelijk zal het volume van de test-code ook groeien op het moment dat er nieuwe functionaliteit toegevoegd wordt.

Over het algemeen scoort de code bovengemiddeld, hopelijk lukt het om dit niveau te behouden tijdens de rest van de ontwikkelfase.

Dennis Bijlsma | Senior Consultant

@landgenoot
Copy link
Member

Digital_voting_pass___Final_report.pdf

Draft report

@synctext
Copy link
Member Author

synctext commented Jun 14, 2017

The SIG rules of code review include: each library you include in your project becomes your responsibility and you need to ensure sufficient quality.

However, this e-voting pass project includes a whole blockchain infrastructure in the form of a library. Fixing numerous person-years of code is not realistic. Stats: X lines includes, of which Y line got modified by us.

@kc1212
Copy link
Contributor

kc1212 commented Jun 16, 2017

Recent publication on voting https://dl.acm.org/citation.cfm?id=3019841
not sure if it's related to this work, but might be interesting

@jonathanraes
Copy link

Digital_voting_pass___Final_report.pdf

2nd Draft final report

@synctext
Copy link
Member Author

  • MOSCOW pointer sentence in intro + 1 line this is a thesis project.
  • blockchain and e-passport prototype
  • fault-tolerance and attack-resilience
  • thousands votes are lost in the last election.
  • with accusations that Russia has electronically attacked US-presential elections..
  • easy to read picture for chapter 1 or 2 (illustrate analog voting pass).
  • intro : we use the blockchain as a tamper-proof database. ensure integrity
  • all appendixes are pointed to and have intro sentence.
  • Voting passes from a live blockchain
  • add screenshots to chapters
  • chapter 6: MBytes ?
  • needs overall polish

@synctext
Copy link
Member Author

synctext commented Jun 26, 2017

@landgenoot
Copy link
Member

landgenoot commented Jun 26, 2017

Thanks Jaap, looks good!
Maybe you should also post it to #2925

@klikooo
Copy link

klikooo commented Jun 27, 2017

@syntext we have come up with the following structure for the presentation:

  • Opening
  • Problem description
    • Paper
    • Digital
  • Research towards new solutions
  • Partial solution (voting pass)
  • Blockchain
    • Problem identity
  • MRTD
  • Proposed solution
  • OCR
  • jMRTD
  • Wallet
  • ePassportChain (different elliptic curve)
  • Demo
  • Code quality
  • Expert review

Do you have any comments/feedback?

@synctext
Copy link
Member Author

please post .pdf of .ppt... Suggest add problems with paper 14000 vote diff.

@wkmeijer
Copy link

Draft presentation (pdf)

@wkmeijer
Copy link

wkmeijer commented Jun 30, 2017

Feedback on second SIG upload

[Hermeting]

In de tweede upload zien we dat zowel de omvang van het systeem als de score voor onderhoudbaarheid is gestegen. Op het gebied van Unit Size zien we een bescheiden verbetering ten opzichte van de eerste upload. Let wel op dat je niet aan de ene kant aan het refactoren bent, en vervolgens aan de andere kant weer net zo goed nieuwe lange methodes aan het toevoegen bent.

Ook is het goed om te zien dat jullie naast nieuwe productiecode ook aandacht hebben besteed aan het schrijven van nieuwe testcode. De hoeveelheid nieuwe tests kan nog wel iets beter.

Uit deze observaties kunnen we concluderen dat een deel van de aanbevelingen van de vorige evaluatie zijn meegenomen in het ontwikkeltraject.

@synctext
Copy link
Member Author

Project finished with 91-page final report, see above, closing issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants