WEBVTT

00:00.000 --> 00:06.540
I'd like to go to the next presentation, and it is Machine Voting, the Bulgarian Experience.

00:06.540 --> 00:26.340
So Alex Stanov is the CTO of Information Services for JSC, and been a software developer starting in the late 90s for a wide variety of projects, from specialized hardware drivers to large scale information citizens for private and public sectors, including e-government services,

00:26.340 --> 00:29.080
elections management, and smart cities.

00:29.740 --> 00:39.520
And so since 2003, Alex has been a leading computer processing of all election results and referendum projects in Bulgaria.

00:39.820 --> 00:43.040
So we're going to learn what goes on in other parts of the world as well.

00:43.040 --> 00:51.780
And as a consultant for the Central Election Commission of Bulgaria, Alex is the primary author of technical and security requirements for election machines used in Bulgaria.

00:51.780 --> 00:54.100
So welcome, Alex, to the stage.

00:57.560 --> 00:59.420
Thank you all.

01:00.400 --> 01:07.700
I'm happy to see so many interesting faces for the processes in Bulgaria.

01:08.060 --> 01:15.520
I hope we can share some ideas, problems, and solutions.

01:15.940 --> 01:23.880
So we already know that my background is IT technical background.

01:23.880 --> 01:28.020
I've been for many years a software developer, then project manager.

01:28.580 --> 01:34.060
Then I have some IT security and penetration testing background.

01:34.060 --> 01:40.760
And in the end, I had to lead the technical side of computer processing of the results.

01:40.760 --> 01:51.820
So this put me in some unique situation where I know IT and I know the election processes in Bulgaria.

01:51.820 --> 01:55.080
So this was very interesting.

01:55.080 --> 01:57.840
Of course, I'm doing a lot of stuff.

01:57.840 --> 02:13.640
And as you can see here, my GitHub, you can see the other things because this talk is a bit different from my other talks here in DEF CON or Black Hat, which are more technical ones.

02:13.880 --> 02:17.460
So first, let's start a bit about Bulgaria.

02:17.460 --> 02:20.580
It's a country here in Eastern Europe.

02:20.580 --> 02:23.340
It's part of European Union.

02:23.340 --> 02:27.300
We have a population of 7 million people.

02:27.600 --> 02:31.820
And it's the size about of Nevada.

02:32.240 --> 02:41.840
So what you're seeing here can be safely transferred like just one state in the U.S.

02:41.840 --> 02:48.640
So we have 265 municipalities where they do different kind of elections.

02:48.640 --> 02:53.540
And we have around 12,000 polling stations.

02:54.680 --> 03:01.810
Naturally, we have elections for president, for our national parliament, EU parliament.

03:01.810 --> 03:10.230
Since 2007, we were a member of EU and we have local elections.

03:10.230 --> 03:19.470
This year, we already had other European countries' elections for European parliament.

03:19.470 --> 03:28.450
And in just a couple of months, we'll have local elections, which are way more difficult than others.

03:28.450 --> 03:38.870
So let's first start how we vote now and what are the processes here, how we put there the machine voting.

03:39.290 --> 03:44.250
So generally speaking, you see two ballots.

03:44.250 --> 03:48.630
The first one is just majority candidates.

03:48.630 --> 03:52.110
This is a ballot for president, I think.

03:52.110 --> 03:54.010
And you have here the party.

03:54.010 --> 03:56.990
You have the person, the candidate.

03:56.990 --> 04:05.350
And you just have to scratch with X or V the chosen candidate.

04:05.630 --> 04:17.290
On the other part, on the other side, you have the preferential ballot where you first choose the party.

04:17.290 --> 04:25.710
And after that, you give preference to choosing from your candidate via these circles here.

04:25.810 --> 04:33.910
And if the candidate collects enough votes, he can push and be elected.

04:33.910 --> 04:44.430
If this party gets enough results, yeah, and this can go here.

04:44.670 --> 05:02.430
And this generally is a good thing because it allows for another majority, but it's highly sophisticated and makes non-trivial the processing of the results.

