Why you can’t trust your vote to the internet just yet
Written by
A common adage in information security is that most startups don’t hire their first full-time security engineer until they’ve got around 300 staff.
If your app only stores public data and has no need to authenticate users, that might not present much of a problem. But when your app needs to be trusted to protect the confidentiality of a person’s political preference, it’s something else entirely.
It’s why Tusk Philanthropies - an organisation devoted to bringing mobile voting to the masses - is playing matchmaker between a half-dozen mobile voting startups and the security experts that can help bring them up to snuff.
The team at Trail of Bits - a boutique software security firm based in New York - was commissioned by Tusk in late 2019 to conduct a thorough ‘white box’ security test of mobile voting app Voatz, an app used in five US states. The testers would have full access to all the source code and documentation they required to discover security gaps and recommend fixes.
The code looked sound - clearly written by highly competent engineers. But after waiting over a week for technical documentation they requested from the startup, the Trail of Bits team had nothing to work off beyond a single page that amounted to a security policy.
“After several meetings it became clear why we weren’t getting the documents we wanted,” says Trail of Bits CEO Dan Guido. “The person preparing them was the CEO.”
The company’s two co-founders were responsible for maintaining its substantive code base while straddling the complexities of running the Voatz business.
In total, Trail of Bits published 79 vulnerabilities in the app, a third of them high severity. While some of the more avoidable misconfigurations found in the code became a source of mockery, the folly of any one bug was missing the point, according to Evan Sultanik, the lead tester on the project.
“I’m less concerned about finding hard-coded encryption keys copied from Stack Overflow in the code base,” he told Risky.Biz. “I’m more worried that those keys were still in the code base since the last time it was used in 2018. There was a lot of evidence that this company is moving very, very fast and trying to keep up with the new requirements of each new election the app is used in. They are developing features on the fly.”
With elections in the United States run and governed separately by each state, the functional requirements for any given voting system vary dramatically. None of the pilots are large enough to generate any meaningful revenue.
“All the commercial electronic voting vendors will face the same time and resource constraints,” Guido said. “Software security and cryptography expertise is rare and expensive. I wish I had more of them.”
He credits Tusk Philanthropy for co-funding security reviews for election system startups, some of whom couldn’t afford them until they get significant scale. Tusk is doing so with the hope of eventually convincing the world that mobile apps will prove a ‘safe, secure and convenient’ solution to voting systems that disenfranchise large swathes of the population.
What standard do we hold them against?
Security testing might be more affordable if there was a global or national standard to test every election app against. But today there isn’t. To understand why, we asked election security expert Harri Hursti what testing criteria governed the accreditation of voting devices used at polling stations.
“They are not tested,” he said, bluntly. “In many states the vendors certify themselves against whatever standard they choose and the evaluators are commissioned by the vendors.”
Hursti has spent the better part of 20 years shining a light on the lax security in the voting systems. He co-founded the Defcon Voting Village - in which hackers are encouraged to try and break voting machines picked up off eBay and in government surplus options. And to educate the broader community about the problem, he’s featured in two HBO documentaries - Hacking Democracy(2006) and a March 2020 sequel, Kill Chain.
Hursti credits California and Ohio for setting a tougher testing criteria, but more broadly he says that testing spends a disproportionate amount of effort on safeguarding against a voter being electrocuted at the polling place compared to securing the data they submit.
“Even with the bar as low as you could set it, there is no meaningful security testing,” he said. “It doesn’t exist.”
The US Federal Government does maintain voluntary guidelines for voting machines in the polling place. But these have traditionally covered just about every aspect of the device apart from its security characteristics. A second version - released in draft in late February - introduced basic requirements around access control, data protection and detection and monitoring.
The revised standard emphatically states - for the first time - that no device or component of an election system should use external network connections. But it excludes any device that allows voters to mark a ballot outside a polling place (see pg 13), leaving very little guidance for election officials that wish to run remote elections.
Hursti believes that a set of federal standards - written by security professionals at a body like NIST with input from election experts - should be made mandatory. But he isn’t holding his breath for that.
“There is a strong feeling that any federalisation of elections is unacceptable - even in areas where it makes sense,” he said. “CISA is offering a lot of free services and tools to the states to help them secure the elections. There are a number of states that refuse to take free help, because their attitude is that this has to remain a state issue.”
Fresh thinking
One of the key selling points for the Voatz app was that it would use the properties of decentralized ‘blockchain’ to record a voter’s preference in some immutable yet auditable way.
This was what captured the attention of Mike Specter, a PhD student at MIT who unbeknownst to the gang at Trail of Bits had started reverse engineering the Voatz app with one of his peers, with nothing guiding them but their own curiosity.
“As academics we’d previously explored all the theories of how you might use the blockchain to solve problems at the ballot box,” he said. “And our conclusion - before we had ever studied any implementations in great details - was that even at a theoretical level, a blockchain doesn’t solve the core technical issues related to voting that would make elections more secure, and could in fact introduce further vulnerabilities.”
No matter where their research led, Specter would always return to a basic problem. “Couldn’t someone just hack your phone and get the key? So why does any of this other stuff matter? The underlying problem is that consumer-grade devices are not that secure and don’t stand up to the sort of adversaries that have the capability of buying zero-days and going after devices en masse. There has been insane amounts of losses from digital currency that is inaccessible due to people losing their keys or having their keys stolen.
“That logically led us down the path of asking ourselves what Voatz was doing, seeing as they make claims to use the blockchain to great effect.”
Specter and fellow PhD student James Koppel conducted a two-week ‘black box’ study of the Voatz app. Without access to the Voatz source code, server or documentation, the two students had to painstakingly reverse-engineer the app to understand how it functioned.
“As far as we could tell at the time, no one had ever publicly released a security review of Voatz,” Specter said. “Any publicly available audits didn’t seem like audits in the computer security sense, and more so audits in the user testing sense. The fact the app works as intended is not the same as testing for what an adversary can do with this thing. There was also no whitepaper to explain what their architecture was. They talked of it including a mixnet, hardware-based key storage and lots of other security attributes that put together, you could hallucinate a number of these schemes, but we could find no evidence of it. We started pushing on it and it kept getting a little more weird.”
Tellingly, the duo tapped into some of the same misconfigurations and missing features that the Trail of Bits study would later document. Only in the case of two young PhD students, Voatz was confident it could refute their findings. If they hadn’t seen the full picture, its founders reasoned, how could they know whether it was secure?
Specter has huge respect for election officials and the very difficult challenges they face. But he urges them not to be swayed by the big buzzwords like blockchain and AI. They will get far better results if vendors are simply forced to be transparent. They should be held to stronger testing regimes and for their source code to be open for analysis. He remains hopeful that a more rigorous set of security requirements enforced by one or more larger states will become a ‘de facto’ standard for others to follow.
Jennifer Morell, a nationally recognized election official and consultant, agrees that online voting solutions are not ready for use in the November General Election, but also hopes the academic and technology communities will keep pushing the boundaries to find workable solutions for remote voting.
“I understand all the security issues around internet voting, but we should always be exploring and pushing for better ways to do this,” she told Risky Business. “We’re not ready for November - but well before the next election we need to sit down with clarity and think about how to solve this together.”
The most promising technology that might be applicable to remote marking of ballots would be homomorphic encryption - a form of cryptography in which computation on ciphertext produces the same result as computation on plaintext.
If homomorphic encryption was performant, Hursti says, it could preserve the privacy and secrecy attributes required for elections without compromising on auditability.
Today, homomorphic encryption is used in academic papers more so than in practice. To complicate matters, laws in some US states insist that the common person has to be able to understand how votes are counted and how the election is ordered with no special training and tools.
“We are lacking fundamentals,” Hursti says. “We can’t lock the 10 smartest people in the world in a room and expect to solve the problem. This is a problem we’ll need to think about for the next 40 years. The good news is - if you solve problems like this for elections, you would likely greatly improve the security of a lot of other applications.”
“There are lots of areas where more security research is more urgently needed,” he said. “How do we improve the security and usability of online voter registration? How do we improve election night reporting systems?”
Guido agrees that some big leaps need to be made before allowing untrusted consumer systems to be used for remote marking of ballots.
“There needs to be funding available for fundamental research,” he said. The Election Assistance Commission - with its two newly appointed security staff - is not currently equipped to provide the step-change required. Guido speculates that - considering the important nation-building work undertaken by the DoD and Department of State in the aftermath of foreign conflicts - some of these larger bodies may have the right incentives and resources to contribute.
“Election security is a hard problem - that’s why I’m attracted to it. But it’s not an intractable problem. It feels to me like there are too many entrenched interests that want to prevent new entrants in voting technology. We need to bowl over that opposition if we’re to get this right. As a security community, we need to come at this problem as engineers and do more than just point out flaws. We need fundamental research to be funded and made available as a public resource.”
Read Part I of our story on Election Security - Experts Agree: Internet voting isn’t ready for COVID-19 crisis.