← Back to context

Comment by cryptonector

4 hours ago

Fully software, even a combo of software and hardware, cannot by itself make elections secure. Think of the Reflections On Trusting Trust problem, the need to verify firmware, etc. You can't ensure that machines _will_ work correctly, but you _can_ verify that they _did_. To do verify the machines' functioning after the fact you have to do it very soon after closing of the polls, and you have to devise a manual, statistical random sampling method where you manually check randomly sampled, marked paper ballots, against the digital cast vote record, then do a digital risk limiting audit to check that the CVR totals up to the machines' reported results. The sooner after closing of the polls you do this, the better the likelihood that any cheating will be caught. I.e., an immediate manual, partial audit of enough randomly-selected polling locations.

That still leaves tons of other technical problems to address, like security of mail-ballots / absentee ballots, the security of ballot boxes used for early voting (because you probably cannot run the above manual partial audit due to then having nightly results available to the public; or maybe you accept that), voter registration, etc.

You solve all of these with cryptography.

Your ID card contains a private key, you use that key to sign a transaction. It doesn't matter that machine you are running on is compromised as these details can be verified at a later date.

Example A: You vote for candidate A, but software changes to candidate B and software displays that you voted for candidate A. At any later time you can check with an independent device and look at the transaction finding out that it was altered with and retract your vote / change it.