05:02.630 --> 05:16.910
So when people vote in the e-day, in the end, the polling station members can count in the ballots, the paper ballots, and they feel a polling station protocol with the results.

05:17.630 --> 05:21.270
This is how it looks like, just the first pages.

05:22.490 --> 05:30.810
This protocol looks pretty clean, but in reality, we receive this.

05:31.410 --> 05:40.490
You see a lot of scratches, a lot of corrections here, and in the end, you don't know what exactly happened in that section.

05:40.490 --> 05:53.150
Of course, if we are not so sure what happens, they open the bags with the ballots, recount, and et cetera.

05:56.860 --> 06:02.380
So, putting machines in this equation.

06:03.020 --> 06:05.360
All voting machines are offline.

06:05.360 --> 06:11.320
We don't have online machines, as in most states, as I understood.

06:11.940 --> 06:22.640
When the voter goes in the polling station, he can decide if we will vote by paper ballot or on the machine.

06:23.340 --> 06:31.880
And after that, they fill the protocol with the results written from the machine on the USB drive.

06:32.480 --> 06:37.040
And this is where it gets really crazy.

06:37.040 --> 06:51.320
So, the polling station members have to send by hand the results from the machine with the results on the paper voting, and they have to put it on these protocols.

06:52.460 --> 07:07.600
After that, all this is transferred from polling station to IT centers where the data from these paper protocols are entered by operators.

07:07.640 --> 07:11.720
In fact, we have two stages of data entry.

07:12.300 --> 07:30.420
On the left, you see where the polling station members go and go with the USB drives from the machines and with the protocols and give them to operators.

07:30.420 --> 07:31.980
They do first entry.

07:31.980 --> 07:40.220
After that, in separate IT center, deployed from different place, it's reentered again.

07:40.520 --> 07:46.720
So, you can catch the eventual discrepancies between those both databases.

07:46.720 --> 07:56.920
This is a lot of hard work, which sometimes happens for about 72 hours.

08:00.690 --> 08:10.490
In the e-voting in Bulgaria, we in Bulgaria very much like and love to do experiments with different things.

08:10.570 --> 08:18.830
So, back in 2009, we have these machines.

08:18.830 --> 08:34.590
You can see here the magnetic stripe card reader, touchscreen, and I don't know why, but they put two UPS devices because to have power is paramount.

08:35.510 --> 08:44.990
So, the good thing was that this happened only in nine polling stations from, you remember, 12,000.

08:45.550 --> 08:53.270
And we didn't have too big problems with this.

08:54.370 --> 08:58.490
After that, we continued with the experiments.

08:58.490 --> 09:07.450
And back in 2014, we did it with 100 polling stations machines, then with 300.

09:08.010 --> 09:21.550
And if you can see there, we fall to 50 because from this, they started to use the results, not just as experiment, but we use the results for real.

09:22.270 --> 09:27.290
This was the machine back then that we're using.

09:29.230 --> 09:49.450
And maybe the important thing here is that Bulgarian government decided not to buy these machines, but every time we rent it or lend it because they're not so sure who can keep them.

09:49.450 --> 10:00.150
Will they be needed if there is a legislation change because all these were experiments and et cetera, et cetera.

10:01.270 --> 10:15.230
So, from the experiment, what we know with this kind of machines, the first version were installed with outdated Windows XP.

10:15.550 --> 10:20.470
When somebody screamed about that, it was in 2007.

10:22.190 --> 10:31.930
The way that the machine is activated to allow somebody to vote was with, you see this cable here.

10:31.930 --> 10:45.790
On the other end, you have just a button which is pressed by the polling station officer and the machine unlocks.

10:45.790 --> 10:48.710
So, no other way.

10:50.250 --> 10:56.810
The problem here, yes, the machine prints paper slips and you pass these slips here.

10:56.810 --> 10:59.770
So, you have paper edited trail.

11:00.450 --> 11:10.210
Of course, we have the slips, but we didn't have the legislation that requires those slips to be accounted.

11:10.210 --> 11:12.330
So, of course, we never counted.

11:12.750 --> 11:14.970
But yeah, we have the trail.

