• No results found

D Shape of Valid Ballots

In this section, we show that we can derive a specific shape for ballots that pass the different tests during the protocol execution. We first define a measure for the length of terms and provide a definition for what we call valid ballots.

Definition 8. We define|.| : T (Σ, X , N ) → N recursively as follows:

• |u| = 1 for u a constant or a variable,

• |f(u1, . . . , un)| =P |ui| if f ∈ {+, ∗, ◦, }.

• |f(u1, . . . , un)| = 1 +P |ui| otherwise.

We also defineL : T (Σ,X , N ) → N×N which is defined as L(M) = (||M||, |M|) where ||.|| : T (Σ, X , N ) → N is defined as follows with #(M ) the number of◦ symbols in M:

• ||u|| = 0 for u a constant or a variable,

• ||f(u1, . . . , un)|| =

#(f (u1, . . . , un)) +P ||ui||, f ∈ {penc, renc}

P ||ui||, otherwise.

Definition 9. Letid ∈ {id1, . . . , idn}. A term M is said to be a id-valid ballot if φB(id, M ) is verified, equivalently:





M = hM1, M2, M3, M4i M1 =E vk(id)

checksign(hM2, M3i, M1, M4) =E ok checkpfk1(M1, M2, M3) =E ok

.

Then, we can give the general shape of the two first ballots submitted by honest voters on which we have some extra information. But we first recall some definitions:

θinit={vk(idk)/idpk,s(idk)/sk | k = 1..n} | {vk(idR)/idpR} | {pk(ak)/gk | k = 1..3}, θ0= θinit| {penc(vk,tk,g1)/ek,pfk1(idk,tk,vk,ek)/pk,sign(hek,pki,idk)/sik| k = 1..2}, θk= θk−1| {sign(hash(Π1(Mk)),idR)/srk,d(p(idk),dec(Π2(Mk),a3))/reck}, ˆ

σij={Mkα/xk | k = 1..i} | {Nkα/xbk| k = 1..min(i, 2)} | {Ukα/dk,Wkα/hbk| k = 1..j}.

Lemma 17. We consider i ∈ {1, 2} and M a free term such that fv(M) ⊆ dom(θi−1σˆ0i−1σL) and M θi−1σˆ0i−1σL be anidi-valid ballot. We suppose thatν ˜ω.θi−1ˆσi−10 σLs ν ˜ω.θi−1ˆσi−10 σR. Then, we have, forσ∈ {σL, σR} :

M θi−1σˆi0−1σ =Ehidpi, ei, pi, siii−1σˆi0−1σ.

Proof. Leti∈ {1, 2} and M a free term s.t. fv(M) ⊆ dom(θi−1σˆi0−1σL) and M θi−1σˆi0−1σLis a idi-valid ballot. LetM0minimal in size - according to the measure of lengthL defined in Definition 8 - such that:

M0θi−1ˆσi0−1σL=EM θi−1σˆ0i−1σL.

According to Definition 9, we haveM0θi−1σˆ0i−1σL =EhP1, P2, P3, P4i.

• Let suppose thatM0 is a variable. Since @ x ∈ dom(θi−1) such that xθi−1σˆ0i−1σL is a idi-valid ballot, there is a contradiction.

• Thus, M0 = f (M1, . . . , Mn) with f ∈ {dec, fst, pair, snd, unblind} since only equations (E-1), (E-2), (E-3) and (E-7) can lead tohP1, P2, P3, P4i.

– Iff ∈ {dec, fst, snd, unblind}, using Lemma 15, we have a contradiction with the fact that head(M0θi−1σˆi0−1σL) = pair.

– Iff = pair, then M0 = hM1, M00i, with some free M1. By repeating this reasoning, we get thatM0=hM1, M2, M3, M4i, with some free Mifori∈J1, 4K. Thus we have :

M0θi−1σˆ0i−1σL=EhM1, M2, M3, M4i−1σˆi0−1σL

=EM θi−1ˆσi−10 σL.

Sinceν ˜ω.θi−1σˆi−10 σLsν ˜ω.θi−1σˆ0i−1σR, then, forσ∈ {σL, σR}:

M θi−1ˆσi0−1σ =E hM1, M2, M3, M4i−1σˆ0i−1σ.

Moreover, using again Definition 9, we have that:

