User avatar
wkelly42
Posts: 8
Joined: Wed Oct 12, 2016 4:50 pm

Raspberry Pi Voting Machines

Wed Oct 12, 2016 5:50 pm

I teach technology at an elementary school in northern Kentucky. Resources are slim, so the Raspberry Pis I've been able to get are put to good use. Today we finished a voting booth project - we wired arcade buttons and LEDs to the GPIO pins on a Pi 3 and wrote a program in Scratch that tracks votes and creates a real-time bar graph of the results. Details are available at https://warrenkelly.wordpress.com/2016/ ... ing-booth/ - I've even included a link to my Scratch account, where you can see the code we used.

ejolson
Posts: 1899
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi Voting Machines

Thu Oct 13, 2016 6:52 am

wkelly42 wrote:I teach technology at an elementary school in northern Kentucky. Resources are slim, so the Raspberry Pis I've been able to get are put to good use. Today we finished a voting booth project - we wired arcade buttons and LEDs to the GPIO pins on a Pi 3 and wrote a program in Scratch that tracks votes and creates a real-time bar graph of the results. Details are available at https://warrenkelly.wordpress.com/2016/ ... ing-booth/ - I've even included a link to my Scratch account, where you can see the code we used.
Thanks for sharing. It is quite an amusing project and really motivates a couple interesting questions that your 3-5th grade students may like to discuss.

1. Does the real-time display affect the votes of subsequent voters? For example, suppose that before the election started 10 planned to vote for grace and 5 for duck. What happens if the duck voters vote first and the real time display reports what looks like a landslide victory for duck. Will the later voters change their mind and also vote for duck?

2. How do you prevent one person from voting twice or even 100 times?

3. What happens if a person pushes the wrong button by mistake and wants to change their vote before leaving the booth?

4. Could the real-time display compromise voter anonymity?

5. Is there a way to prevent voting records from being changed after the election?

6. Would you trust the voting results if the code used to tabulate and display the results were kept secret? Can you change the program so 1 out of every 3 votes for duck is counted as a vote for grace? Is it possible to test for such trickery without looking at the code? Is it possible for the program to determine whether it is being tested and only perform the trickery when not being tested?

This project could really motivate students to think about how voting machines should work and why paper ballots without real-time display are still widely used.

jgreen71
Posts: 89
Joined: Wed May 01, 2013 12:29 pm
Location: Clarksville, IN

Re: Raspberry Pi Voting Machines

Thu Oct 13, 2016 12:18 pm

wkelly42 wrote:I teach technology at an elementary school in northern Kentucky.
Yay Kentucky!!

User avatar
DougieLawson
Posts: 33836
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry Pi Voting Machines

Fri Oct 14, 2016 6:10 am

How can you possibly have an anonymous vote (which is 100% essential for democracy) and prevent folks from voting twice?

Watch this: https://www.youtube.com/watch?v=w3_0x6oaDmI I think you'll find it gives some interesting discussion points and dispels the myth that electronic voting is useful for anything other than X-Factor on TV (where anonymity and vote stuffing don't matter).
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
wkelly42
Posts: 8
Joined: Wed Oct 12, 2016 4:50 pm

Re: Raspberry Pi Voting Machines

Fri Oct 14, 2016 4:22 pm

Part of the point in this is to spur the kids (especially fifth grade) to ask those kinds of questions.

I am working on a way to have a QR code on their voter ID cards for next time (yes, they all made voter ID cards, and have to have them certified by the election officials before they can vote). The vote will only be able to be registered after the QR code is scanned, and each QR code will only scan once. I may end up having a different machine for each grade (precinct) to simplify things there.

I agree that electronic voting is wrought with problems and shortcomings. But as a lesson in civics (which would have to include these questions anyway), and an exercise in design and construction of an electronic project, it's great. AND it's a lot of fun to teach as well, especially when they start wondering and thinking through some of these questions. I've had some GREAT discussions with some of these kids about IoT technology and whether you want your refrigerator to be hackable.

User avatar
Burngate
Posts: 5441
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
Contact: Website

Re: Raspberry Pi Voting Machines

Fri Oct 14, 2016 6:27 pm

wkelly42 wrote:... The vote will only be able to be registered after the QR code is scanned, and each QR code will only scan once...
Why?
Why can I not change my vote?

