Verication of the Direct Anonymous Attestation Protocol
Michael Backes, Matteo Maei,and Dominique Unruh
Saarland University,Saarbrücken, Germany
{backes,maffei,unruh}@cs.uni-sb.de
Abstract
Wedeviseanabstractionofzero-knowledgeprotocolsthatisaccessibletoafully
mechanized analysis. The abstraction is formalized within the applied pi-calculus
using anovelequationaltheory that abstractlycharacterizesthecryptographic
se-mantics of zero-knowledge proofs. We present an encoding from the equational
theoryintoaconvergentrewritingsystemthatissuitablefortheautomated
proto-col verierProVerif. The encoding is sound andfully automated. We successfully
usedProVeriftoobtaintherstmechanizedanalysisoftheDirectAnonymous
At-testation (DAA) protocol. The analysis in particular required us to devise novel
abstractionsofsophisticatedcryptographicsecuritydenitionsbasedoninteractive
games.
1 Introduction
Proofsof security protocols areknown to be error-prone and, owing to the
distributed-systemaspects of multiple interleaved protocol runs, awkward to make for humans. In
fact, vulnerabilities have accompanied the design of such protocols ever since early
au-thentication protocols like Needham-Schroeder [11 , 24 ], over carefully designed de-facto
standards like SSL and PKCS [28, 8 ], up to current widely deployed products like
Mi-crosoft Passport [13 ] and Kerberos [10]. Hence work towards the automation of such
proofs hasstarted soon after the rst protocols were developed; some important
exam-ples of automated security proofs are [23 , 22 , 18 , 21 , 25, 27, 3, 5]. Language-based
techniquesarenowwidelyconsideredaparticularly salientapproachforformally
analyz-ingsecurityprotocols,datingbacktoAbadi'sseminalworkonsecrecybytyping[1]. The
abilityto reasonaboutsecurityatthelanguageleveloftenallowsfor conciselyclarifying
whycertain message components are included in a protocol, how their entirety suces
for establishing desired security guarantees, and for identifying ambiguities in protocol
messages that could be exploited by an adversary to mount a successful attack on the
protocol.
One ofthe central challenges intheanalysisofcomplex andindustrial-size protocols
is the expressiveness of the formalism used inthe formal analysis and its capability to
Cryptography has invented more sophisticated primitives withunique securityfeatures
thatgo far beyond the traditional understanding ofcryptography tosolely oer secrecy
andauthenticityofa communication. Zero-knowledge proofsconstitute themost
promi-nent and arguably most amazing such primitive. A zero-knowledge proof consistsof a
messageor asequenceofmessagesthatcombinestwoseeminglycontradictoryproperties:
First,itconstitutesaproofofastatement
x
(e.g,x
=
themessagewithinthisciphertext begins with0
) that cannot be forged, i.e., it isimpossible, or at leastcomputationally infeasible,toproduceazero-knowledgeproofofawrongstatement. Ontheotherhand,azero-knowledgeproofdoesnotrevealanyinformationbesidesthebarefactthat
x
consti-tutesa valid statement. Inparticular,aproofabout someciphertextwouldnot leakthedecryptionkeyor theplaintext. Zero-knowledgeproofswereintroduced in[17] andwere
provento existforvirtually allstatements[16 ]. Zero-knowledgeproofshave sinceshown
to constitute very powerful building blocksfor theconstruction of sophisticated
crypto-graphicprotocolstosolve demandingprotocoltask: theyallowfor commonlyevaluating
a function ondistributed inputs withoutrevealing anyinputs to theother protocol
par-ticipants [15], they allow for developing encryption schemes that are secure under very
strong active attacks [12],and manymore.
Earlygeneral-purposezero-knowledge proofsweremainlyinventedto showthemere
existence of such proofs for the class of statements under consideration. These proofs
werevery inecient and consequently of only limiteduseinpractical applications. The
recent adventof ecientzero-knowledgeproofsfor specialclasses ofstatements changed
this. The unique security features that zero-knowledge proofs oer combined with the
possibilityto ecientlyimplement someof theseproofshavepaved theseproofstheway
intomoderncryptographicprotocolssuchase-votingprotocolsandanonymityprotocols.
The best known representative of these protocols is the widely-deployed Direct
Anony-mous Attestation (DAA) protocol [9 ]. DAA constitutes a cryptographic protocol that
enables the remote authentication of a Trusted Platform Module (TPM) while
preserv-ing the user's privacy. More precisely, if the user talks to the same verier twice, the
verierisnot able totell ifhe communicates withthesame userasbeforeor witha
dif-ferent one. DAAachievesits anonymitypropertiesbyheavily relyingon non-interactive
zero-knowledgeproofs. Intuitively,theseallowtheTPMtoauthenticatewiththeverier
without revealing theTPM'ssecretidentier.
1.1 Our Contributions
The contribution of the paper is threefold: First, we present an abstraction of
non-interactivezero-knowledgeproofswithintheapplied pi-calculususinganovelequational
theory that abstractly characterizes the cryptographic semantics of these proofs.
Sec-ond, we transform our abstraction into an equivalent formalization that is accessibleto
ProVerif[6],awell-established toolforthemechanizedanalysisofdierentsecurity
prop-erties. Third,weapplyour theorytotheDirectAnonymousAttestation(DAA)protocol
[9], the widely deployed authentication scheme for Trusted Platform Modules (TPMs),
calculuswithfunctions,thathasproventoconstituteasalientfoundationfortheanalysis
of cryptographic protocols, see [2 , 20 , 6, 7, 14]. We devise a novel equational theory
thatconciselyandelegantlycharacterizesthesemanticpropertiesofnon-interactive
zero-knowledgeproofs,andthatallowsforabstractlyreasoningaboutsuchproofs. Thedesign
of the theory in particular requires to carefully address the important principles that
zero-knowledge proofsarebased upon: thesoundnessandthecompleteness oftheproof
vericationaswellastheactualzero-knowledgeproperty,i.e., averiermustnot beable
to learn any newinformation from azero-knowledgeproof exceptfor thevalidity ofthe
proven statement. The only prior work on abstracting zero-knowledge proofs aims at
formalizing in modal logic the informal prose used to describe the properties of these
proofs[19 ]. Incontrast to our abstraction, the abstraction in [19] hasnot been applied
to anyexample protocols,and nomechanizationof security proofsis consideredthere.
Themechanizationoflanguage-basedsecurityproofshasrecentlyenjoyedsubstantial
improvements thathave further strengthened theposition oflanguage-based techniques
as a promising approach for the analysis of complex and industrial-size cryptographic
protocols. ProVerif [6] constitutes a well-established automated protocol verier based
onHornclausesresolutionthatallowsforthevericationofobservationalequivalenceand
ofdierenttrace-basedsecuritypropertiessuchasauthenticity. Wepresentamechanized
encodingof our equational theoryinto a nitespecication thatis suitablefor ProVerif.
Moreprecisely,theequationaltheoryiscompiledintoaconvergentrewritingsystemthat
ProVerif can eciently cope with. We prove that the encoding preserves observational
equivalence anda large classoftrace-based securityproperties.
Finally, we exemplify the applicability of our theory to real-world protocols by
an-alyzing the security properties of the Direct Anonymous Attestation (DAA) protocol
[9]. DAA constitutes a cryptographic protocol that enables the remote authentication
ofa hardwaremodulecalledtheTrusted Platform Module(TPM), whilepreservingthe
anonymity ofthe userowning the module. Such TPMs arenowwidely included in
end-user hardware such as desktop PCs and notebooks. The DAA protocol relies heavily
on zero-knowledge proofsto achieve its anonymityguarantees. The occurrence of these
proofsinparticularpreventedapreviousanalysisoftheprotocolusingabstractionorany
formofproofmechanization. AnalyzingDAArstrequirestodevisenovelabstractionsof
sophisticatedcryptographicsecuritydenitionsbasedoninteractivegames between
hon-estparticipantsand theadversary;comprehensive anonymitypropertiesareofthis form.
We formulate the intended anonymity properties in terms of observational equivalence,
weformulateauthenticityasatrace-basedproperty,andweprovethesepropertiesinthe
presenceof external active adversariesaswell ascorrupted participants. Theproofsare
fullyautomatedusing ProVerif.
Wearecondentthatthemethodologypresentedinthispaperisgeneralandthatthe
principlesfollowedintheanalysisofDAAcanbesuccessfullyexploitedfortheverication
Terms
M, N, F, Z
::=
s, k, . . . , a, b, . . . , n, m
namesx, y, z
varsf(M
1
, . . . , M
k
)
function wheref
∈
Σ
andk
isthearityoff
.Processes
P, Q
::=
0 nilνn.P
resif
M
=
N
then
P
else
Q
conda(x).P
inputa
h
N
i
.P
outputP
|
Q
par!P
replExtendedProcesses
A
::=
P
plainA
1
|
A
2
parνn.A
nameresνx.A
varres{
M/x
}
subst1.2 Outline of the Paper
We start byreviewing the applied pi-calculus inSection 2. Section 3 contains the
equa-tionaltheoryforabstractlyreasoningaboutnon-interactive zero-knowledgeproofsinthe
applied pi-calculus. This equational theory is rewritten into an equivalent nite theory
intermsofaconvergent rewriting systeminSection 4. Section5 and6elaborateonthe
analysis of DAA, the description of its security properties, and the use of ProVerif for
mechanizing the analysis. Section 7 concludesand outlinesfuture work.
2 Review of the Applied Pi-calculus
Thesyntaxofthe calculusisgiveninTable1. Termsaredenedbymeansofasignature
Σ
, which consists of a set of function symbols, each with an arity. The set of termsT
Σ
is the free algebra built from names, variables, and function symbols inΣ
applied to arguments. We partition each signature into public and private function symbols.The only dierence is that private symbols are not available to the adversary. In the
following, functions symbols are public unless stated otherwise. We presuppose a sort
with an equational theory
E
, i.e., an equivalence relation on terms that is closed under substitution of terms and under application of term contexts (terms with a hole). Wewrite
E
`
M
=
N
andE
6`
M
=
N
for an equality and an inequality, respectively, moduloE
.The grammar of processes (or plain processes) is dened as follows. The null
process 0 does nothing;
νn.P
generates a fresh namen
and then behaves asP
;if
M
=
N
then
P
else
Q
behaves asP
ifE
`
M
=
N
, and asQ
otherwise;a(x).P
receivesamessageN
fromthechannela
andthenbehavesasP
{
N/x
}
;a
h
N
i
.P
outputs the messageN
on the channela
and then behaves asP
;P
|
Q
executesP
andQ
in parallel;!P
generates anunbounded numberof copies ofP
.Extended processes areplain processesextendedwith activesubstitutions. Anactive
substitution
{
M/x
}
isaoatingsubstitutionthatmayapplytoanyprocessthatitcomes intocontactwith. Tocontrolthescopeofactivesubstitutions,wecanrestrictthevariablex
. Intuitively,νx.(P
| {
M/x
}
)
constrainsthescopeofthesubstitution{
M/x
}
toprocessP
. If thevariablex
isnot restricted, asit isthe casein theprocess(P
| {
M/x
}
)
,thenthesubstitutionisexportedbytheprocessandtheenvironmenthasimmediateaccessto
M
. Asusual,thescopeofnames andvariablesisdelimitedbyrestrictionsandbyinputs.Wewrite
f v(A)
andf n(A)
(resp.bv(A)
andbn(A)
)todenotethefree(bound)variables andnames inanextendedprocessA
,respectively. We letfree(A) :=
f v(A)
∪
f n(A)
andbound(A) :=
bv(A)
∪
bn(A)
. For sequencesM
f
=
M
1
, . . . , M
k
andx
e
=
x
1
, . . . , x
k
, welet
{
M /
f
e
x
}
denote{
M
1
/x
1
} |
. . .
| {
M
k
/x
k}
. We always assumethat substitutions are cycle-free, that extended processes contain at most one substitution for each variable,andthatextendedprocessescontainexactlyonesubstitutionforeachrestrictedvariable.
A context is a process or an extended process with a hole. An evaluation context
is a context without private function symbols whose hole is not under a replication, a
conditional,aninput, oranoutput. Acontext
C[
_]
closesA
ifC[A]
isclosed. Aframe is anextendedprocessbuiltupfrom0andactivesubstitutionsbyparallelcompositionandrestriction. We let
φ
andψ
rangeoverframes. Thedomaindom(φ)
ofa frameφ
isthe setofvariablesthatφ
exports,i.e.,thosevariablesx
for whichφ
contains asubstitution{
M/x
}
not under a restriction onx
. Every extended processA
can be mapped to aframe
φ(A)
byreplacing everyplainprocessembeddedinA
with0. Theframeφ(A)
can be viewed asanapproximationofA
thataccounts forthestaticknowledgeA
exposesto its environment, but not forA
'sdynamic behavior.The semantics is inherited from the applied pi-calculus and is dened in terms of
structural equivalence (
≡
) and internal reduction (→
). Structural equivalence stateswhich processesshould be considered equivalent upto syntacticre-arrangement.
Denition 1 (Structural Equivalence) Structural equivalence (
≡
) is the smallestequivalence relation on extended processes that satises the rules in Table 2 and that
is closed under
α
-renaming, i.e., renaming of bound names and variables, and under application of evaluation contexts.Internal reduction denesthesemantics for extendedprocesses.
Par-0
A
≡
A
|
0
Par-A
A
1
|
(A
2
|
A
3
)
≡
(A
1
|
A
2
)
|
A
3
Par-CA
1
|
A
2
≡
A
2
|
A
1
Repl
!P
≡
P
|
!P
Res-0νn.0
≡
0
Res-Cνu.νu
0
.A
≡
νu
0
.νu.A
Res-Par
A
1
|
νu.A
2
≡
νu.(A
1
|
A
2
)
ifu /
∈
free(A
1
)
Aliasνx.
{
M/x
} ≡
0
Subst
{
M/x
} |
A
≡ {
M/x
} |
A
{
M/x
}
Rewrite
{
M/x
} ≡ {
N/x
}
ifΣ
`
M
=
N
Table 3 Internal reduction
Comm
a
h
x
i
.P
|
a(x).Q
→
P
|
Q
Then
M
groundif
M
=
M
then
P
else
Q
→
P
Else
E
6`
M
=
N
M, N
groundif
M
=
N
then
P
else
Q
→
Q
extended processes that satises the rules in Table 3 and that is closed under structural
equivalence and under application of evaluation contexts.
We write
A
⇓
a
to denote thatA
can send a message ona
, i.e.,A
→
∗
C[a
h
M
i
.P
]
for
someevaluationcontext
C[
_]
thatdoesnotbinda
. Observationalequivalence constitutes an equivalence relation that captures the equivalence of processes with respect to theirdynamicbehavior.
Denition 3 (Observational Equivalence) Observational equivalence (
≈
) is thelargest symmetric relation
R
between closed extended processes with the same domainsuch that
A
R
B
implies: 1. ifA
⇓
a
,thenB
⇓
a
; 2. IfA
→
∗
A
0
, then
B
→
∗
B
0
and
A
0
R
B
0
for some
B
0
;
3.
C[A]
R
C[B
]
for all closing evalution contextsC[
_]
.3 An Equational Theory of Zero-Knowledge
In this section we dene a signature and an equational theory for abstractly reasoning
aboutnon-interactivezero-knowledgeproofs. Ourequationaltheoryisparametricinthat
The base equational theory we consider in this paper is given in Table 4. (Note again
though that any other base theory would work as well.) First, it consists of functions
for constructing anddestructing pairs,encrypting anddecrypting messagesby
symmet-ric and asymmetric cryptography, signing messages and verifying signatures, modelling
public and private keys, hashing, and constructing and verifying blind signatures. In
blind signature schemes, the content of a message is disguised before it is signed while
stillensuringpublic veriabilityof thesignature againsttheunmodied message. These
functionshavereceivedpriorinvestigationwithintheappliedPi-calculus, e.g.,toanalyze
theJFKprotocol[2 ]andthe electronicvotingprotocolFOO 92[20]. Second,thetheory
containsthreebinaryfunctions
eq
,∧
,and∨
formodellingequalitytest,conjunction,and disjunction, respectively; these functions allow for modelling monotone Booleanformu-las. In our example theory, we do not consider additional functions for, e.g., negation
or specifying explicit inequalities. We shall often write
=
instead ofeq
and use inx notation for the functionseq
,∧
,and∨
.3.2 The Equational Theory for Zero-Knowledge
Our equational theory for abstractly reasoning about non-interactive zero-knowledge
proofsisgiveninTable5;itscomponentsareexplainedinthefollowing. Anon-interactive
zero-knowledge proofisrepresentedasaterm oftheform
ZK
i,j
(
M ,
f
N , F)
e
,whereM
f
ande
N
denotesequencesM
1
, . . . , M
i
andN
1
, . . . , N
j
ofterms, respectively,andwhereF
con-stitutesaformulaoverthoseterms,seebelow. HenceZK
i,j
isafunctionofarityi
+
j
+ 1
. We shalloftenomit arities and write this statement asZK(
M;
f
N
e
;
F
)
,letting semicolons separatethe respectivecomponents. Thestatement will keepsecretthetermsM
f
,called thestatement'sprivatecomponent,whilethetermsN
e
,calledthestatement's public com-ponent, will be revealed to the verier andto the adversary. The formulaF
constitutes a term without names and variables but additionally built upon distinguished nullaryfunctions
α
i
andβ
i
withi
∈
N
.Denition 4 (
(i, j)
-formulas) We call a term an(i, j)
-formula if the term contains neither names nor variables, and if for everyα
k
andβ
l
occurring therein, we havek
∈
[1, i]
andl
∈
[1, j]
.The values
α
i
andβ
j
inF
constitute placeholdersforthetermsM
i
andN
j
,respectively. For instance, the termZK(
k
;
m,
enc
sym
(m, k) ;
β
2
=
enc
sym
(β
1
, α
1
))
denotes a zero-knowledge proof that the term
enc
sym
(m, k)
is an encryption ofm
withk
. More precisely, the statement reads: There exists a key such that the ciphertextoperators
Σ
base
=
pair,
enc
sym
,
dec
sym
,
enc
asym
,
dec
asym
,
sign,
ver,
msg,
pk,
sk,
hash,
blind,
unblind,
blindsign,
blindver,
blindmsg,
∧
,
∨
,
eq,
first,
snd,
true,
false
ver
andblindver
of arity3
,pair
,enc
sym
,dec
sym
,enc
asym
,dec
asym
,sign
,blind
,unblind
,blindsign
,∧
,∨
andeq
of arity2
,msg
,pk
,sk
,hash
,blindmsg
,first
andsnd
ofarity1
,true
and
false
of arity 0.E
base
isthesmallestequational theorysatisfyingthe following equations denedoverallx, y, z
:first(pair(x, y))
=
x
snd(pair(x, y))
=
y
dec
sym
(enc
sym
(x, y), y)
=
x
dec
asym
(enc
asym
(x,
pk(y)),
sk(y))
=
x
msg(sign(x, y))
=
x
ver(sign(x,
sk(y)), x,
pk(y))
=
true
blindver(unblind(blindsign(blind(x, z),
sk(y)), z), x,
pk(y))
=
true
blindmsg(unblind(blindsign(blind(x, z), y), z)) =
x
eq(x, x)
=
true
∧
(true,
true)
=
true
∨
(true, x)
=
true
∨
(x,
true)
=
true
Public
p
(ZK
i,j
(
M ,
f
N , F
e
))
=
N
p
withp
∈
[1, j]
Formula(ZK
i,j
(
M ,
f
N , F
e
)) =
F
where
Public
p
andFormula
constitute functions of arity1
. Since there is no destructorassociated to the statement's private component, the terms
M
f
are kept secret. This models the zero-knowledge property discussed in the introduction. We dene astate-ment
ZK
i,j
(
M ,
f
N , F
e
)
to hold true ifF
is an(i, j)
-formula and the formula obtained by substitutingallα
k
'sandβ
l
'sinF
withthecorrespondingvaluesM
k
andN
l
isvalid. Ver-ication of a statementZK
i,j
withrespectto a formula is modelled as a functionVer
i,j
ofarity2
thatisdened bythe following equational rule:Ver
i,j
(F,
ZK
i,j
(
M ,
f
N , F
e
)) =
true
i1)
E
ZK
`
F
{
M /
f
α
e
}{
N /
e
β
e
}
=
true
2)
F
isan(i, j)
-formulaTable 5 Theequational theoryforzero-knowledge, givena basetheory
(Σ
base
, E
base
)
Σ
ZK
= Σ
base
∪
ZK
i,j
,
Ver
i,j
,
Public
i
,
Formula,
α
i
, β
i
,
true
|
i, j
∈
N
ZK
i,j
ofarityi
+
j
+ 1
,Ver
i,j
ofarity2,Public
i
andFormula
ofarity1,α
i
, β
i
andtrue
of arity0.E
ZK
is thesmallest equational theorysatisfying theequations ofE
base
and thefollowing equations dened over alltermsM ,
f
N , F
e
:Public
p
(ZK
i,j
(
M ,
f
N , F
e
))
=
N
p
withp
∈
[1, j]
Formula(ZK
i,j
(
M ,
f
N , F
e
)) =
F
Ver
i,j
(F,
ZK
i,j
(
M ,
f
N , F
e
)) =
true
i1)
E
ZK
`
F
{
M /
f
α
e
}{
N /
e
β
e
}
=
true
2)
F
is an(i, j)
-formulaN
l
. This rule guarantees in the abstract model the soundness and correctness of zero-knowledge protocols.3.3 An Illustrating Example
We illustrate the zero-knowledge abstraction by means of the following example
proto-col. We keep the protocol simplistic in order to focus on the usage of zero-knowledge
proofs; in particular, we ignore vulnerabilities due to replay attacks and corresponding
countermeasures suchasnonces andtimestamps.
A
B
S
i
A,B
/
/
o
o
{
A,B
}
kS
i
o
o
ZK
Party
B
receivesasignedmessage{
A, B
}
fromsomeserverS
i
∈ {
S
1
, . . . , S
n}
. (This signedmessagemight,e.g.,serveasacerticate thatallowsB
toprovethathe hasbeen authorizedtocontactA
.) WhileB
shouldbeabletoconvinceA
thatheownsasignature onthismessageissuedbyoneofthepossiblen
servers,theprotocolshouldensurethatA
doesnot learnwhichserverS
i
infactissuedthesignature. ThispreventsB
fromsimply forwardingthesigned messagetoA
. Instead,B
provesknowledgeofsuchasignatureby anon-interactive zero-knowledgeproofZK
.We now carefully examine the proof of knowledge
ZK
. We aim at formalizing the following statement: There existsα
such thatα
is a signature ofA
andB
, and this signature was created using one of the signature keysk
S1
, . . . , k
S
n
. Coming up with aformalization of this statement rst requires us to tell the secret terms from the terms
itself and the corresponding verication key
pk(k
S
i
)
,however, have to bekept secretto preservetheanonymityofS
i
. Theserequirementsarecastinourzero-knowledgenotation asfollows:ZK
=
ZK
2
,n
+1
sign(pair(A, B),
sk(k
S
i
)),
pk(k
S
i
);
pk(k
S1
), . . . ,
pk(k
S
n
),
pair(A, B);
W
i
=1
,n
α
2
=
β
i
∧
ver(α
1
, β
n
+1
, α
2
))
This statement captures that the signature
sign(pair(A, B),
sk(k
S
i
))
and the public keypk(k
S
i
)
used in the verication are kept secret (i.e., the identity ofS
i
is not revealed) while the proof reveals the public keys of all servers (thisincludespk(k
S
i
)
but does not tellitfromtheremaining publickeys)aswell astheidentiersofA
andB
. Theformula statesthatthe vericationkeyofthesignaturebelongsto theset{
pk(k
S1
), . . . ,
pk(k
S
n
)
}
, and that the signed message consistsof a pair composed of theidentiers ofA
andB
. We obtain the following descriptionofa singleprotocol run:A
,
a(y).
if
Testthen
b
h
ok
i
else
b
h
error
Ai
B
,
a(x).
if(ver(x,
pair(A, B),
pk(k
S
i
)))
then
a
h
ZK
i
elseb
h
error
Bi
S
i
,
a
h
sign(pair(A, B),
sk(k
S
i
))
i
Prot
,
νk
A
.νk
B
.νk
S1
. . . . .νk
S
n
.
a
h
pk(k
S1
)
i
. . . . .a
h
pk(k
S
n
)
i
.(A
|
B
|
S
i
)
where Test constitutes thefollowing condition:
Ver
2
,n
+1
W
i
=1
,n
α
2
=
β
i
∧
ver(α
1
, β
n
+1
, α
2
), y
=
true
V
i
=1
,n
Public
i
(y) =
pk(k
S
i
)
∧
Public
n
+1
(y) =
pair(A, B)
We wrote Test using conjunctions only to increase readability; Test can be
straightfor-wardlyencodedin thesyntax ofthecalculus bya sequenceof conditionals.
4 Towards a Mechanized Analysis of Zero-Knowledge
Theequationaltheory
Σ
ZK
denedintheprevioussectionisnotsuitableforexistingtools for mechanized security protocol analysis. The reason is that the signatureΣ
ZK
, and consequently the number of equations inthe specication,is innite since, for instance,weassumeadierent
ZK
i,j
constructor foreachpossiblearity. Inthissection, wespecify an equivalent equational theoryin terms ofa convergent rewriting system. This theoryturnsouttobesuitableforProVerif[6],awell-establishedtoolformechanizedverication
of dierent security properties of cryptographic protocols specied in a variant of the
The central ideaof our equivalent nite theoryis to focus onthezero-knowledgeproofs
usedwithinthe processspecicationand toabstractaway fromtheadditional onesthat
arepossiblygenerated bytheenvironment. Thismakesniteboththesignatureandthe
specication ofthe equational theory.
Pinningdownthisconceptuallyelegantandappealingidearequirestoformally
charac-terizethezero-knowledgeproofsgenerated,veried,andreadintheprocessspecication.
First,wetrackthezero-knowledgeproofsgeneratedorveriedintheprocessspecication
by a set
F
of triples of theform(i, j, F
)
, wherei
is thearity of theprivate component,j
the arityof the public component, andF
the formula. Second, we record thearityh
(resp.
l
) of the largest private component (resp. public component) of zero-knowledge proofsusedintheprocessspecication. For termsM
and processesP
,welet terms(M)
denotethesetofsubtermsofM
andterms(P
)
denotethesetoftermsinP
. Wecannow formallydene the notion of(
F
, h, l)
-validityof termsand processes.Denition5(ProcessValidity) Aterm
Z
is(
F
, h, l)
-validifandonlyifthefollowing conditions hold:1. for every
ZK
i,j
(
M ,
f
N , F
e
)
∈
terms(Z
)
andVer
i,j
(F, M
)
∈
terms(Z)
,(a)
F
isan(i, j)
-formula and(i, j, F
)
∈ F
, (b)F
∈
T
Σ
base
∪{
α
k
,β
l
|
k
∈
[1
,i
]
,l
∈
[1
,j
]
}
,(c) andfor every
(i, j, F
0
)
∈ F
such that
E
ZK
`
F
=
F
0
, we have
F
=
F
0
.
2. For every
k
∈
N
,α
k
andβ
k
occur inZ
only inside of the last argument of someZK
i,j
orVer
i,j
function.3. for every
(i, j, F
)
∈ F
,we havei
∈
[0, h]
andj
∈
[0, l]
.4. for every
Public
p
(M)
∈
terms(Z)
, we havep
∈
[1, l]
.A process
P
is(
F
, h, l)
-valid if andonly ifM
is(
F
, h, l)
-valid for everyM
∈
terms(P
)
, the private arity ofP
is less or equal thanh
, and the public arity ofP
is less or equal thanl
.We check that each zero-knowledge proof generation and verication is tracked in
F
(condition 1a). For the sake of simplicity, we prevent the occurrence of zero-knowledge
operators within formulas in the process specication (condition 1b). Without loss of
generality, we also require that equivalent formulas occurring in zero-knowledge proofs
of the same arity aresyntactically equal (condition 1c ) and that the
α
i
's andβ
j
's only occur within formulas (condition 2 ). Finally, we check that the arity of private andpublic components of zero-knowledge proofs used in the process specication is less or
equal than
h
andl
,respectively (conditions 3 and4 ).Givenan
(
F
, h, l)
-valid process,wecan easilydene aniteequational theoryE
F
,h,l
FZK
Table6Theniteequationaltheoryforzero-knowledgewithrespecttoan
(
F
, h, l)
-valid process,given abasetheory(Σ
base
, E
base
)
Σ
F
FZK
,h,l
= Σ
base
∪
ZK
F
i,j
,
PZK
F
i,j
,
Ver
F
i,j
,
FakeZK
k
,
Public
p
,
Formula,
FakeCollect,
FakePublic,
FakeVer, α
g
, β
p
|
(i, j, F
)
∈ F
, g
∈
[1, h],
k
∈
[0, l], p
∈
[1, l]
PZK
F
i,j
ofarityi
+
j
+ 1
,ZK
F
i,j
of arityi
+
j
,FakeZK
k
ofarityk
+ 2
,FakeVer
of arity4
,FakePublic
andFakeCollect
of arity2
,Ver
F
i,j
,Public
p
,andFormula
of arity1
,α
g
andβ
p
ofarity0
.PZK
F
i,j
isprivate.E
FZK
F
,h,l
isthesmallestequationaltheorysatisfyingtheequationsofE
base
andthefollowingequations for every
(i, j, F
)
∈ F
:ZK
F
i,j
(
x,
e
y)
e
=
PZK
F
i,j
(
x,
e
y, F
e
{
e
x/
α
e
}{
y/
e
β
e
}
)
Ver
F
i,j
(PZK
F
i,j
(
x,
e
e
y,
true))
=
true
Public
p
(PZK
F
i,j
(
x,
e
y, z))
e
=
y
p
p
∈
[1, j]
Formula(PZK
F
i,j
(
x,
e
y, z))
e
=
F
Public
p
(FakeZK
k
(x,
y, z
e
))
=
y
k
p
∈
[1, k], k
∈
[0, l]
Formula(FakeZK
k
(x,
y, z)) =
e
z
k
∈
[0, l]
include in the signature
Σ
F
,h,l
FZK
the function symbolsZK
F
i,j
andVer
F
i,j
of arityi
+
j
and1
, respectively. We then replace every termZK
i,j
(
M ,
f
N , F
e
)
andVer
i,j
(F, M
)
in theprocess specication by
ZK
F
i,j
(
M ,
f
N
e
)
andVer
F
i,j
(M
)
, respectively. Since formulas areuniquelydeterminedbythe
ZK
F
i,j
functionsymbol,theycanbeomittedfromtheprotocolspecication. Furthermore,weneedintheequational theoryonlythosefunctions
α
i
andβ
j
that satisfyi
∈
[1, h]
andj
∈
[1, l]
; the remaining ones can be safely omitted since they do not oer the adversary any additional capabilities. For nitely modelling thevericationofzero-knowledgeproofs,weinclude in
Σ
F
,h,l
FZK
thefunctionsymbolsPZK
F
i,j
ofarity
i+
j
+ 1
. AtermZK
F
i,j
(
M ,
f
N
e
)
isequivalenttoPZK
F
i,j
(
M ,
f
N , F
e
{
M /
f
α
e
}{
N /
e
β
e
}
)
. This can be captured using a nite description, since the numberof formulas in the processspecication isnite:
ZK
i,j
F
(
x,
e
y) =
e
PZK
F
i,j
(
x,
e
y, F
e
{
e
x/
α
e
}{
y/
e
β
e
}
)
For verifyinga zero-knowledgeproof,itthus sucestocheckwhetherthelastargument
ofthe
PZK
F
i,j
istrue
or not:Ver
F
i,j
(PZK
F
i,j
(
e
x,
y,
e
true)) =
true
Theruleforextractingthepubliccomponentisdenedintheexpectedmanner.
Extract-ing the formula from a zero-knowledge proof
PZK
F
Formula
yields the formulaF
(without the substitution{
M /
f
α
e
}{
N /
e
β
e
}
) inorder to pre-vent theadversary fromderiving theformulainstantiated withprivateterms.Public
p
(PZK
F
i,j
(
x,
e
y, z))
e
=
y
p
p
∈
[1, j]
Formula(PZK
F
i,j
(
x,
e
e
y, z)) =
F
We obtain a nite set of rules since the number of
ZK
F
i,j
andVer
F
i,j
constructorscorre-sponds to the (nite) number of formulas occurring in the process specication. The
PZK
F
i,j
functionsareprivate;hencetheycannotbeusedbytheadversarytoderivetermsof the form
ZK
F
i,j
(
M ,
f
N ,
e
true)
, which would be successfully veried by trusted partici-pantsregardlessofthevalueofF
{
M /
f
α
e
}{
N /
e
β
e
}
. Thepossibilitytoconstructsuchterms wouldbreak the soundnesspropertyof zero-knowledge proofs.It now remains to encode the zero-knowledge proofs generated by theenvironment.
These proofs possiblycontain formulas or have arities dierent from the ones specied
in the process. We include in
Σ
F
,h,l
FZK
a nite set of symbolsFakeZK
k
of arityk
+ 2
, wherek
∈
[0, l]
. The termFakeZK
k
(M,
N , F
e
)
never occurs in process specications andrepresentszero-knowledgestatementsforgedbytheadversary;hereM
constitutesa distinguishedtermthatuniquelyreferstothe zero-knowledgeproofandthatplaysaroleonly inthe proof of soundness,
N
e
denotes the rstk
elements of thepublic component, andF
istheformula. Theequationalrulesfor extractingthepubliccomponentsandthe formula fromFakeZK
k
termsarespecied asfollows:Public
p
(FakeZK
k
(x,
y, z))
e
=
y
k
Formula(FakeZK
k
(x,
y, z
e
)) =
z
for any
p
∈
[1, k]
andk
∈
[0, l]
. We additionally include inΣ
F
,h,l
FZK
functionsFakeCollect
,FakePublic
, andFakeVer
. These functions are only used for proving the nite theoryequivalent to the innite one inthe next section; the functionsare freein that they do
not occurinanyequations.
4.2 Compilation into Finite Form
We nowdene the staticcompilation of termsandprocesses.
Denition6(StaticCompilation) The
(
F
, h, l)
-staticcompilationisthepartial func-tionσ
:
T
Σ
ZK
→
T
Σ
F
,h,l
FZK
recursively dened as follows:
ZK
i,j
(
M ,
f
N , F
e
)σ
=
ZK
F
i,j
(
M σ,
f
N σ)
e
∀
(i, j, F
)
∈ F
Ver
i,j
(F, M
)σ
=
Ver
F
i,j
(M σ)
∀
(i, j, F
)
∈ F
Public
p
(M)σ
=
Public
p
(M σ)
∀
p
∈
[1, l]
Formula(M)σ
=
Formula(M σ)
f(M
1
, . . . , M
i
)σ
=
f(M
1
σ, . . . , M
i
σ)
∀
f
∈
Σ
base
xσ
=
x
∀
x
In
M
∈
T
Σ
+
a(x).P
a
(
→
M
)
P
{
M/x
}
Out-Atom
a
h
u
i
.P
a
→
h
u
i
P
Open-Atom
A
a
→
h
u
i
A
0
u
6
=
a
νu.A
νu.a
→
h
u
i
A
0
Scope
A
→
µ
A
0
u
doesnot occurinµ
νu.A
→
µ
νu.A
0
Par
A
→
µ
A
0
bound(µ)
∩
free(B) =
∅
A
|
B
→
µ
A
0
|
B
Struct
A
≡
B
B
→
µ
B
0
B
0
≡
A
0
A
→
µ
A
0
Notation:
Σ
+
contains the public function symbols in
Σ
. In Out-Atom,u
is eithera channelname ora variable.The
(
F
, h, l)
- static compilationconstitutes a total function whenrestricted to(
F
, h, l)
-valid terms. The rstequations deal withthecompilationof zero-knowledge proofsandoperatorsacting onthem. Thestaticcompilationactscomponent-wiseontheremaining
termsand behavesastheidentity function onnames and variables. Thecompilation of
aprocess
P
,writtenP σ
,is dened bythe compilationof thetermsoccurringtherein. Thefollowingtheoremnallystatesthatobservationalequivalenceispreservedunderstatic compilation and hence asserts the soundness of the encoding from the innite
specication into the nitespecication. Its proof isgiven inthenextsection.
Theorem 1 (Preservation of Observational Equivalence) Let
P
andQ
be(
F
, h, l)
-valid processes andσ
be the(
F
, h, l)
-static compilation. IfP
≈E
ZK
Q
, thenP σ
≈
E
F
,h,l
FZK
Qσ
.We additionally prove that a comprehensive class of trace-based properties is preserved
understaticcompilation. We rstdene thenotion ofan executiontrace. Thisrequires
to review the labelled operational semantics that extends the semantics given in Table
3 by allowing us to reason about processes that interact with their environment. The
labelled transitionsystemis given inTable 7 .
Denition 7 (Execution Traces) The set of execution traces of an extended process
A
, written traces(A)
, is dened as follows:traces
(A) =
{
µ
1
φ(A
1
), . . . , µ
n
φ(A
n
)
|
A
→
∗
→
µ1
A
1
. . .
→
∗
µ
n
→
A
n}
boolean formula over the terms
M
1
, . . . , M
n
: such terms are meant to express trace-based security properties. For instance, thenotion of authenticity can be formalized aspair(
end, x)
⇒
pair(
begin, x)
,where end andbeginarespecialnullaryfunctions.Denition 8 (Trace-based SecurityProperty) Atrace
s
satises theeventM
with substitutionξ
, writtens
`ξ
M
if and only if there exists
1
, s
2
, N, ξ
such thats
`
s
1
::
c
h
N
i
::
s
2
andE
ZK
`
N
=
M ξ
.A trace
s
satises the propertyB(M
1
, . . . , M
n
)
with substitutionξ
, writtens
`ξ
B(M
1
, . . . , M
n
)
,if and onlyifB(s
`ξ
M
1
, . . . , s
`ξ
M
n
)
.A process satises the property
B(M
1
, . . . , M
n
)
, writtenP
`ξ
B
(M
1
, . . . , M
n
)
, ifand onlyif for every traces
∈
traces(P
)
, there existsξ
such thats
`ξ
B(M
1
, . . . , M
n
)
Finally,wecan state thetheoremof preservation for trace-based securityproperties.
Theorem 2 (Trace-based Security Property Preservation) Let
P
be a(
F
, h, l)
-validprocess,σ
bethe(
F
, h, l)
-staticcompilation,andM
1
, . . . , M
n
be(
F
, h, l)
-validterms. IfP σ
`
B
(M
1
σ, . . . , M
n
σ)
, thenP
`
B(M
1
, . . . , M
n
)
.4.3 Preservation of Observational Equivalence and Trace-based
Secu-rity Properties
Instead of proving that observational equivalence is preserved under static compilation,
weshowpreservation ofanequivalentformulation ofobservationalequivalence basedon
staticequivalence and labelled bisimilarity. We rst reviewthesenotions.
Denition9(TermEqualityinFrames) Twoterms
M
andN
areequalinaframeφ
, written(M
=
N
)φ
,ifandonlyifφ
≡
ν
e
n.σ
,M σ
=
N σ
, and{
e
n
} ∩
(f n(M
)
∪
f n(N
)) =
∅
for somenamese
n
andsubstitutionσ
.Denition 10 (Static Equivalence) Two closed frames
φ
andψ
are statically equiv-alent, writtenφ
≈
s
ψ
if and only if
dom(φ) =
dom(ψ)
and for all termsM
andN
, it holdsthat(M
=
N)φ
if and onlyif(M
=
N
)ψ
.We saythat two closed extended processes are staticallyequivalent,written
A
≈
s
B
if
andonly if theirframes are statically equivalent.
We now dene the notion of labelled bisimilarity, which constitutes an equivalent
no-tion of observational equivalence. Labelled bisimilarity does not rely on the universal
quantication overevalutioncontextsusedinthedenitionofobservationalequivalence.
Denition 11 (Labelled Bisimilarity) Labelled bisimilarity (
≈
l
) is the largest
sym-metric relation
R
on closed extended processes such thatA
R
B
implies: 1.A
≈
s
B
;
2. if
A
→
A
0
, then
B
→
∗
B
0
and
A
0
R
B
0
for some
B
0
;
3. if
A
µ
→
A
0
andf v(µ)
⊆
dom(A)
andbn(µ)
∩
f n(B
) =
∅
, thenB
→
∗
→→
µ
∗
B
0
and
A
0
R
B
0
for some
B
0
belled bisimilarity.
Theorem 3 (Observational Equivalence and Labelled Bisimilarity)
Observa-tional equivalence coincides withlabelled bisimilarity:
≈
=
≈
l
.
It henceremains to be shown thatlabelled bisimilarityis preserved understatic
compi-lation. In the following, we write
P
≡E
Q
to emphasize thatP
andQ
are structurally equivalent with respect to an equational theoryE
. Furthermore, we writeM φ
for the ground term obtained byrepeated application of thesubstitution inφ
toM
, where we assume thatf v(M
)
⊆
f v(φ)
∪
bv(φ)
. This notation is well-dened since frames do not containsubstitutions withcyclic dependencies. Thenext denitionintroduces anormalform for terms. Intuitively, a term isin
(
F
, h, l)
-normal form ifthesubterms generated bytheenvironment cannotbe furthersimplied(conditions 1 and2) and,inthecaseofzero-knowledge proofs, they either comply withthe process specication or belong to a
dierent equivalence class(condition 3).
Denition 12 (Normal Form) A term
M
∈
T
Σ
ZK
is in(
F
, h, l)
-normal form with respect toa frameφ
if andonly ifthe followingconditions hold:1. for every
Public
j
(Z
)
∈
terms(M
)
,i, j
0
,
M ,
f
N , F
e
such that
j > l
andE
ZK
`
Zφ
=
ZK
i,j
0
(
M ,
f
N , F
e
)
, we have
j
0
< j
.
2. for every
Ver
i,j
(F, Z)
∈
terms(M
)
,M ,
f
N
e
such thatE
ZK
`
Zφ
=
ZK
i,j
(
M ,
f
N , F
e
)
, we have that(i, j, F
)
∈ F
.3. for every
ZK
i,j
(
M ,
f
N , F
e
)
∈
terms(M
), F
0
such that
(i, j, F
0
)
∈ F
and
Σ
ZK
`
F
=
F
0
, we haveF
=
F
0
.
For anyterm thereexistsan equivalent term innormal form.
Proposition 1 (Normal Form) For any term
M
∈
T
Σ
ZK
and frameφ
, there exists a termN
∈
T
Σ
ZK
in(
F
, h, l)
-normal form withrespect toφ
such thatE
ZK
`
(M
=
N
)φ
.Proof. Byan inspection of theequational rules inTable 5and Denition 12.
Wenowcharacterizethenotionofvalidityofextendedprocesses. Intuitively,anextended
processis
(
F
, h, l)
-valid ifitcan beseparatedinto an(
F
, h, l)
-validprocess anda frame where freevariables,referringtooutputmessages, areassociated to(
F
, h, l)
-valid terms, and bound variables, referring to input messages, are associated to terms in(
F
, h, l)
-normalform thatonlycontain freenames and freevariables.Denition 13 (Extended ProcessValidity) A frame
φ
is(
F
, h, l)
-valid if and only if there existe
n,
y,
e
{
Z/
e
x
e
}
, withy
e
⊆
e
x
, such that the following conditions hold:1.
φ
=
ν
e
n.ν
y.
e
{
Z/
e
e
x
}
.3. for every
x
k
∈
bv(φ)
, we have thatZ
k
is in(
F
, h, l)
-normal form withrespect toφ
andfree(Z
k
)
∩
bound(φ) =
∅
.An extended process
A
is(
F
, h, l)
-valid ifand onlyif there existn,
e
y,
e
{
M /
f
e
x
}
, withe
y
⊆
x
e
, such that the following conditions hold:1.
A
=
ν
n.ν
e
e
y.(
{
Z/
e
e
x
}|
P
)
.2.
ν
e
n.ν
e
y.
{
Z/
e
x
e
}
is(
F
, h, l)
-valid.3.
P
is(
F
, h, l)
-valid.Inthe following,weuse
FakeCollect(
M
f
)
forM
f
=
M
1
, . . . , M
n
asanabbreviation forthe termFakeCollect(M
1
,
FakeCollect(M
2
, . . . ,
FakeCollect(M
n
−
1
, M
n
)))
. Wefurtherconsider acountable setofnames thataremeant torepresentnatural numbers, denotedi, j
,and nullary functionsα
i
andβ
j
withi > h
andj > l
, denotedf
α
i
andf
β
j
, respectively.Without lossof generality, we discipline
α
-renaming to guarantee that such names are neverrestricted inthe process.Wenowintroduce the dynamiccompilation ofterms atrun-time.
Denition 14 (Dynamic Compilation) The
(
F
, h, l)
-dynamic compilation is the functionρ
:
T
Σ
ZK
→
T
Σ
F
,h,l
FZK
recursively dened asfollows:
Public
j
(M)ρ
=
Public
j
(M ρ)
ifj
∈
[1, l]
FakePublic(j, M ρ)
otherwiseZK
i,j
(
M ,
f
N , F
e
)ρ
=
ZK
F
i,j
(
M ρ,
f
N ρ)
e
if(i, j, F
)
∈ F
FakeZK
k
(g,
N
e
k
ρ, F ρ)
otherwise(k
=
min(j, l),
g
=
FakeCollect(i, j,
M ρ,
f
N ρ))
e
Formula(M
)ρ
=
Formula(M ρ)
α
i
ρ
=
α
i
ifi
∈
[1, h]
f
α
i
otherwiseβ
j
ρ
=
β
j
ifj
∈
[1, l]
f
β
j
otherwiseVer
i,j
(F, M
)ρ
=
Ver
F
i,j
(F ρ, M ρ)
if(i, j, F
)
∈ F
FakeVer(i, j, F ρ, M ρ)
otherwisef
(M
1
, . . . , M
i
)ρ
=
f(M
1
ρ, . . . , M
i
ρ)
∀
f
∈
Σ
base
xρ
=
x
∀
x
nρ
=
n
∀
n
Proposition 2 (Closure of Dynamic Compilation) Let
ρ
be the(
F
, h, l)
-dynamic compilation. For every frameφ
and every termM
in(
F
, h, l)
-normal form withrespect toφ
, we have(M ρ)φρ
= (M φ)ρ
Proof. Byan inspection of Denition 14and Denition 12.
We next lemmastatesthat term equality ispreserved bydynamiccompilation.
Lemma 1 (Preservation of Term Equality) Let
φ
be an(
F
, h, l)
-valid frame andρ
be the(
F
, h, l)
-dynamic compilation. Then for any ground termsM
1
, M
2
∈
T
Σ
ZK
in(
F
, h, l)
-normalformwithrespecttoφ
,wehaveE
ZK
`
M
1
=
M
2
⇔
E
F
,h,l
FZK
`
M
1
ρ
=
M
2
ρ
.Proof. We prove the
⇒
implication by induction on thelength of the derivation ofM
1
. We rst discussthe interesting basecases:M
1
=
Public
k
(ZK
i,j
(
M ,
f
N , F
e
))
,M
2
=
N
k
We havetwo cases:1.
(i, j, F
)
∈ F
: By denition ofρ
(cf. Denition 14), we getM
1
ρ
=
Public
k
(ZK
F
i,j
(
M ρ,
f
N ρ))
e
. By denition ofE
F
,h,l
FZK
(cf. Table 6), we getE
FZK
F
,h,l
`
Public
k
(ZK
F
i,j
(
M ρ,
f
N ρ)) =
e
N
k
ρ
,asdesired.2.
(i, j, F
)
∈
/
F
: By denition ofρ
, we can derive thatM
1
ρ
=Public
k
(FakeZK
min(
j,l
)
(FakeCollect(i, j,
f
M ρ,
N ρ),
e
N
e
1
min(
j,l
)
, F ρ)
. By denition
of
E
F
,h,l
FZK
,E
F
,h,l
FZK
`
M
1
ρ
=
N
k
ρ
,asdesired.M
1
=
Formula(ZK
i,j
(
M ,
f
N , F
e
))
,M
2
=
F
We have twocases:1.
(i, j, F
)
∈ F
: Bydenitionofρ
,we getM
1
ρ
=Formula(
ZK
F
i,j
(
M ρ,
f
N ρ))
e
. By denition ofE
F
,h,l
FZK
, we getE
F
,h,l
FZK
`
Formula(ZK
F
i,j
(
M ρ,
f
N ρ)) =
e
F
and, sinceM
1
is in(
F
, h, l)
-normal form with respect toφ
, by denition ofρ
we have thatF ρ
=
F
,asdesired.2.
(i, j, F
)
∈
/
F
: By Denition 14, we obtainM
1
ρ
=
Formula(
FakeZK
min(
j,l
)
(FakeCollect(i, j,
f
M ρ,
N ρ),
e
N
e
1
min(
j,l
)
, F ρ)
. By an inspection of
Table 6,we have
E
F
,h,l
FZK
`
M
1
ρ
=
F ρ
,asdesired.M
1
=
Ver(F,
ZK
i,j
(
M ,
f
N , F
e
))
andM
2
=
true
It mustbe thecase that(i, j, F
)
∈ F
,oth-erwise
M
1
is not in(
F
, h, l)
-normal form with respect toφ
. By denition ofρ
,M
1
ρ
=
Ver
F
i,j
(ZK
F
i,j
(
M ρ,
f
N ρ))
e
. By the equational theory of Table 6,E
F
,h,l
FZK
`
M
1
ρ
=
true
,asdesired.We prove the inductionstep bycases:
Symmetry Wehavethat