11:15.890 --> 11:41.490
There were some issues with missing flash drives and, of course, very low machine voting usage because generally the campaign had to be in a very narrow time and nobody understood that if we can use the machines at all.

11:42.190 --> 11:48.590
And, of course, there were some polling stations where the machines were not powered on.

11:51.050 --> 12:18.130
So, in the beginning of 2019, the Central Election Commission tasked me to draft new requirements for the machines because most of the people understood that this is a problem the way we're doing it and we have to have something more current against current threats.

12:18.890 --> 12:24.650
So, in the requirements, we put very strict hardware and crypto algorithm requirements.

12:25.490 --> 12:37.170
We put that the machine can't have any external communication interfaces, so the air gap principle will be kept.

12:37.170 --> 12:45.730
We required to have a secure boot so we know that nobody changed the machine in transit.

12:46.190 --> 12:52.450
We required a full disk encryption, of course, against this tampering again.

12:53.210 --> 13:06.070
We put very hard requirements about what should be in the OS image, what drivers, what components should be stripped.

13:06.890 --> 13:18.200
So, we have... I'll get to that because we're still on the stage of requirements.

13:21.770 --> 13:48.050
After that, the guys who rented the machines have to do a certificate authority and the own initialization data about the candidates, about the parties must be signed and the machine have to decline to vote, to refuse to vote on signed data.

13:48.590 --> 13:59.470
And in the end, we have activation with smart cards, two control and three voters as seen here.

13:59.470 --> 14:05.730
So, when the voter decides to vote, he gets one voter card.

14:05.810 --> 14:10.250
It can unlock the machine and vote with it.

14:10.370 --> 14:17.350
The vote must be signed on the electronic ballot with this smart card.

14:17.350 --> 14:25.430
After that, he returns this card and the next voter can vote only with one of the first two cards.

14:25.430 --> 14:35.850
So, they rotate and we avoid this interesting button that you saw on the previous machine.

14:38.640 --> 14:54.020
Of course, the usual requirements for Vivipet's slips counting, a very detailed voting process descriptions that have to be implemented are also in place.

14:54.360 --> 15:10.000
We wanted to see the code and we had requirements about unit tests that have to be covered, the coverage of testing and etc.

15:10.000 --> 15:22.080
All the things that we are doing when we are developing, trying to develop high quality and secure information systems were in place.

15:24.200 --> 15:26.840
So, what happened?

15:27.480 --> 15:33.920
Because those machines were rented again, they came with Ubuntu Linux.

15:37.040 --> 15:43.720
Of course, they were smart card activated with external batteries.

15:44.100 --> 15:51.480
Here is the smart card reader and here is the printout for the results.

15:51.480 --> 16:00.260
As you see, it has places for physical clips where you can clip it with tamper evidence

16:03.540 --> 16:09.460
things and this is how the machine works.

16:09.580 --> 16:24.700
The problem that we had here was that nobody wanted from the government institutions to audit if these machines really adhere to the requirements.

16:25.000 --> 16:35.920
So, the vendor says yes, they are fully compliant by the requirements, but we didn't have somebody to check that.

16:38.220 --> 16:56.540
But all it was, we were obligated to do and we took the team from Bulgarian Academy of Science and Sofia University and under the supervision of Central Election Commission, they did some audit, which is classified.

16:56.540 --> 17:01.600
We haven't seen that and they said we are good.

17:05.240 --> 17:07.540
So, what happened?

17:07.700 --> 17:17.420
Just several months ago, back in May, we rented the machines again, this time 3,000 machines.

17:18.960 --> 17:20.060
No audit.

17:20.060 --> 17:33.280
The time frame for the project, because of those higher requirements, was very narrow and it was practically impossible to do the audit in a proper way.

17:35.360 --> 17:41.920
A lot of polling station workers missed the training and didn't know how to work with this machine.

17:43.460 --> 17:57.280
And we went into coordination hell, basically, between different institutions that have to deal with these machines and their physical and logical protection.

17:59.080 --> 18:01.380
Some statistics.

18:01.380 --> 18:08.380
From 23 machines from 3,000, we missed the results data.