I can change my will as many times as I want, until I die, but I can't change my allegiance from grace to duck (I've just found out that grace doesn't like me ... oh-oh, duck doesn't like me either so I want to change back!)

User avatar
DougieLawson
Posts: 33836
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry Pi Voting Machines

Fri Oct 14, 2016 10:44 pm

wkelly42 wrote:
I am working on a way to have a QR code on their voter ID cards for next time (yes, they all made voter ID cards, and have to have them certified by the election officials before they can vote). The vote will only be able to be registered after the QR code is scanned, and each QR code will only scan once. I may end up having a different machine for each grade (precinct) to simplify things there.
How does that QR code make anything secure? What are you planning to encode in it, because it's publicly readable and I can easily generate a fake? How can you expire it after read? What happens on a read failure? What happens in four years time? You may as well have your social security ID tattoed on your forehead because that's just about as secure. How long after you generate your QR does it expire (the usual expiry for for one-time passwords is about ten minutes to avoid a replay attack)?
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Raspberry Pi Voting Machines

Fri Oct 14, 2016 11:24 pm

One time codes and every similar approach can use a central database to record who voted without recording what they voted. This stops an illegal vote after you make your legal vote.

The problem is the illegal vote before the legal vote. There is no way to reverse out the illegal vote when the legal voter complains about not being able to vote. To reverse out an illegal vote, you have to connect the vote to the voter. The Greens can then hack the system, find out you did not vote Green, and set fire to your house using natural biodynamic plant oils.

ejolson
Posts: 1899
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi Voting Machines

Sat Oct 15, 2016 4:20 pm

peterlite wrote:The problem is the illegal vote before the legal vote. There is no way to reverse out the illegal vote when the legal voter complains about not being able to vote.
Use two different one-way hashes to preserve anonymity. The actual QR code is never recorded in any database. At issuance the first hash is recorded and could later be used to check the identity of the QR card holder, if desired. In the voting machine the second hash is recorded and could later be used to change a vote, if necessary. Since the hashes are one way, there is no way to connect the people in the voter registry to the recorded votes. When a new election is needed, use the same QR code but simply change the second hash. In this way it also becomes impossible to connect the voters in one election to the next. Since each voter is expected to keep the QR code private, a bifold card with the code printed on the inside might be a good idea.

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Raspberry Pi Voting Machines

Sat Oct 15, 2016 10:53 pm

The one way hash sounds interesting. You still have to verify the voter to issue the QR code. < :D > They could make the voter present their id, a passport, for identity to receive the QR code. To keep everything anonymous, they could do it at night with the lights off. </ :D >

User avatar
bensimmo
Posts: 3222
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Raspberry Pi Voting Machines

Sun Oct 16, 2016 8:19 am

Given I stick my vote in the post, which is carried along with all the other info about me in the UK iirc, then electronic is probably a better idea especially if I didn't need to go out in the rain, thunder and high winds to do the vote.

All paper votes are only as secure as the people behind it, basically democratic voting is based on trust.

User avatar
DougieLawson
Posts: 33836
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry Pi Voting Machines

Sun Oct 16, 2016 12:20 pm

In the UK there is no way for the Returning Officer or his staff to determine who voted for which candidate unless there's a petition made to a high court judge for possible electoral fraud. The system may be based on trust but the trust is judicially enforced. But that's largely irrelevant when the OP announces he's looking for a way to do electronic voting.

Watch Tom Scott's video, he has lots of good arguments why you can't have anonymous electronic voting. It's less likely to be anonymous than any paper based system because you have to authenticate voters to allow them to vote.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
bensimmo
Posts: 3222
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Raspberry Pi Voting Machines

Sun Oct 16, 2016 12:32 pm

DougieLawson wrote:...But that's largely irrelevant when the OP announces he's looking for a way to do electronic voting.
...
I don't think wkelly42 actually did that, I do think he was showing how he used a Pi to make something, use it and create discussion on a subject.

I added the video to my watch later list :-)

ejolson
Posts: 1899
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi Voting Machines

Thu Oct 20, 2016 5:46 am