M1θi−1σˆi−10 σL=Evk(idi),

M3θi−1σˆi0−1σL=Epfk1(idi, N1, N2, M2θi−1σˆ0i−1σL), M4σˆi−1σi0−1σL=Esign(hM2, M3i−1σˆ0i−1σL, idi).

According to Lemma 16, we know thatM1,M3andM4must be variables or constructed terms. But since, according Lemma 9,idiis not deducible,M1,M3andM4 must be variables. In that case, we must have M1 = idpi,M3= piandM4 = sii. And, according to the fact thatν ˜ω.θi−1σˆi0−1σLsν ˜ω.θi−1ˆσi0−1σR, we have, forσ∈ {σL, σR} and for some free M2:

M θi−1σˆ0i−1σ =Ehidpi, M2, pi, siii−1σˆi0−1σ.

Now, sinceM3 = piand according to Definition 9, we must have thatM2θi−1σˆi0−1σL=E penc(vi, ti, g1) withM2free. Thus,M2is a variable orM2= f (M10, . . . , Mk0) with f ∈ {◦, dec, fst, penc, renc, snd, unblind}:

• Iff ∈ {dec, fst, snd, unblind}, using Lemma 15, we get a contradiction on the fact that head(M2θi−1σˆ0i−1σL) = penc.

• IfM2= penc(M10, M20, M30) with free terms M10,M20 andM30, then using Lemma 14 we must have M20 = tiwhich is in contradiction with Lemma 9 and the fact thattiis not deducible.

• IfM2= renc(M10, M20) with M10andM20free terms. We must haveM10θi−1σˆi0−1σL=Epenc(M100, M200, pk(M300)) leading to the fact that a1 =AC M300+ M20θi−1ˆσi0−1σL whereM20 is free which is a contradiction

with Lemma 9.

• IfM2 = k=1p Mk0 withMk0 free andhead(Mk0)6= ◦ for k ∈ J1, pK. To have a reduction, we must have, fork ∈ J1, pK, that Mk0θi−1σˆ0i−1σL =E penc(Mk1, Mk2, pk(Mk3)), and since e1ande2are the only variables leading to a penc-headed term, we must have one Mk0 which is not a variable, otherwise we would havet1q ∗ t2s = t1withq + s = p≥ 2. Due to the study of previous cases, we must have thatMk0 = penc(M100, M200, M300) or renc(penc(M100, M200, M300), M400), but this leads to M200θi−1σˆ0i−1σL∗ U = t1with freeM200which leads to a contradiction due to Lemma 9.

Thus, we have M2 variable and M2 = e1, which allows us to conclude the proof, using equivalence between the two frames.

We know can give the general shape of the ballots submitted by the intruder, under the condition they are accepted by the Ballot Box. Once again, let us remind the usual notations:

θinit={vk(idk)/idpk,s(idk)/sk | k = 1..n} | {vk(idR)/idpR} | {pk(ak)/gk | k = 1..3}, θ0= θinit| {penc(vk,tk,g1)/ek,pfk1(idk,tk,vk,ek)/pk,sign(hek,pki,idk)/sik| k = 1..2}, θk= θk−1| {sign(hash(Π1(Mk)),idR)/srk,d(p(idk),dec(Π2(Mk),a3))/reck}, ˆ

σij={Mkα/xk | k = 1..i} | {Nkα/xk

b | k = 1..min(i, 2)} | {Ukα/dk,Wkα/hbk| k = 1..j}.

Lemma 18. Using previous notations, leti ∈ J3, nK and M a free term s.t. fv(M ) ⊆ dom(θi−1σˆi0−1) andM θi−1ˆσi0−1σLis anidi-valid ballot. We suppose thatν ˜ω.θi−1σˆi0−1σLsν ˜ω.θi−1σˆ0i−1σR. Then, for σ∈ {σL, σR} :

• M θi−1σˆi0−1σ =E hM1, M2, M3, M4i−1σˆ0i−1σ with free M1,. . . ,M4,