18:10.100 --> 18:17.760
Just 26% of the voters used the machines, despite the previous several experiments.

18:25.250 --> 18:28.290
23% of those who voted.

18:31.350 --> 18:40.450
I have to check, but it's not really important how many, 100 or 1,000.

18:40.890 --> 18:42.870
It's just a percentage.

18:43.110 --> 18:50.130
Generally, in Bulgaria, we have a high percent of voters' activity.

18:50.130 --> 18:58.930
Of course, it's lower on EU elections, but yeah, it was nothing different from other ways.

19:00.330 --> 19:10.990
So, 5% of the machines weren't used at all, and in 10% of the machines, less than 10 people voted on the machines.

19:10.990 --> 19:17.450
Because, remember, you can choose to vote on the machine or to vote with paper.

19:18.130 --> 19:28.170
So, we detected a lot of human errors because we take the polling station protocol, and we take the USB data from the machines.

19:28.350 --> 19:45.170
And in about 2.6% of the polling stations, you had more votes received from the machine than summing up from those on the machine and the paper.

19:45.550 --> 19:52.750
I'm not sure if I said it correctly, but this is really a big problem.

19:53.150 --> 20:05.050
From the preferences that you see, we detected errors in about 40%, which is really high.

20:05.050 --> 20:07.470
Why did that happen?

20:07.550 --> 20:09.830
You see this paper slip.

20:11.610 --> 20:14.590
It comes around here.

20:15.810 --> 20:28.350
So, the polling station officers have to read this and to sum it by hand with the paper ones and to put it on polling station protocol.

20:28.510 --> 20:35.990
And this is very, very error-prone to us as we saw it.

20:36.190 --> 20:52.190
Just for information, the project cost was about 5.1 million US dollars, which was the lending of the machines and services that were getting received.

20:53.390 --> 21:07.870
The aftermath from this was a very wide political and media debate about if we should continue with the machine voting.

21:08.110 --> 21:17.710
There were a lot of concerns about the security, the results accuracy, and, of course, the price of this machine voting.

21:18.670 --> 21:32.790
In the meantime of this debate, on 15th of July, it's just a month from today back, we have the largest up-to-date personal data leak in Bulgaria.

21:33.010 --> 21:43.570
Somebody hacked the machine in our national revenue agency and pulled a lot of personal data of Bulgarian citizens.

21:44.210 --> 22:02.970
Of course, on this debate, it gets a bit negative about machine voting because you can't protect the national revenue agency, how you will protect the machine voting, etc, etc.

22:02.970 --> 22:11.910
And on 3rd of July, just half a month back, we had the legislation changed.

22:11.910 --> 22:20.470
We will not have machine voting on upcoming local elections, which are to be held in October this year.

22:21.070 --> 22:34.490
But for all other elections after this, we will use only machines in polling stations with our 200 voters.

22:34.490 --> 22:35.830
So, go figure.

22:35.830 --> 22:40.990
I really, for myself, I don't know how this was decided in the end.

22:41.610 --> 22:48.690
But yeah, and that's all.

22:49.530 --> 22:50.550
Yes?

22:50.550 --> 22:58.510
Yeah, so when you had the total votes sum be absurdly large, was that because of double voting or double counting?

22:59.770 --> 23:01.490
Total votes for...

23:01.490 --> 23:07.690
You had the problem that the total number of votes was more than the ballots plus the machine thing.

23:07.690 --> 23:09.310
So, that was a problem.

23:09.310 --> 23:11.770
But was it because something was counted twice?

23:11.770 --> 23:14.570
Or was it because some people were able to vote twice?

23:14.570 --> 23:19.590
No, it's not concerning double voting.

23:19.590 --> 23:21.590
There was no double voting.

23:21.590 --> 23:32.330
It was just a human error when you sum the result from this long paper slip with the results from the ballot box.

23:32.850 --> 23:36.770
And they have to write it on this protocol.

23:37.050 --> 23:45.550
Those are about 3,200 numbers that you have to sum.

23:45.850 --> 23:49.370
And, of course, humans make mistakes.

23:50.230 --> 23:51.230
Yes?