Example B: How do you know your vote was counted? Publish a hash and the signature of every vote, recompute the final tally and compare with all the votes. If your vote is not in the final tally the hash will be different and you can visibly see your vote in the dataset as every transaction is published. To preserve privacy each round has a number, private key + number -> new key so each fingerprint will be unique between votes.

  • > You solve all of these with cryptography.

    I've spent a lot of time thinking about this problem, and my conclusion is that cryptography alone is not the solution, for reasons like:

    1. The public needs to believe it, and hypertechnical solutions are a hard sell.

    2. Any blockchain approach needs to preserve the secrecy of the ballot, otherwise you get all the problems you can expect of non-secret votes (coercion, vote buying, shaming network effects).

    3. You still need to have the cryptographic rubber meet the physical road _somewehere_ -- it has to, otherwise the need for vote secrecy means that the results can be entirely fictitious and pre-programmed and there is no way to check!

    I.e., you can have a paperless blockchain solution IFF you abandon vote secrecy. That is a very tough to swallow pill.

    On the other hand, if you accept paper ballots and manual partial audits as part of the solution, then blockchain can have a role to play. For example, the machines could display a blockchain head every 50 ballots cast, and voters take a copy of the blockchain head visible to them, then after the election the public can verify the integrity of the blockchain, and the fact that you only get running tallies every 50 ballots means you get vote secrecy.

    A system that uses paper ballots and partial manual audits can be explained to the public, and the public can develop confidence in it. Blockchains can then add a good deal of confidence: the blockchain tells you that the tallies were not modified after the fact, and the partial manual audit tells you to an acceptable level of statistical confidence that the digital cast vote record contains the actual paper ballots _as marked and cast_ by voters.

    • >I.e., you can have a paperless blockchain solution IFF you abandon vote secrecy. That is a very tough to swallow pill.

      This is false. I know this is a common thought on HN because some formerly popular youtuber did a video about this topic that is still regularly reposted here, but he was already wrong in theory back then and it is certainly wrong in practice today. Secrecy/anonymity and verifiability are no longer mutually exclusive as anyone who is well versed in modern cryptography will be able to tell you.

      3 replies →

    • the issue isn't that people won't believe it or that blockchain can't preserve secrecy of ballots (it can). it is, in part, that crypto eventually has to meet the real world, but mainly that crypto is hard and governments might not be up to the task. for example, last year the IACR (which had been doing online voting via crypto for more than a decade, and still is) had to void their elections because one of the trustees lost their private key and the results were impossible to decrypt. while it was ultimately fine because the IACR isn't really a high-stakes operation, how would you feel if your government just said "sorry folks, there's been some technical issues and elections will have to be redone"? would you believe them or suspect they're up to no good? what if this happens in a very contended and heated election?

    • > The public needs to believe it, and hypertechnical solutions are a hard sell.

      Public doesn't need to know the details. Production of paper, printers is quite complex and so production of the pen. Yet people are not concerned about that when voting and we don't publish schematics of a printer that printed the ballots.

      2 replies →

  • 1) How do you solve the ALB TLS encryption Termination/reencryption to your applications? How to achieve TLS continuation?

    2) How do you avoid the cloud derived encryption keys?

  • A major problem is that if you are able to verify who you vote for, you can either sell your vote or be coerced (by, say, your abusive husband) to vote a specific way.

    • We have the solution it's just not practicable. Cryptocurrencies and hardware wallets have solved this problem. But they operate at the scale of people in their bedrooms not hundreds of millions of people voting over one day all over a country.

      Passports would need to become like hardware wallets with screens such as Trezor. Who's firmware and design are open source.

      The screen means I can see what I'm signing and later be shown what I signed.

      Now, I don't want people to know who I vote for. So we make it e-passport gate so that no one can enter with me.

      Now I want to be able to verify my vote at a later date but not let others know it was me. Well this too is solved by multiple cryptocurrencies like monero and z-cash.

      I can go to my local town hall enter a room alone using a e-passport style gate and check my vote at the machine. My device can verify my vote.

      Someone with the vote can only see that 1 of N voters did it. Where N is so large they can't identify me.

      No duplicate vote is possible.

      Literally no one would agree to this however.

      6 replies →

    • You can always include a nonce to decode the votes true value or provide an alternative for people that are vulnerable to coerction. If you need an example: monero crypto currency is the pinnacle of it.

      1 reply →

    • retraction of vote with a new vote solves this.

      Since I'm able to retract my vote, I cannot sell it. And since I can retract my vote, I cannot be coerced in any way.

      6 replies →

  • You cannot solve it with cryptography. I understand cryptography but my parents don’t, so I will be voting instead of my parents[0]. This way, I get three votes while they get 0 each.

    I'll quote Bruce Schneier [1]

       If you think cryptography can solve your problem, *you don’t understand your problem* and you don’t understand cryptography.
    

    0: I already do anything related to any interaction with a computer system for them (including payments, social security, medical, travel, etc.)

    1: He dug into the origins of this here: https://www.schneier.com/blog/archives/2026/05/laurie-anders...

  • Relevant xkcd: https://xkcd.com/2030https://xkcd.com/2030

    There is no problem that electronic voting solves that paper ballots and scanners do not, and the latter are not only more secure but are seen to be more secure. Trust is essential in a voting system and only paper ballots provide the necessary level of trust.

    • There are problems that electronic voting does solve: in some countries, moving paper ballots are problematic and subject to tampering. This shows up in mail-in voting, where there's always a risk of loss and delay. Overseas voters are an issue, e.g. deployed military.

      There is a specific problem with mail-in voting and disabled voters, for example elderly people who can't go to the polls and can't get an electronic ballot marker. 25 US states deliver ballots electronically and 15 allow electronic voting for this specific case [1].

      [1] https://www.ncsl.org/elections-and-campaigns/electronic-ball...

      3 replies →

  • How do you know no fake votes were added?

    • This problem is unavoiable as you ultimately have to trust the root, just like with paper ballots, so this is not an applicable problem. Although you could include encrypted metadata for location, id number attached to a real person and other information that would make verification after the fact much, much easier.

  • > You solve all of these with cryptography.

    Or ballot boxes. Where citizen can keep their eyes on their ballot until it is counted.

    Even back in 2002, TV channels in France (60m inhabitants) broadcast the winner at 20:00:30, using statistical models.

    But recently, they removed the ability for citizen to stay during the counting, relying on designated persons, which breaks the chain of trust. Might as well cast my vote into a black bag or an electronic machine, no trust at all.

    Trust was never the goal. As the means of coercion are higher and the capacity of communication is filtered, it becomes unnecessary to involve citizen in voting, isn't it?

    • > recently, they removed the ability for citizen to stay during the counting

      Here in Australia, representatives of the various political parties observe the counting as scrutineers. I did it once. It’s absolutely fascinating seeing the system and rules. All (lower house) votes are physical slips of paper. Officials sort them into piles of 50 based on their first preference, in a big warehouse. Scrutineers watch them do it. We are allowed to contest their reading and sorting of a vote, but not physically touch anything.

      I’m sorry to hear you can’t see your own democracy in action. I have more trust in our election process seeing it up close, in person.

  • Who makes your ID card, generates the private key, and stores it there? Do you trust them? Did they retain a copy of the key? Did they implement security effectively (a very difficult task, considering the resources of attackers)? What about securing the manufacturing process?

    In the end, you always must trust humans.

    • This is one big advantage of paper vote systems. You can still bribe, trick or coerce a single person. But it becomes much more difficult to do so en masse. Computer voting allows fraud at scale. It is much more difficult to scale an attack on a paper voting system.

    • So if someone else knows my private key and voted for me not the same way i intended to vote, this will be visible in final results. And then you can start asking questions. If they have my private key and voted the way i intended, then its no problem :)

      3 replies →

  • > Example A: You vote for candidate A, but software changes to candidate B and software displays that you voted for candidate A. At any later time you can check with an independent device and look at the transaction finding out that it was altered with and retract your vote / change it.

    This seems to make a pretty dramatic change to the election protocol, no?

    Consider example A': You vote for candidate A, but later realize that you hate candidate A. You repudiate your recorded vote for candidate A.

    What should happen?

    • How much later? Cryptographic systems certainly have methods for allowing revoting up to a deadline, but endlessly mutable voting is insane. It's also not really any different from today. I can say I didn't vote for candidate A 12 months after the upcoming election and it means... well... nothing.

    • You can do A' in some US states... you can vote by mail/early vote, and then later request they spoil that ballot and do it again, or by voting on election day the mail-in is invalidated.

      3 replies →