• M1θi−1σˆi−10 σ =Evk(idii−1ˆσi−10 σ,

• M3θi−1σˆi−10 σ =Epfk1(idi, N1, N2, N3i−1σˆi−10 σ with free N1, . . . , N3,

• M2θi−1σˆi−10 σ =Epenc(N2, N1, U )θi−1σˆ0i−1σ with free U or U =ACpk(ap+ U0) with free U0and ap∈ {a1, a3}.

Proof. Leti∈ {3, . . . , n}. Let M such that Mθi−1ˆσi0−1σLis a idi-valid ballot. LetM0minimal in size -according to the measure of lengthL defined in Definition 8 - such that :

M0θi−1σˆ0i−1σL=EM θi−1σˆi0−1σL (†) Using Definition 9, we haveM0θi−1σˆ0i−1σL=hP1, P2, P3, P4i.

• Let suppose thatMi0 is a variable. Since @ x ∈ dom(θi−1) such that xθi−1σˆ0i−1σL is a idi-valid ballot, there is a contradiction.

• Thus, M0 = f (M1, . . . , Mp) with f ∈ {dec, fst, pair, snd, unblind} since only equations (E-1), (E-2), (E-3) and (E-7) can lead tohP1, P2, P3, P4i.

– Iff ∈ {dec, fst, snd, unblind}, using Lemma 15, we have a contradiction with the fact that head(Mi0θi−1σˆi−10 σL) = pair.

– Iff = pair, then M0 = hM1, M00i, with some free M1. By repeating this reasoning, we get thatM0=hM1, M2, M3, M4i, with some free terms M1,M2,M3andM4. Thus we have :

M0θi−1σˆ0i−1σL=EhM1, M2, M3, M4i−1σˆi0−1σL

=EM θi−1σi0−1σL.

Sinceν ˜ω.θi−1σˆi0−1σLsν ˜ω.θi−1σˆ0i−1σR, then, forσ∈ {σL, σR}:

M θi−1σi−10 σ =E hM1, M2, M3, M4i−1σ0i−1σ.

Definition 9 implies thatM1θi−1σˆ0i−1σL =E vk(idi). Since idiis deducible (it is not restricted), we have here a public test and the equivalence is sufficient to show thatM1θi−1σˆi−10 σ =E vk(idii−1ˆσi−10 σ forσ∈ {σL, σR}.

Moreover, using Definition 9, we also have thatM3θi−1σˆ0i−1σL=E pfk1(idi, P1, P2, P3).

• M3cannot be a variable since there is nox∈ dom(θi−1) s.t. xθi−1ˆσi0−1σL = pfk1(idi, P1, P2, P3) withi≥ 3.

• Thus, M3 = f (N1, . . . , Np) with f ∈ {dec, fst, pfk1, snd, unblind} since only equations (E-1), (E-2), (E-3) and (E-7) lead topfk1(idi, P1, P2, P3).

– Iff ∈ {dec, fst, snd, unblind}, using Lemma 15, we have a contradiction with the fact that head(M3θi−1σˆi0−1σL) = pfk1.

– Iff = pfk1, thenM3= pfk1(idi, N1, N2, N3), with some free N1,N2,N3. Sinceν ˜ω.θi−1σˆi0−1σL

sν ˜ω.θi−1σˆ0i−1σR, we have, forσ∈ {σL, σR}:

M3θi−1σˆ0i−1σ =Epfk1(idi, N1, N2, N3i−1σˆi0−1σ.

Finally, Definition 9 gives us that, for some termU , we have:

M2θi−1σˆ0i−1σL=Epenc(N2θi−1σi−1σL, N1θi−1σˆ0i−1σL, U ).

• IfM2is a variable, thenM2∈ {e1, e2}. In that case, we would have N1θi−1ˆσi0−1σL =E t1(ort2) with freeN1which would mean thatt1(ort2) is deducible which is in contradiction with Lemma 9.

• Thus, M2 = f (V1, . . . , Vp) with f ∈ {dec, fst, penc, renc, snd, unblind, ◦} since only equations (E-1) to (E-3) and (E-5) to (E-7) lead topenc(P1, P2, P3).

– Iff ∈ {dec, fst, snd, unblind}, using Lemma 15, we have a contradiction with the fact that head(M2θi−1σˆi0−1σL) = penc.

– If f = renc i.e. M2 = renc(V1, V2). If V1 is variable, then V1 ∈ {e1, e2} and we would have a contradiction with Lemma 9 since we would haveN1θi−1σˆ0i−1σL =E tiandtiwould be deducible. Then V1 = g(V10, . . . , Vp0) with g ∈ {dec, fst, penc, renc, unblind, ◦} since head(V1θi−1σ0i−1σL) = penc.

* If g ∈ {dec, fst, snd, unblind}, using Lemma 15, we have a contradiction with the fact that head(V1θi−1σˆ0i−1σL) = penc.

* If g = renc and V1 = renc(V10, V20), we have a contradiction with the minimality of M2

sincerenc(V10, V20+ V2) is a smaller recipe than renc(renc(V10, V20), V2) for L.

* If g = ◦ and V1 = V10◦ V20, we also have a contradiction with the minimality ofM2

sincerenc(V10, V2)◦ renc(V20, V2) is a smaller recipe than renc(V10◦ V20, V2) according to the Definition 8 of the measureL. Indeed, since M2θi−1σˆ0i−1σL is reducing, we have (V10θi−1ˆσi0−1σL)↓= penc(U1, U10, U100) and (V20θi−1σi0−1σL)↓= penc(U2, U20, U200) with U100= U200implying that the two recipes lead to the same term.

* If g = penc and V1= penc(V10, V20, V30). We have two cases :

· IfV30is a variable, thenV30 ∈ {g1, g2, g3} and M2 = renc(penc(V10, V20, gp), V2) with free termsV10,V20andV2. In that case, we have :

M2θi−1σˆ0i−1σL=Erenc(penc(V10, V20, gp), V2i−1σˆi0−1σL(‡)

=Epenc(V10, V20, pk(ap+ V2))θi−1σˆ0i−1σL

Thanks to the fact thatν ˜ω.θi−1σˆi0−1σLsν ˜ω.θi−1σˆ0i−1σRand (‡), we also have that:

M2θi−1σˆi−1σR=Erenc(penc(V10, V20, gp), V2i−1σˆi−10 σR

=Epenc(V10, V20, pk(ap+ V2))θi−1σˆ0i−1σR

Then, we have, forσ∈ {σL, σR} :

M2θi−1σˆi0−1σ =Epenc(V10, V20, pk(ap+ V2)))θi−1σˆi0−1σ.

Since

M2θi−1σˆi−10 σL=Epenc(N2θi−1σˆ0i−1σL, N1θi−1σˆ0i−1σL, U ) we have thatV10θi−1σˆi−10 σL=EN2θi−1σˆ0i−1σLand

V20θi−1σˆ0i−1σL =EN1θi−1σˆ0i−1σL. Using the fact thatν ˜ω.θi−1σˆ0i−1σLsν ˜ω.θi−1ˆσi−10 σR, these equalities hold withσR. Finally, forσ∈ {σL, σR} and free V2:

M2θi−1σˆ0i−1σ =Epenc(N2, N1, pk(ap+ V2))θi−1σˆ0i−1σ.

(Witha2deducible,pk(a2+ V2) can be seen as a free U .)

· If V30 = h(V100, . . . , Vq00) with h ∈ {dec, fst, pk, snd, unblind}, we conclude easily with a contradiction whenh 6= pk using Lemma 15. If h = pk then there is con-tradiction with minimality ofM2 sincepenc(V10, V20, pk(V100+ V2)) is smaller than W3j = g2 otherwise this would imply that a1 or a3 is deducible which is contradic-tion with Lemma 9. Since ∀j ∈ J1, nK we have W

Then, we have, forσ∈ {σL, σR} :

M2θi−1σˆi0−1σ =E penc(V10, V20, pk(a2+ V30))θi−1σˆ0i−1σ.

* If p1 = 0, we have M = ◦pj=12 renc(penc(W1j, W2j, W3j), V5j) with W3j variables. To have a reduction, we still need to have that∀p, q ∈ J1, nK pk(ap+ V5p) = pk(aq+ V5q) whereap, aq ∈ {a1, a2, a3}. That leads us to M2 = ◦pj=12 renc(penc(W1j, W2j, gk), V51) withk∈ {1, 2, 3} and free W1j,W2j,V51(V51is the minimal recipe among allV5j).

Then, we have :

M2θi−1σˆi0−1σL

=◦pj=12 renc(penc(W1j, W2j, gk), V5ki−1σi−10 σL(††)

=Epenc(pj=12 W1j,∗pj=12 W2j, pk(ak+ V51))θi−1σˆ0i−1σL.

Thanks to the fact thatν ˜ω.θi−1σˆ0i−1σLsν ˜ω.θi−1σˆ0i−1σRand (††), we also have that:

M2θi−1σˆ0i−1σR

=◦pj=12 renc(penc(W1j, W2j, gk), V51i−1ˆσi−10 σR

=E penc(pj=12 W1j,∗pj=12 W2j, pk(ak+ V51))θi−1σˆi0−1σR. Then, we have, forσ∈ {σL, σR} :

M2θi−1σˆi−10 σ =Epenc(V10, V20, pk(ak+ V30))θi−1σˆ0i−1σ.

Then, in both cases (p1 = 1 or p1 = 0), we have, for σ ∈ {σL, σR}, there is i ∈J1, 3K such that:

M2θi−1σˆi−10 σ =Epenc(V10, V20, pk(ak+ V30))θi−1σˆ0i−1σ.

SinceM2θi−1σˆ0i−1σL =E penc(N2θi−1ˆσi−10 σL, N1θi−1ˆσi−10 σL, U ) then V10θi−1ˆσi−10 σL =E

N2θi−1σˆ0i−1σLandV20θi−1σˆ0i−1σL=E N1θi−1ˆσi−10 σL. Using the fact thatν ˜ω.θi−1ˆσi−10 σLs ν ˜ω.θi−1σˆi−10 σR, these equalities hold withσR. Finally, we have, forσ∈ {σL, σR}:

M2θi−1σˆi0−1σ =Epenc(N2, N1, pk(ak+ V30))θi−1σi0−1σ.

Again,pk(a2+ V30) can be seen as a free term U since a2is deducible.

The next lemma gives the general shape of a ballot submitted by the intruder provided the fact that it is accepted by the Receipt generator in the first execution and shows that it is also accepted in the second execution. As usual, let us remind the usual notations:

θinit={vk(idk)/idpk,s(idk)/sk | k = 1..n} | {vk(idR)/idpR} | {pk(ak)/gk | k = 1..3}, θ0= θinit| {penc(vk,tk,g1)/ek,pfk1(idk,tk,vk,ek)/pk,sign(hek,pki,idk)/sik| k = 1..2}, θk= θk−1| {sign(hash(Π1(Mk)),idR)/srk,d(p(idk),dec(Π2(Mk),a3))/reck}, ˆ

σij={Mkα/xk | k = 1..i} | {Nkα/xbk| k = 1..min(i, 2)} | {Ukα/dk,Wkα/hbk| k = 1..j}.

Lemma 19. We consideri∈J1, nK and M a free term such that fv(M ) ⊆ dom(θi−1σˆ0i−1) and such that φR(idpi, M )θi−1σˆi0−1σL=Eok with:

φR(id, x) = (x =hx1, x2, x3i) ∧ (x1=hy1, y2, y3, y4i) ∧ (y1= id)

∧ (checksign(hy2, y3i, y1, y4))∧ (checkpfk1(y1, y2, y3))

∧ (checkpfk2(y1, y2, x2, x3)) .

Assuming thatν ˜ω.θi−1σˆi−10 σLsν ˜ω.θi−1ˆσi−10 σR, then, forσ∈ {σL, σR}:

• φR(idpi, M )θi−1σˆ0i−1σ =Eok,

• M θi−1σˆi0−1σ =E hP, Q, Riθi−1σˆ0i−1σ for free terms P , Q and R.

• Fori∈ {1, 2}, we have:

– P θi−1σaˆ 0i−1σ =E hidpi, ei, pi, siii−1ˆσi0−1σ

– Qθi−1σˆ0i−1σ =Eblind(renc(ei, Q1), Q2i−1ˆσi0−1σ with Q1andQ2free terms.

• Fori∈J3, nK, we have:

– P θi−1σˆ0i−1σ =EhP1, P2, P3, P4i−1σˆ0i−1σ with P1,. . . ,P4free terms,

– Qθi−1σˆ0i−1σ =E blind(penc(Q1, Q2, U ), Q3i−1σˆi0−1σ with free Q1,Q2,Q3,U or U =AC

pk(ap+ U0) with free U0andap∈ {a1, a3}.

Proof.

• Using the fact thatν ˜ω.θi−1σˆi0−1σLs ν ˜ω.θi−1σˆ0i−1σR and sinceφR(idpi, M ) is a public test, we have that the first property holds obviously.

• Now, using thatφR(idpi, M )θi−1σˆi−10 σ =E ok, we have that, M θi−1σˆi−10 σL =E hM1, M2, M3i.

By repeating the same reasoning as we did in the proof of Lemma 18, we have thatM θi−1σˆi0−1σ =E

hP, Q, Riθi−1σˆi0−1σ with free term P , Q and R for σ∈ {σL, σR}.

• Leti∈ {1, 2}.

– SinceφR(idpi, M )θi−1ˆσi−10 σ =E ok, we have that P θi−1σˆi−10 σLmust be an idi-valid ballot.

Then, we use Lemma 17 to conclude on the form ofP θi−1σˆi−10 σ.

– We also have thatcheckpfk2(idpi, ei, Q, R)θi−1σˆi0−1σL=Eok, thus Rθi−1σˆ0i−1σL =Epfk2(R1, R2, R3, R4, R5) withR1= vk(idi) and R4 = eiθi−1σˆ0i−1σL. We considerR0minimal in size (for the measure

L) such that Rθi−1σˆ0i−1σL =ER0θi−1σˆ0i−1σL.

* R0cannot be a variable since there is no variablex∈ dom(θi−1) such that head(xθi−1σˆi0−1σL) = pfk2.

* R0 = f (R1, . . . , Rp) with f ∈ {dec, fst, pfk2, snd, unblind} since only equations (E-1), (E-2), (E-3) and (E-7) can lead to a term of the formpfk2(R1, R2, R3, R4, R5).

· Iff ∈ {dec, fst, snd, unblind}, using Lemma 15, we have a contradiction with the fact thathead(R0θi−1σaˆ 0i−1σL) = pfk2.

· Iff = pfk2, thenR0 = pfk2(R1, R2, R3, R4, R5), with some free Rjforj ∈J1, 5K.

Since we have that(R =Epfk2(idpi, R1, R2, ei, R3))θi−1σˆ0i−1σLandν ˜ω.θi−1σˆ0i−1σLs ν ˜ω.θi−1σˆ0i−1σR, we conclude that:

(R =Epfk2(idpi, R1, R2, ei, R3))θi−1σˆ0i−1σR. Thus, forσ∈ {σL, σR}, we have:

i−1σˆi0−1σ =Epfk2(idpi, R1, R2, ei, R3i−1σaˆ 0i−1σ.

Moreover, we also have, according to Equation E-10, and repeating the same development as we just did, that:

i−1σˆ0i−1σ =Eblind(renc(ei, R1), R2i−1σˆi−10 σ.

• Leti∈J3, nK.

– SinceφR(idpi, M )θi−1σˆ0i−1σ =E ok, we have that P θi−1σˆ0i−1σLis an idi-valid ballot. Using Lemma 18, we haveP θi−1ˆσi−10 σ =E hP1, P2, P3, P4i−1σˆ0i−1σ with free terms Pj forj ∈ J1, 4K and σ ∈ {σL, σR}.

– According to Lemma 18, we also get thatP2θi−1ˆσi0−1σ =E penc(P10, P20, U )θi−1σˆ0i−1σ for free termsP10,P20and free termU or U =AC pk(ap+ U0) with free U0andap∈ {a1, a3}. Now, according to Equation E-10 and by repeating the same reasoning as in the previous case in this situation, we can deduce thatRθi−1σˆ0i−1σ =E pfk2(vk(idi), R1, R2, R3, R4i−1σˆi0−1σ with freeRi fori ∈ J1, 4K and σ ∈ {σL, σR}. This equation also provides that Qθi−1σˆ0i−1σ =E

blind(renc(P2, R1), R2i−1σˆi0−1σ. Now, since P2θi−1σˆ0i−1σ =Epenc(P10, P20, U )θi−1σˆ0i−1σ, we can conclude that:

i−1σˆ0i−1σ =Eblind(penc(Q1, Q2, U ), Q3i−1ˆσi−10 σ

with freeQ1,Q2,Q3and freeU or U =AC pk(ap+ U0) with free U0andap∈ {a1, a3}.

Related documents