23:52.410 --> 23:53.790
Please.

23:58.820 --> 23:59.500
Those?

23:59.500 --> 24:01.040
The next few years.

24:01.760 --> 24:04.800
You said you're missing results from 23 machines.

24:05.520 --> 24:06.520
How many?

24:12.880 --> 24:20.760
Well, those were missing in 23 machines, which means 23 polling stations.

24:20.760 --> 24:26.580
In our legislation, we can't have a polling station with more than 1,000 voters.

24:26.980 --> 24:28.980
This is tops.

24:28.980 --> 24:40.660
And when I say missing results, we have a paper protocol from this polling station, which says that there was a voting there.

24:41.020 --> 24:48.660
But for some reason, which can be, they couldn't find the USB flash drive.

24:48.660 --> 24:54.900
The USB flash drive can be read after that.

24:54.900 --> 24:57.220
Or some other issues.

24:57.220 --> 25:00.740
We just don't have the data from the machines.

25:01.720 --> 25:10.220
But I don't think that for these 23 polling stations, a lot of people use the machines anyway.

25:10.220 --> 25:16.200
Some of those were part of those that were not used at all.

25:19.300 --> 25:20.520
Yes, please.

25:28.520 --> 25:33.480
No, there is no EU regulation on using a voting machine.

25:33.700 --> 25:40.600
There are some just very broad requirements about the voting process.

25:40.600 --> 25:52.820
But every country in the EU decides by itself how it will vote and what processes and mechanisms it will have.

25:52.820 --> 26:02.880
We have a bit more complex requirements concerning the EU elections, which are held in all Europe for one week.

26:02.880 --> 26:08.040
But generally, this is up to every country to decide.

26:25.430 --> 26:33.590
Well, we're not sure because there was not any extensive research on that part.

26:33.590 --> 26:42.790
And the politics like to dribble with that if the machine voting is secure or not.

26:42.970 --> 26:54.390
Of course, half of the parties want machine voting, other half say this is fault and we don't have to use it.

26:54.910 --> 26:57.950
So it's different.

26:58.110 --> 26:59.350
It's really different.

26:59.350 --> 27:06.730
We have some parts of the country where we have very high usage of the machine voting.

27:06.730 --> 27:12.810
So it's not evenly distributed everywhere.

27:12.810 --> 27:18.210
But in some other places, we have really small awareness of that.

27:18.570 --> 27:19.730
Yes, please.

27:35.260 --> 27:54.500
Well, the requirements says that we have to have a paper audit trail and all the data that comes on the USB drive from the machines have to be signed with the smart cards with, of course, the certificate.

27:54.780 --> 28:06.820
And the smart cards have to be transported by different means, not with the machines in conflict, but from different people, yes, from different teams.

28:07.260 --> 28:09.940
All this is in the requirements.

28:09.940 --> 28:17.700
But we really don't know, or at least I don't know, because I haven't been everywhere.

28:17.700 --> 28:24.500
And, of course, I haven't did the audit, and I don't know the audit results.

28:25.300 --> 28:27.080
But it's always okay.

28:27.080 --> 28:32.760
But I believe these controls were in place.

28:32.760 --> 28:35.440
I hope these controls were in place.

29:17.390 --> 29:19.090
Yeah, always connected.

29:46.490 --> 29:50.650
Okay, people can't vote where they decide.

29:50.650 --> 29:54.750
They have to vote in the polling station that they can vote.

29:54.750 --> 29:59.270
And where will be the machines is decided by the Central Election Commission.

29:59.270 --> 30:02.590
So you can choose.

30:02.590 --> 30:09.350
And in most cases, you know, you can use the machine when you go to vote, not before that.

30:14.070 --> 30:17.530
This must be done by the polling station members.

30:17.530 --> 30:20.150
And maybe not.

30:23.110 --> 30:25.530
Yes, there was a campaign about that.

30:25.610 --> 30:28.050
So, okay, sorry, guys.

30:28.090 --> 30:30.890
If there are more questions, I'll be on the back.

30:30.890 --> 30:32.170
Thank you very much.

