Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

While encryption can protect the secrecy of data, it is of little use if the dat

ID: 2079581 • Letter: W

Question

While encryption can protect the secrecy of data, it is of little use if the data is needed for external processing. One example is electronic voting: while individual votes should be treated as secret, the election official must be able to tally up individual votes to determine the outcome of the election. As such, votes cannot be encrypted. In this problem, we explore an alternative scheme called secret sharing to protect the secrecy of individual votes while allowing some statistics to be collected. Assume that you live in a very small town with 101 citizens. A proposition is on the ballot and it will pass if the number of citizens voting for it (a vote of 1) exceeds that of those voting against it (a vote of 0). To ensure the integrity of the election process, 2 independent election judges are hired to tally the results and it is assumed that they do not communicate with each other in any way. The secret sharing voting system works as follows: the i-th voter first makes up her mind about her secret vote v(i), which can either be 0 or 1. Then, she secretly generates a uniformly random nonce r(i) {0, 1, ..., 102}. Finally, she creates 2 "secret shares" S_1 (i) and s_2 (i) for the 2 judges using the following formulae: s_1 (i) = r(i) + v(i) mod 103 s_2 (i) = 2r(i) + v(i) mod 103 After receiving the secret shares from each voter, the two judges privately compute the following sums: t_1 = sigma_i = 1^101 S_1 (i) mod 103 t_2 = sigma_i = 1^101 S_2 (i) mod 103 and announce these two numbers on TV. a. Show that each election judge knows nothing about the individual vote v(i) given the received share. b. How can we compute the election result, i.e. sigma_i = 1^101 v(i), based on t_1 and t_2?

Explanation / Answer

clc
v=randi([1 2],1,101)-1;
r=randi([1 103],1,101)-1;
s1=r+mod(v,103);
s2=2*r+mod(v,103);
t1=0;
t2=0;
for i=1:101
t1=t1+mod(s1(i),103);
t2=t2+mod(s2(i),103);
end
disp(t1);
disp(t2);
if (t1>t2)
disp('against resolution')
else
disp('for resolution')
end