Electronic Voting & Sec

Electronic Voting & Sec

Dr. Avi Rubin Dr. Avi Rubin

Information Security Institut

Information Security Institut

Johns Hopkins University Johns Hopkins University
Things everybody agre

Things everybody agre

• Punch card ballots result in mista

Punch card ballots result in mista

voters

• Computers can be useful in impro

Computers can be useful in impr

voting

Our democracy hinges on the qual

Our democracy hinges on the qual

voting systems and the confidenc

voting systems and the confidenc

have in them. have in them.
E-voting controvers

voting controvers

• We all want fair and secure elect

We all want fair and secure elect

• Some disagreement on how to ac

Some disagreement on how to a

• My position: My position:

• There must be a voter There must be a voter-verifiable aud

verifiable aud

• Insider threat is real Insider threat is real• Software is dangerous Software is dangerous• Logic & Accuracy tests do not test s

Logic & Accuracy tests do not test s

• e.g. can’t find Easter eggs e.g. can’t find Easter eggs
Election Procedure

Election Procedure

• Good procedures are no excuse Good procedures are no excuse for deploying m

for deploying m

are grossly insecure are grossly insecure

• Procedures might detect tampering, but then w

Procedures might detect tampering, but then w

• better to avoid tampering in better to avoid tampering in the first place, if possible the first place, if possible

• In the event that a procedure is In the event that a procedure is not followed or 

not followed or 

work, the election should still be secure work, the election should still be secure

• Not reasonable to place the burden of securing 

Not reasonable to place the burden of securing 

on the poll workers on the poll workers

• Kim Zetter (Wired magazine) trained (Wired magazine) trained as a poll w

as a poll w

California and found many la California and found many lapses in security pr

pses in security pr
Last Election Last Election

• Washington Post 11/6 Washington Post 11/6 

• Software glitch in Novemb Software glitch in November’s election in Virginia er’s election in Virginia• Advanced Voting Solutions touchscreen machines Advanced Voting Solutions touchscreen machines

• “Voters in three precincts reported Voters in three precincts reported that when they attempted to v that when they attempted to vote 

ote 

machines initially displayed an ‘x’ next to her name but then, a machines initially displayed an ‘x’ next to her name but then, after a 

fter 

‘x’ disappeared. In response to ‘x’ disappeared. In response to Thompson's complaints, county of Thompson's complaints, county offi

fi

the machines in question yesterda the machines in question yesterday and discovered that it seemed y and discovered that it seemed to 

to 

Thompson in about ‘one out of a Thompson in about ‘one out of a hundred tries,’ said Margaret K. hundred tries,’ said Margaret K. L

L

county Board of Elections. ” county Board of Elections. ”

http://www. http://www.washingtonpost washingtonpost.com/wp-dyn/articles/A6291 /articles/A6291-20