DougieLawson wrote:Watch Tom Scott's video, he has lots of good arguments why you can't have anonymous electronic voting. It's less likely to be anonymous than any paper based system because you have to authenticate voters to allow them to vote.
There seem to be many videos, none of which obviously discuss the use of one-way hashes to keep voting records anonymous. Could you provide a link and possible a time index into the video?

mymaverick
Posts: 1
Joined: Fri Apr 20, 2018 10:10 am

Re: Raspberry Pi Voting Machines

Fri Apr 20, 2018 10:12 am

I was particularly disturbed in the wake of these issues and decided to think of how things could get better to ensure total trust and reliance on our electoral process to bring about the unquestionable credibility in the way we elect our leaders both in the society and in the academia. Even conducting polls shouldn't be left out, because polls are used to gauge the pulse of the society to test public affinity to or disapproval of a particular issue or cause of action. In my quest in search for answers, I came across the issue of e-voting based on blockchain technology. First, it sounded like a stealth idea when I read that some developed this system, but I had to dig a little bit because the bait that caught my interest deepened was the keyword, blockchain.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10938
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Raspberry Pi Voting Machines

Fri Apr 20, 2018 11:11 am

Voting machines (unless special measures are taken) are NOT confidential.
You can point an antenna at such a machine, and the electronic "noise" coming from the machine will betray which vote the user of the voting machine has cast.

User avatar
DougieLawson
Posts: 33836
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry Pi Voting Machines

Fri Apr 20, 2018 11:38 am

Have you watched Tom Scott's video? You can't have confidential anonymous voting unless you use a paper form and a ballot box (and even that's not 100% secure as each ballot has a serial number). The insurmountable problem is ensuring one vote per voter while ensuring their vote can't be identified.

Television programs where folks pay 25p per SMS text message to vote are not a good example for a democratic vote as vote stuffing isn't disallowed. There's nothing to stop a voter spending £25.00 if they want to stuff 100 votes into that system.

That's before considering the snooping that's possible using Mahjonng's dubious methods.

Blockchain doesn't solve the problem as you can't prevent one vote per voter. It does make the vote irrefutable (but you get that with the paper and a pencil system).
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20495
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi Voting Machines

Fri Apr 20, 2018 12:37 pm

mymaverick wrote:
Fri Apr 20, 2018 10:12 am
I was particularly disturbed in the wake of these issues and decided to think of how things could get better to ensure total trust and reliance on our electoral process to bring about the unquestionable credibility in the way we elect our leaders both in the society and in the academia. Even conducting polls shouldn't be left out, because polls are used to gauge the pulse of the society to test public affinity to or disapproval of a particular issue or cause of action. In my quest in search for answers, I came across the issue of e-voting based on blockchain technology. First, it sounded like a stealth idea when I read that some developed this system, but I had to dig a little bit because the bait that caught my interest deepened was the keyword, blockchain.
No Raspberry Pi content - are you a spammer?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

ejolson
Posts: 1899
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi Voting Machines

Fri Apr 20, 2018 6:08 pm

jamesh wrote:
Fri Apr 20, 2018 12:37 pm
mymaverick wrote:
Fri Apr 20, 2018 10:12 am
I was particularly disturbed in the wake of these issues
No Raspberry Pi content - are you a spammer?
Spam usually directs people to an off-site fishing hole. Did you remove such a link from that post?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20495
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi Voting Machines

Fri Apr 20, 2018 6:19 pm

ejolson wrote:
Fri Apr 20, 2018 6:08 pm
jamesh wrote:
Fri Apr 20, 2018 12:37 pm
mymaverick wrote:
Fri Apr 20, 2018 10:12 am
I was particularly disturbed in the wake of these issues
No Raspberry Pi content - are you a spammer?
Spam usually directs people to an off-site fishing hole. Did you remove such a link from that post?
No, otherwise the post would already be gone! Sort of why I asked the question!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 10938
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Raspberry Pi Voting Machines

Sat Apr 21, 2018 10:32 pm

its a well known spammers trick to get in with some innocuous post, after which they start using their ill gained posting privilege to post spam.

as spammers don't like to work, they often try to get in with an artificial "spam bot", but such a bot is too stupid to post a valid question, so such a post often has no raspberry PI content at all.

Return to “Staffroom, classroom and projects”

Who is online

Users browsing this forum: No registered users and 1 guest