But Brazilian gov says their electronic election system is unhackable... Yeah.

Only a selected few orgs and groups are allowed to audit and in a very controlled environment because they also rely on security through obscurity. The source code is not available to the citizens.

If by any chance I'm wrong and someone can point me a source code repo, please enlighten me.

https://international.tse.jus.br/en/electronic-ballot-box/pr...

  • It's a shame the technical discussion behind our voting machines has been completely ruined by political discussion. The paper trail bill is an objective improvement over the current system and unfortunately (why?) it has been denied.

  • Nothing is unhackable though is it?

    You just need to find the right balance.

    In my country we still rely on a paper process - which is very hard to tamper with but also has a bunch of problems - recently we needed to repeat local state elections because of such problems including shortages of ballot papers, unusually long queues to vote, ballots being delivered to the wrong locations, and in some cases voters being turned away. Many of these problems go away with digital voting - but then you have other issues.

    I don’t think a perfect solution can exist

    • Those problems can also be solved with a better organised electoral commission. Here in Australia we sometimes have long lines at polling stations, but I’ve never heard of any of those other issues occurring.

While these all are problems, the REAL problem is that the goal of elections isn't to get scientifically or mathematically verifiably correct results. The goal is to produce agreeable consent.

That means it doesn't matter one bit how correct you are if the regular Joe does believe you tricked. Adding computers into the mix always makes this worse. And again, this is not something you can fix with clever solutions and cryptography (that admittedly fascinates me nonetheless), the problem is that people can't see electricity generally and I something at the scale of a computer, even if you could it would be utterly meaningless.

This is why the paper ballot system is so glorious in its stupid inefficiency, because it spreads the trust in a way any adult who has mastered object permanence can verify for themselves. Invite the conflicting parties to monitor and have them begrudgingly admit their defeat in the face of the simple, inefficient but agreeable process.

This is why I as a cryptography fan, programmer and hardware guy think electronic voting is not up to the task for high stakes elections.

  • > glorious in its stupid inefficiency, because it spreads the trust

    What is the goal? Having fancy crypto or people being confident about elections?

    If spreading the trust is the goal what makes you say "inefficient". It is orders of magnitude better then any crypto system.

    • GP means inefficient in the sense of cost. Paper ballots add costs. Partial manual audits / hand-counts add costs. Full audits / hand-counts add a lot of cost, and in particular hand-counts require a lot of staff in order to yield results on election night.

      The costliest item is counting by hand, so... don't. Use ballot scanning and counting machines and then implement a timely partial manual audit to demonstrate that the BMDs and BSCDs functioned correctly.

      1 reply →

    • As I wrote in another comment we had to repeat local state elections because of problems in the paper process - including shortages of ballot papers, unusually long queues to vote, ballots being delivered to the wrong locations, and in some cases voters being turned away.

      While I’m a proponent of the paper process let’s not pretend it immediately means you can be confident about the election

      1 reply →

> Think of the On Trusting Trust problem, the need to verify firmware, etc.

I mean that's too abstract and philosophical of a problem when talking about voting machines/software: there are much more prevalent and concrete risks including but not limited to APT-grade breach/espionage if your country is important enough, and the various other issues (some in your comment itself).

  • Yes, of course. See my reply to sibling comment about why a software solution is insufficient, even a soft/hardware solution is insufficient. Cryptography does not save the day. A modicum of physically auditable paper trail is required.