20
Last Election (Cont

Last Election (Cont

• Indianapolis Star 11/9 Indianapolis Star 11/9

• Software glitch in November’s elect

Software glitch in November’s elect

• 19,000 registered voters 19,000 registered voters

• 144,000 votes tallied 144,000 votes tallied

• actual number of votes cast was 5,352 actual number of votes cast was 5,352

• MicroVote MicroVote touchscreen machines touchscreen machines

http://www. http://www.indystar indystar.com/articles/6/091021 .com/articles/6/091021

-1006

-0

0
Voter verifiable aud

Voter verifiable aud

• enables recounts enables recounts• voter confidence voter confidence• harder to tamper with the election harder to tamper with the election• probably involves paper probably involves paper• surprise recounts surprise recounts

The very piece of paper that is verifi

The very piece of paper that is verif

voter is used in the recoun

voter is used in the recoun
Insider threat Insider threat

• Easy to hide code in large software p

Easy to hide code in large software p

• Virtually impossible to detect back do

Virtually impossible to detect back do

• Skill level needed to hide malicious c

Skill level needed to hide malicious c

much lower than needed to find it much lower than needed to find it

• Anyone with access to development Anyone with access to development 

environment is capable environment is capable

• Requires Requires

• background checks background checks• strict development rules strict development rules• physical security physical security
Example Example

• Recent hidden trap door in Linux Recent hidden trap door in Linux• Allows attacker to take over a compu

Allows attacker to take over a compu

• Practically undetectable change Practically undetectable change• Discovered by rigorous software eng

Discovered by rigorous software eng

process process - not code inspection not code inspection

schedule();goto repeat;

}if((options == (__WCLONE|__ W ALL))&& (current->uid 

retval= -EINVAL;

retval= -ECHILD; 

end_wait4:

current->state = TASK_RU N NIN G;
Example #2 Example #2

• Rob Harris case Rob Harris case - slot machines slot machines

• an insider: worked for Gaming Control Bo

an insider: worked for Gaming Control Bo

• Malicious code in testing unit Malicious code in testing unit

• when testers checked slot machines when testers checked slot machines

• downloaded malicious code to slot machine downloaded malicious code to slot machine

• was never detected was never detected• special sequence of coins activated “winn

special sequence of coins activated “winn

• Caught when greed sparked investiga

Caught when greed sparked investig

• $100,000 jackpot $100,000 jackpot
Software dangers Software dangers

• Software is complex Software is complex

• top metric for measuring number of 

top metric for measuring number of 

lines of code lines of code

• Windows Operating System Windows Operating System

• tens of millions of lines of code tens of millions of lines of code• new “critical” security bug announce

new “critical” security bug announce

week

• Unintended security flaws Unintended security flaws unavo

unavo

• Intentional security flaws Intentional security flaws undetec

undetec
Example #3 Example #3

• Breeder’s cup race Breeder’s cup race

• Upgrade of software to phone bettin

Upgrade of software to phone bettin

• Insider, Christopher Insider, Christopher Harn, rigged so

, rigged so

• Allowed him and accomplices to cal

Allowed him and accomplices to ca

• change the bets that were placed change the bets that were placed

• undetectable undetectable

• Caught when got greedy Caught when got greedy

• won $3 million won $3 million
Case Study: Case Study:

Diebold voting machines Diebold voting machines
• 56-bit DES in CBC mode with static 

bit DES in CBC mode with static 

used to encrypt votes and audit logs 

used to encrypt votes and audit logs 

compression, as Diebold claims in th

compression, as Diebold claims in th

“technical” analysis) “technical” analysis)

#define DESKEY ((des_key*)"F265

#define DESKEY ((des_key*)"F265

• Unkeyed Unkeyed public function (CRC) use

public function (CRC) use

integrity protection integrity protection

• No authentication of smartcard to v

No authentication of smartcard to v

terminal terminal

•Insufficient code review Insufficient code review

Code analysis Code analysis
// LCG - Linear Conguential 

Generator// used to generate ballot serial numbers// A psuedo-random-sequence generator // (per Applied Cryptography, // by Bruce Schneier, Wiley, 1996

- BallotRes

Diebold Electio
// LCG - Linear Conguential 

Generator// used to generate ballot serial numbers// A psuedo-random-sequence generator // (per Applied Cryptography, // by Bruce Schneier, Wiley, 1996

“Unfortunately, linear congrue

generators cannot be used 

cryptography”- Page 

Applied Cry

by Bruce S

- BallotRes

Diebold Electio
“this is a bit of a hack for now

“the BOOL beeped flag is a hack so 

beep twice. This is really a result o

handling being gorped.”

“the way we deal with audio here i

hack.”

“need to work on exception *cau

audio*. I think they will currently 

double-fault.”

Audio

Wr

Ba

B
void CBallotRelSet::Open(const CDistr void CBallotRelSet::Open(const CDistrict* district, const CBaseu const CBaseunit* baseunit,

const CVGroup* vgroup1, const CVGroup* vgroup2){

ASSERT(m_pDB != NULL);ASSERT(m_pDB->IsOpen());

ASSERT(GetSize() == 0);

ASSERT(district!= NULL);

ASSERT(baseunit!= NULL);

if(district->KeyId() == -1){

Open(baseunit, vgroup1);

} else {

const CDistr const CDistrictItem* pDistr tem* pDistrictItem = m_pDB tem = m_pDB->Find(*district);

if(pDistr (pDistrictItem != NULL) { tem != NULL) {

const CBaseunitKeyTable& baseunitTable = pDistrictItem-> m_BaseunitKeyTabl

int count = baseunitTable.GetSize();

for(inti= 0;i < count; < count;i++) {

const CBaseunit& curBaseunit const CBaseunit& curBaseunit = baseunitTable = baseunitTable.GetAt( .GetAt(i);

if(baseunit->KeyId() == -1 ||*baseunit *baseunit == curBaseunit) == curBaseunit) {

const C BallotRelationshipItem* pBalRelItem = NULL;

while ((pBalRel pBalRelItem = m_pDB tem = m_pDB->FindNextBalRel(curBaseunit >FindNextBalRel(curBaseunit, pBalRel pBalRelItem))){

if(!vgroup1 | !vgroup1 || vgroup1 vgroup1->KeyId() == -1 ||

(*vgroup1 == pBalRelItem->m_V Group1 & & !vgroup2)||(vgroup2 && *vgroup2 == pBalRelItem->m_V Group2 & &

*vgroup1 == pBalRelItem->m_VGroup1))

Add(pBalRelItem);

}

}

}

m_CurIndex = 0;m_Open = TRUE;

}

}

}

Code Fragment Code Fragment
Other problems Other problems

• Ballot definition file on removable 

Ballot definition file on removable 

unprotected unprotected

• Smartcards use no cryptography Smartcards use no cryptography• Votes kept in sequential order Votes kept in sequential order• Several glaring errors in cryptogr

Several glaring errors in cryptogr

• Inadequate security engineering 

Inadequate security engineering 

• Default Security Default Security PINs of 1111 on of 1111 on 

administrator cards administrator cards
SAIC Study SAIC Study

• 2/3 of the report redacted 2/3 of the report redacted

• due to “security” reasons due to “security” reasons• goes against a basic tenet of computer security goes against a basic tenet of computer security

• Diebold claims everything will be fixed Diebold claims everything will be fixed

• if so, then why hide details of the report from the 

if so, then why hide details of the report from the 

• It is very important that the entire report be 

It is very important that the entire report be 

public

• Long term plan, suggestion: Long term plan, suggestion:

• Maryland require SAIC to sign off on improved D

Maryland require SAIC to sign off on improved D

machines before using them machines before using them
Recommendation #

Recommendation #

• Separate vote casting from tabula

Separate vote casting from tabul

• Touch screen machine produces pa

Touch screen machine produces pa

• need not be as trusted as today’s need not be as trusted as today’s DRE

• voter can use or destroy voter can use or destroy• scanning and tabulating machine scanning and tabulating machine

• small code base small code base

• open source open source

• extensive testing and certification extensive testing and certification

• different manufacturer from touch scre

different manufacturer from touch scre
Recommendation #

Recommendation #

• Transparency Transparency

• Require designs of machines to be 

Require designs of machines to be 

• Require security audit of machines 

Require security audit of machines 

qualified experts qualified experts

• Require public report of this audit Require public report of this audit

• Require open source for vote tabula

Require open source for vote tabula

• necessary but not sufficient necessary but not sufficient
Recommendation #

Recommendation #

• Quality control Quality control

• Establish criteria for testing the expe

Establish criteria for testing the exp

manufacturers manufacturers

• NIST could play this role NIST could play this role

• Require source code analysis for ce

Require source code analysis for ce

• Establish standards for policies and Establish standards for policies and 

procedures procedures

• Aim for simplicity: Aim for simplicity:

• The more complicated and burdensome, th

The more complicated and burdensome, t

be followed be followed
Conclusions & Advi

Conclusions & Advi

• Security of voting should be a non Security of voting should be a non

-pa

pa

issue

• Only democrats have approached me: Only democrats have approached me:

• Holt, Kucinich, Moseley Holt, Kucinich, Moseley

-Braun, Kaptur, DNC Braun, Kaptur, DNC

• Too much is at stake for party politics Too much is at stake for party politics

• Keys to future work on voting system

Keys to future work on voting system

• transparency transparency• openness openness• accountability & audit accountability & audit• public review public review

• Computer Scientists and Politicians should 

Computer Scientists and Politicians should 

together together
Additional slide

Additional slide

(if needed for Q & A)
Diebold’s respons

Diebold’s respons

• The code we looked at was old a

The code we looked at was old a

the one that runs in their machine

the one that runs in their machine

• We do not believe that We do not believe that• Several people have matched the v

Several people have matched the v

numbers numbers

• The code compiled and ran The code compiled and ran 

- no acc

no acc

• SAIC looked at the “current” code a

SAIC looked at the “current” code a

the same flaws the same flaws
Diebold’s respons

Diebold’s respons

• These machines have been used 

These machines have been used 

elections with no problems elections with no problems

• This says nothing about the security 

This says nothing about the security 

machines machines

• Attacks are more likely to happen w

Attacks are more likely to happen w

is at stake is at stake

• You don’t always know when someo

You don’t always know when someo

hacked the system hacked the system
Diebold’s respons

Diebold’s respons

• We ran the code on a different platfor

We ran the code on a different platfo

the one used in the voting machines the one used in the voting machines

• Nothing in our analysis has to do with the 

Nothing in our analysis has to do with the 

ran the code ran the code

• We only ran the code to see if it was real 

We only ran the code to see if it was real 

• Since it compiled and ran on our machine

Since it compiled and ran on our machine

platform had to be similar, but this is an u

platform had to be similar, but this is an u

point

• This response by Diebold is an intentiona

This response by Diebold is an intentiona

from the security problems in their machi

from the security problems in their machi
Diebold’s respons

Diebold’s respons

• My role as an advisor to My role as an advisor to Votehere Votehere Inc. intr

Inc. intr

into the study into the study

• I was on the technical advisory board of I was on the technical advisory board of Voteher

Voteher

security companies security companies

• Votehere Votehere is not a competitor of Diebold’s is not a competitor of Diebold’s

• Johns Hopkins concluded in a review of the matt

Johns Hopkins concluded in a review of the matt

• My 3 collaborators had no affiliation with My 3 collaborators had no affiliation with Votehe

Votehe

• Our results have been confirmed by the security 

Our results have been confirmed by the security 

and the SAIC study and the SAIC study

• I resigned my advisory positi I resigned my advisory position and never had a

on and never had a

gain from that relationship gain from that relationship