# Formal verification of cryptographic protocols with automated reasoning Ben Smyth March 2011
by A thesis submitted to the University of Birmingham for the degree of DOCTOR OF PHILOSOPHY
School of Computer Science College of Engineering and Physical Sciences University of Birmingham
# Abstract Cryptographic protocols form the backbone of our digital society. Unfortunately, the security of numerous critical components has been neglected. As a consequence, attacks have resulted in financial loss, violations of personal privacy, and threats to democracy. This thesis aids the secure design of cryptographic protocols and facilitates the evaluation of existing schemes. Developing a secure cryptographic protocol is game-like in nature, and a good designer will consider attacks against key components. Unlike games, however, an adversary is not governed by *the rules* and may deviate from *expected behaviours*. Secure cryptographic protocols are therefore notoriously difficult to define. Accordingly, cryptographic protocols must be scrutinised by experts using procedures that can evaluate security properties. This thesis advances verification techniques for cryptographic protocols using formal methods with an emphasis on automation. The key contributions are threefold. Firstly, a definition of election verifiability for electronic voting protocols is presented; secondly, a definition of user-controlled anonymity for Direct Anonymous Attestation is delivered; and, finally, a procedure to automatically evaluate observational equivalence is introduced. This work enables security properties of cryptographic protocols to be studied. In particular, we evaluate security in electronic voting protocols and Direct Anonymous Attestation schemes; discovering, and fixing, a vulnerability in the RSA-based Direct Anonymous Attestation protocol. Ultimately, this thesis will help avoid the current situation whereby numerous cryptographic protocols are deployed and found to be insecure. #
In loving memory of Andrew Cavan Ellis, who sadly died on 11 November 2009, aged 43.
#
For David Hercules Cash Carroll, Megan Naomi Eleanor Lee, and Alyssia Anne Smyth. May the future be good to you.
# Acknowledgements First, and foremost, I would like to thank my supervisor Mark Ryan. Mark has dedicated a considerable amount of time and energy to the supervision of my research. He has helped me explore ideas, to critically evaluate my work, and to express my results clearly. He has imparted the fundamental skills of our discipline and, more importantly, he has taught me how to further my skills independently. His efforts will be cherished, and memories of my Ph.D. will be held in the highest regard. I look forward to our future collaboration and continued friendship. I have had the opportunity to work with a number of collaborators and I have learnt a great deal from them all. Liqun Chen taught me the intricacies of cryptography; in particular, Direct Anonymous Attestation. Stéphanie Delaune guided my study of the applied pi calculus. Mounira Kourjieh’s boundless energy drove our research. Steve Kremer explained the subtleties of the applied pi calculus and insisted upon mathematical rigour. Bruno Blanchet helped me understand the theoretical underpinnings of ProVerif, and introduced numerous new ideas. Myrto Arapinis insisted that proofs could not begin with QED and patiently taught their proper construction; in addition, her Sushi is divine. Petr Klus helped implement theoretical results as software. The efforts of my collaborators have developed my research skills, for which I am truly grateful. Birmingham’s *Formal Verification and Security Group* has been an excellent source of feedback and I am particularly grateful to: Myrto Arapinis, Sergiu Bursuc, Tom Chothia, Dan Ghica, Eike Ritter, Mark Ryan and Guilin Wang. I have also benefited from the wisdom of Martín Escardó and Eike Ritter who provided academic support as members of my *research monitoring group*. Mark Lee has provided an endless source of advice on topics as diverse as academic life and culinary masterpieces; and the occasional unsolicited bout on badgers, morris dancing and other such fields. Academic life at Birmingham has been wonderful and many individuals have influenced my stay: thank you Birmingham. My experience gained through research visits has been hugely beneficial and the hospitality offered by each institution was superb. I am particularly grateful to my hosts: Liqun Chen at HP Labs; Steve Kremer at LSV, CNRS & ENS de Cachan; and Bruno Blanchet at ENS, CNRS & INRIA. I will receive all the credit for this thesis – I also accept liability for any criticism – but, in addition to those already mentioned, some credit should be attributed to those whom studied early drafts. I am truly grateful to: Myrto Arapinis, Bruno Blanchet, Gavin Brown, Liqun Chen, Michael Clarkson, Véronique Cortier, Cas Cremers, Morten Dahl, Catherine Harris, Lucie Jíchová, Hugo Jonker, Vivek Nallur, James Nestoruk, Olufunmilola Onolaja, Mark Ryan, Winona Ryder, Matt Smart, Martin Smyth, Sue Smyth and Guilin Wang. In particular, Lucie Jíchová is my favourite *stickler*, Mark Ryan is a thorough technical critic, and my mum, Sue Smyth, read every last word. Finally, I would like to thank my parents – Martin and Sue – for supporting me in everything I have chosen to do; my siblings – Matthew, Joe and Megan – for providing constant entertainment; and Beth Wells for a great friendship and numerous hours spent in *The Barrels*. #
image image
This research was primarily funded by the Engineering and Physical Sciences Research Council (EPSRC), under the WINES initiative, as part of the *UbiVal: Fundamental Approaches to Validation of Ubiquitous Computing Applications and Infrastructures* project (EP/D076625/1 & EP/D076625/2). Additional funding was provided by the *Direction Générale pour l’Armement* (DGA) to support a five month internship at CNRS, Département d’Informatique, École Normale Supérieure, Paris, France. **Preliminaries** # Introduction The security objectives of numerous deployed systems have not been satisfied. As a consequence, high-profile security failures have been observed, for example: an exploit in the London Underground’s Oyster card system allows free travel (**Gans08?**; **Gans08b?**; **Garcia09?**); vulnerabilities in electronic voting systems have resulted in their decommission (**ElectoralCommision07?**; **DebraBowenCalifornia07?**; **Dutch08?**; **GermanyCourt09?**); and issues with electronic passports permit modification, cloning and invasions of privacy (**Juels05?**; **Juels06?**; **Juels09?**; **Chothia10?**). These failures can be attributed to the difficulties of designing secure cryptographic protocols. Cryptographers aim to deliver protocols which preserve security requirements in the presence of an arbitrary adversary. However, such an adversary should not be expected to follow any prescribed rules, nor adhere to any particular behavioural patterns. Moreover, the ingenuity of the adversary should be considered boundless. As an analogy, consider, for example, the challenge faced by the architects of the *‘inescapable’* Alcatraz. The prison is situated 1.5 miles from San Francisco, California, and isolated from the mainland by the strong currents of San Francisco Bay. In addition to the treacherous waters and the physical security features, inmates were counted twelve times a day and the ratio of inmates to armed guards was three to one. Despite this, an elaborate escape plan was hatched by Clarence Anglin, John Anglin, Frank Morris and Allen West which involved the fabrication of: life-like dummies, fashioned from soap, toilet paper and hair (the dummies were used to avoid detection during evening head counts); tunnelling equipment, built from the motor of a stolen vacuum cleaner; and a raft, constructed from the rain coats of fellow inmates. On June 11, 1962 the two Anglin brothers and Morris escaped the prison. Their whereabouts are currently unknown. Given the water temperature and tidal direction, the official FBI investigation presumes the three men drowned; however, the only thing known for certain, is the security of Alcatraz was violated. Designing a resilient prison to contain such devious inmates, whom are determined to escape, is difficult. In some sense, cryptographers face a more challenging problem: a prison may be considered inescapable if no inmate has successfully broken out; by comparison, we will only consider a protocol to be secure, if security requirements cannot be violated by *any* adversary. This thesis will aid the secure design of cryptographic protocols and facilitate the evaluation of existing schemes, with a particular focus on electronic voting and anonymous attestation. These application domains are particularly salient, due to the discovery of vulnerabilities in the RSA-based Direct Anonymous Attestation scheme (Chapter [chap:DAA]) and the world-wide loss of public confidence in electronic voting systems following numerous failures (**Saltman88?**; **Rubin02?**; **Mercuri02?**; **Chaum08?**). The remainder of this chapter is structured as follows. Cryptographic protocols will be introduced (Section [sec:intro:prot]) and their security properties will be discussed (Section [sec:intro:prop]). Computational and symbolic approaches for protocol verification will be considered (Section [sec:intro:verif]) and symbolic analysis techniques will be investigated in more depth (Section [sec:intro:analysis]). A detailed description of the contribution made by this thesis will be presented in the context of existing work (Section [sec:intro:contrib]), a summary of publications will be provided (Section [sec:intro:pubs]) and, finally, an overview of the thesis structure will be summarised (Section [sec:intro:overview]). # Cryptographic protocols Cryptographic protocols are small distributed algorithms that aim to provide some security-related objective over a public communication network, such as the Internet. Since the communication medium is public, an adversary may interfere with messages; this introduces the possibility of interference by a powerful adversary and has made the design of secure protocols notoriously difficult. The canonical example is the Needham-Shroeder public key protocol (**NeedhamSchroederPublicKey?**), which is intended to provide mutual authentication of two principals. The protocol was scrutinised by experts for nearly two decades before Lowe (**Lowe96?**) discovered a man-in-the-middle attack. This dictates the necessity for protocol verification and, moreover, highlights the need for automated support to overcome the inherent human weaknesses present in the manual verification process. # Security properties Cryptographic protocols are required to satisfy a plethora of security requirements. These requirements include classical properties such as secrecy and authentication, and emerging properties including, but not limited to, anonymity, non-repudiation and verifiability. These security requirements can generally be classified as *indistinguishability* or *reachability* properties. Reachability properties are more simplistic, and they are typically used to express requirements of a protocol’s derivable states. For example, secrecy can be expressed as the inability of deriving a particular value from all possible protocol executions. The notion of indistinguishability allows us to reason about more complex properties. Intuitively, two protocols are said to be indistinguishability if an observer has no way of telling them apart. Anonymity can be naturally formulated as an indistinguishability property, for example, actions within a group of agents are anonymous if an action performed by an arbitrary agent is indistinguishable from an action performed by another agent. # Protocol verification The process of verifying cryptographic protocols has led to the development of two research communities, namely: provable security and formal methods. The techniques of each field are almost completely disjoint (**AbadiRogaway00?**; **Pfitzmann00?**; **AbadiRogaway02?**; **Warinschi03?**; **Warinschi05?**): formal methods are reliant on simple abstract modelling techniques, whereas provable security uses complicated computational proofs. With the exception of *perfect security* (**Shannon49?**), which is generally unobtainable, neither community can make any absolute mathematical statement about the security of a protocol, and the best we can do is prove the relative difficulty of violating security properties. In particular, we can consider a provable security *reduction*, which shows that the difficulty of breaking the protocol is *at least as difficult* as solving a well-known mathematical problem that is widely believed to be intractable. However, as cryptography has evolved, more complex protocols have been developed and provable security methodologies have, unfortunately, provided limited success in their analysis (**Moore88?**; **Meadows03?**; **Koblitz06?**; **Koblitz07?**). Indeed, Chen, Morrissey & Smart (**Chen08:ECC-DAA-assymmetric-proof?**) attribute flaws in the security proof of RSA-based Direct Anonymous Attestation protocol (**Chen04:RSA-DAA?**) to the highly complex nature of Direct Anonymous Attestation schemes and the inherent difficulties of composing correct provable security proofs. By comparison, formal method approaches have shown to be particularly suited to the analysis of complex cryptographic protocols, and will be adopted here. ## Formal methods Formal methods, as defined by Meadows (**Meadows03?**), combine a language which can be used to model a cryptographic protocol and its security properties, together with an efficient procedure to determine whether a model does indeed satisfy those properties. Gritzalis, Spinellis & Georgiadis (**Gritzalis99?**) classify three types of protocol analysis: *inference-construction*, *attack-construction* and *proof-construction*. Inference-construction techniques are based upon modal logics; they reason about the evolution of knowledge and beliefs within a system to show that certain conditions are satisfied. Attack-construction methodologies attempt to discover vulnerabilities using algebraic properties of a protocol’s algorithms. The majority of these attack-construction techniques conduct some form of state space exploration; that is, a model of the system is defined and then analysed in an attempt to discover a path to an insecure state. Proof-construction techniques model the computations performed in a protocol and define security properties as theorem, automated theorem checkers are then used to verify these theorems and thus prove properties of the model. Gritzalis, Spinellis & Georgiadis (**Gritzalis99?**) liken proof-construction to attack-construction, suggesting that proof-construction techniques replace state space exploration *“with theorems about these searches."* Meadows argues that inference-construction techniques are generally weaker than attack-construction methods, because they operate at a higher level of abstraction (**Meadows00?**; **Meadows01?**); hence, interest in inference-construction has waned, as attack-construction methodologies have improved. Paulson (**Paulson98?**) claims that attack-construction and proof-construction techniques are complementary: attack-construction techniques are typically easy to use and can provide an assurance that a model satisfies security criteria; by comparison, proof-construction methodologies are more complicated, but allow a more thorough analysis. A primary objective of this thesis is to introduce tools suited to the verification of security properties during protocol development; accordingly, we focus on attack-construction techniques to allow rapid prototyping of cryptographic schemes. #### Dolev-Yao adversary. Attack-construction methods typically assume that cryptographic protocols should achieve their objectives in the presence of an adversary that has full control of the network (sometimes called the Dolev-Yao attacker (**DY83?**)) and cryptography is usually assumed to be perfect. Since the adversary has complete control of the network, messages may be read, modified, deleted, or injected. The adversary is also able to manipulate data contained within those messages, under the restriction of perfect cryptography, that is, the attacker is only able to perform cryptographic operations when in possession of the required keys. It follows, for example, that an adversary may compute the $i$th element of a tuple or, given the necessary keys, decrypt ciphertexts. The relationships between cryptographic primitives are captured by a set of deduction rules. For example, an equation modelling symmetric decryption can be expressed as $\mathsf{dec}(k,\mathsf{enc}(k,m)) = m$. This equation captures the notion that symmetric encryption is perfect: given a ciphertext $\mathsf{enc}(k,m)$, the plaintext $m$ can only be recovered using the secret key $k$. If the encryption scheme has some other characteristic (for example, if the scheme is homomorphic), then it is important that these properties are also captured to avoid missing attacks. For expressibility, we should consider frameworks which permit a large class of cryptographic primitives to be modelled. # Analysis using formal methods Verification of cryptographic protocols is difficult due to several sources of unboundedness, including: messages of arbitrary length and the possibility of an unbounded number of sessions (protocol executions). In this section, we will consider methodologies that allow the formulation of precise security statements about cryptographic protocols and the conditions under which these statements hold. (For further discussion see Blanchet (**BlanchetHDR08?**), Delaune (**DelauneHDR11?**) and Meadows (**Meadows03?**; **Meadows04?**).) ## Reachability properties Reachability properties are expressed as assertions defined over protocol execution traces and the possibility of arbitrarily many sessions makes analysis particular problematic. One solution is to explore a finite part of the state space and prove partial results using model checkers, for example, FDR (**Roscoe95?**), Mur$\varphi$ (**Mitchell97:MurPhi?**), and Brutus (**Clarke00?**). Alternatively, Rusinowitch & Turuani (**Turuani01:InsecurityNPComplete?**; **Turuani03:InsecurityNPComplete?**) avoid this source of undecidability by restricting honest participants to a bounded number of sessions (the number of messages sent by the adversary, and the length of those messages, remains unbound) and present an NP decision procedure for secrecy properties in the Dolev-Yao model with symmetric and asymmetric cryptography. This result has been enriched to consider more complicated properties of cryptographic primitives, for example, Chevalier *et al.* (**Turuani03:InsecurityNPCompleteXOR?**; **Turuani05:InsecurityNPCompleteXOR?**) and Comon-Lundh & Shmatikov (**Comon-Lundh03:InsecurityNPCompleteXOR?**) present a decision procedure for secrecy in the presence of an adversary that can exploit properties of the XOR operator and Chevalier *et al.* (**Turuani03:InsecurityNPCompleteDiffieHellman?**) consider an adversary that can exploit Diffie-Hellman exponentiation, the complexity of these procedures are shown to be in NP. Techniques exploring finite state spaces or considering a bounded number of sessions are useful for discovering attacks, but cannot be used to assert the security of a protocol; in particular, there may exist an attack outside the considered search space (for example, a revision of the Garay & Mackenzie contract signing protocol (**GM99:ContractSigning?**) was shown to be secure for $n\leq 4$ participants (**Chadha04:ContractSigning?**; **Chadha06:ContractSigning?**); but, Mukhamedov & Ryan (**Mukhamedov08:ContractSigning?**) presented an attack for $n\geq5$ participants). Henceforth, this limitation will be avoided by considering only techniques that consider all states and an unbounded number of sessions; unfortunately, proving the security of a protocol in this context is undecidable (**Mitchell99:InsecurityUndecideable?**; **Mitchell04:InsecurityUndecideable?**). Accordingly, we will consider sound but incomplete techniques and as a consequence we will accept methodologies that may not terminate or may report false attacks. Lowe (**Lowe96?**; **Lowe99?**) demonstrated that limitations of finite state exploration can be overcome by introducing manual proofs that show such results are sufficient; in particular, Lowe proved the security of the Needham-Shroeder-Lowe public key protocol in this context by manually proving that if the revised scheme was vulnerable to an attack, then the attack would be discovered in the finite model. Ideally, we would like to avoid such manual proofs. Meadows (**Meadows94:NRL?**; **Meadows96:NRL?**; **Meadows05:NRL?**; **Meadows06:NRL?**) considers an unbounded number of sessions by applying sound user-guided pruning to derive a tractable model from an infinite state space, these results have been implemented in the NRL Protocol Analyzer. (See Meadows (**Meadows96:NeedhamSchroeder?**) for a comparison between the NRL Protocol Analyzer and Lowe’s approach using FDR.) Thayer, Herzog & Guttman (**Guttman98:StrandSpaces?**; **Guttman99:StrandSpaces?**) introduce *strand spaces* which allow more compact formalisations of state and Song, Berezin & Perrig (**Song99:Athena?**; **Song01:Athena?**) propose a verification procedure which has been implemented as Athena, this tool also reduces the state space by pruning. Both the NRL Protocol Analyzer and Athena may fail to terminate for an unbounded number of sessions and, based upon Athena, Cremers (**Cremers05:ScytherSemantics?**; **Cremers06:Scyther?**; **Cremers08:ScytherCAV?**; **Cremers08:Scyther?**) proposes the Scyther tool which guarantees termination, but may only analyse a bounded number of sessions when a result cannot be obtained in the unbounded case. Meier, Cremers & Basin (**Cremers10?**) extend Scyther to generate correctness proofs which can be automatically checked using theorem provers, this exploits the strengths of proof-construction techniques to provide stronger results. Bolignano (**Bolignano97:AbstractSecurityModels?**) proposes an abstract model which over-approximates the adversary’s power. This has proven to be useful for approaches using tree automata (**Monniaux99:TreeAutomata?**; **Monniaux03:TreeAutomata?**; **Genet00:TreeAutomata?**) and, more generally, techniques based upon resolution of Horn clauses (**Weidenbach99?**). (Tree automata can be encoded as Horn clauses (**Fruhwirth91?**).) Boichut, Héam & Kouchnarenko (**Boichut04:TA4SP?**; **Boichut05:TA4SP?**; **Boichut06:TA4SP?**; **Boichut09:TA4SP?**) extend the tree automata reasoning technique proposed by Genet & Klay (**Genet00:TreeAutomata?**) and implement their results in the TA4SP verification tool. Blanchet (**Blanchet2001?**; **Blanchet2002?**; **BlanchetJCS09?**; **Blanchet2010?**) uses resolution of Horn clauses to reason with reachability properties in processes of the applied pi calculus (**AppliedPi?**) and these results have been implemented in ProVerif. These over-approximation techniques have proven to be successful, despite the possibility of reporting false attacks and non-termination. ## Indistinguishability properties Indistinguishability properties are captured using equivalence (**Milner92?**; **Milner92b?**; **SpiCalculus?**; **AppliedPi?**). Equivalence has been studied independently of cryptography in the pi calculus (**Sangiori93:BisimulationPi?**; **Victor94:MobilityWorkbenchThesis?**; **Dam95:EquivalencePi?**; **Sangiori96:BisimulationPi?**; **Dam97:EquivalencePi?**) and automated tools have been proposed, for example, Another Bisimulation Checker (**Briais05:ABCmanual?**) and the Mobility Workbench (**Victor94:MobilityWorkbench?**). In the context of cryptographic protocols, Abadi & Gordon (**SpiCalculus?**) introduced the spi calculus to study equivalence. The spi calculus is restricted to a basic set of cryptographic primitives and this framework has been extended to the applied pi calculus by Abadi & Fournet (**AppliedPi?**) to overcome this limitation. Definitions of equivalence usually quantify over all possible adversaries and this makes proofs difficult. It is therefore useful to introduce alternative definitions that coincide and prove results in the alternative setting; *labelled bisimilarity* (**AG98?**; **AG98b?**; **Borgstrom02:SpiBisimulation?**; **Borgstrom05:SpiBisimulation?**) has been particular useful for this purpose in the spi calculus. In the applied pi calculus, Abadi & Fournet (**AppliedPi?**) claimed that their definitions of equivalence and labelled bisimilarity coincide; however, a formal proof of this claim has not been published, and additional assumptions are known to be necessary (**AppliedPiEmail?**; **AppliedPiCounterExample?**; **AppliedPiProof?**). Accordingly, the use of labelled bisimilarity for proofs of equivalence in the applied pi calculus should be avoided. We will now review decision procedures for equivalence. Durante, Sisto & Valenzano (**Durante00:Spi?**; **Durante03:Spi?**) present an decision procedure for equivalence which considers a bounded number of sessions in the spi calculus. In the applied pi calculus, Abadi & Cortier (**Abadi04:EqTheories?**; **Abadi05:EqTheories?**; **Abadi06?**) introduce a decision procedure for *static equivalence* (that is, in the presence of a passive adversary with a bounded number of sessions) in the context of *subterm convergent equational theories*; this result has been exploited by Baudet, Cortier & Delaune (**Delaune09:Yapa?**; **Delaune10:Yapa?**) and Ciobâcă, Delaune & Kremer (**Delaune09:KISS?**) to provide automated tools (namely, YAPA and KISS) for the analysis of static equivalence. Baudet (**Baudet05?**) extends the work of Abadi & Cortier to consider an active adversary for a bounded number of sessions. As discussed in the context of reachability properties, such techniques are useful for finding attacks but cannot guarantee the absence of attacks and, henceforth, we consider methodologies that analyse all states. Unfortunately, proving equivalence for an unbounded number of sessions is an undecidable problem (**Huttel03:BisimilaritySpi?**; **Abadi04:EqTheories?**; **Abadi06?**) and we will therefore consider sound but incomplete decision procedures. Blanchet, Abadi & Fournet (**Blanchet04?**; **BlanchetJLAP07?**) focus on equivalences between pairs of processes which share the same structure and differ only in the choice of terms. They introduce the notion of *uniformity*, a sufficient condition for observational equivalence, and automated reasoning is supported by ProVerif. However, the notion of uniformity is often too strict for the equivalences we wish to consider and the technique may report false attacks. The potentially infinite number of execution traces due to messages sent by the adversary makes reasoning about equivalence difficult. In a variant of the spi calculus, Borgström, Briais & Nestmann (**Borgstrom04:SpiSymbolic?**) avoid this problem by treating each message from the adversary as a variable (thereby ensuring that a message input is mapped to a single transition) and similar results are obtained by Delaune, Kremer & Ryan (**DKR07:Symbolic?**; **DKR10:Symbolic?**) for the applied pi calculus. Both Borgström, Briais & Nestmann and Delaune, Kremer & Ryan present decision procedures for fragments of the original calculi, for example, Delaune, Kremer & Ryan do not consider disequalities (that is, they do not consider else-branches in conditional statements). In a different direction, Cortier & Delaune (**Cortier09?**) have shown that equivalence coincides with trace equivalence for *determinate processes* (based upon (**Baudet05?**), this yields a decision procedure for a bounded number of sessions). ## Automated verification tools The inability of experts to identify the flaw in the Needham-Shroeder public key protocol highlights inherent weaknesses in the manual verification process and necessitates automated analysis tools. We will now summarise the capabilities of the state-of-the-art tools introduced in the previous section, with the notable omission of the NRL Protocol Analyzer which is not publicly available. AVISPA (**AVISPA?**) AVISPA provides a common interface for a number of analysis tools including TA4SL (**Boichut04:TA4SP?**; **Boichut05:TA4SP?**; **Boichut06:TA4SP?**; **Boichut09:TA4SP?**). AVISPA/TA4SL is capable of evaluating reachability properties for an unbounded number of sessions. (AVISPA also provides support for CL-Atse (**Turuani06:CLAtse?**), OFMC (**Basin03:OFMC?**; **Basin05:OFMC?**), and SATMC (**Compagna04:SATMC?**; **Compagna05:SATMC-PhD?**; **Compagna05:SATMC?**); but, these tools are limited to a finite number of sessions.) ProVerif (**Smyth10:ProVerifManual?**) ProVerif is capable of evaluating reachability properties (**Blanchet2001?**; **Abadi2002?**; **Blanchet2002?**; **Abadi04c?**; **BlanchetJCS09?**; **Blanchet2010?**) and observational equivalence (**Blanchet04?**; **Blanchet05?**; **BlanchetJLAP07?**), in the context of an unbounded number of sessions. The tool is capable of producing attack traces (**Allamigeon05?**): when a property cannot be proved, an execution trace which falsifies the desired property is constructed. Support is provided for user-defined equations and the resolution algorithm has been proven to terminate for tagged protocols (**Blanchet03?**; **Blanchet04e?**) Scyther (**Cremers07:ScytherManual?**) Scyther (**Cremers05:ScytherSemantics?**; **Cremers06:Scyther?**; **Cremers08:ScytherCAV?**; **Cremers08:Scyther?**) is capable of evaluating reachability properties for an unbounded number of sessions; moreover, if a result cannot be obtained (due to the undecidable nature of the problem), then security of a bounded number of sessions is evaluated. It follows that termination is guaranteed. The tool is also capable of generating correctness proofs suitable for theorem checkers (**Cremers10?**) and producing graphical attack traces. The AVISPA tool is particularly well-suited to the analysis of security properties for a bounded number of sessions (using OFMC, CL-Atse, and SATMC), but TA4SL provides only limited support in the unbounded case. For example, over-approximation coupled with the absence of attack traces is particularly problematic in AVISPA/T4SL, because it is difficult to distinguish between false attacks caused by over-approximation and real attacks (**Cremers09:ComparingStateSpace?**). ProVerif provides support for equivalence, in addition to reachability, although due to over-approximation it may report false attacks. ProVerif also supports user-defined equations and the following (non-exhaustive list of) cryptographic primitives can be modelled: symmetric and asymmetric cryptography; digital signatures; hash functions; bit-commitment; and signature proofs of knowledge. Scyther does not over-approximate and is therefore able to avoid reporting false attacks; moreover, unlike ProVerif, Scyther is guaranteed to terminate and produce a result (albeit, possibly only for a bounded number of sessions). However, Scyther does not support user-defined equational theories nor can control flow be modelled and these factors limit the class of protocols that can be modelled. Table 1 summarises the capabilities of these tools. (For further comparison between tools see (**Cremers09:ComparingStateSpace?**; **Patel10:CompareTools?**; **Lafourcade09:CompareTools?**; **Dalal10:CompareTools?**).)
| | AVISPA/TA4SL | ProVerif | Scyther | |:--------------------|:------------:|:--------:|:-------:| | Reachability | | | | | Equivalence | | | | | User-defined theory | | | | | Attack traces | | | | | No false attacks | | | | | Termination | | | | A comparison of automated verification tools
#### Applied pi calculus and ProVerif. The applied pi calculus provides a framework for analysing reachability and equivalence properties with automated support provided by ProVerif. The support for user-defined equations allows a large class of cryptographic protocols to be modelled and our discussion demonstrates ProVerif is a leading tool. Moreover, the applied pi calculus and ProVerif have been successfully used to model cryptographic protocols from a variety of application domains and some applications are listed below. On this basis, the applied pi calculus and ProVerif will be adopted by this thesis. - Abadi & Blanchet (**Abadi04:CertifiedEmail?**) use correspondence assertions to verify certified email (**Abadi02:CertifiedEmail?**). - Abadi, Blanchet & Fournet (**Blanchet07?**) analyse the JFK (Just Fast Keying) (**Aiello:2004:JFK?**) protocol – which was one of the candidates to replace IKE as the key exchange protocol in IPSec – using correspondence assertions and equivalence properties in a combination of manual and automated proofs. - Blanchet & Chaudhuri (**Blanchet08b?**) study the integrity of the Plutus file system (**Kallahalla03?**) on untrusted storage using correspondence assertions, resulting in the discovery and subsequent fixing of weaknesses in the initial system. - Bhargavan *et al.* (**Bhargavan06?**; **Bhargavan06b?**; **Bhargavan08?**; **Bhargavan08c?**) use ProVerif to analyse cryptographic protocol implementations written in F#; in particular, the Transport Layer Security (TLS) protocol has been studied in this manner (**Bhargavan08b?**). - Chen & Ryan (**ChenRyan:FAST09?**) have evaluated authentication protocols found in trusted computing, and have discovered vulnerabilities. - Delaune, Kremer & Ryan (**KR05:vote-privacy?**; **DKR06?**; **DKR08?**; **DKR10?**) and Backes, Hriţcu & Maffei (**Backes08:Voting?**) formalise and analyse privacy properties for electronic voting using equivalence. The application of formal method techniques are limited by: 1) the absence of rigorously defined security properties (**Oka97?**; **Bellare98?**; **Abadi99?**; **Meadows04?**); and 2) the lack of efficient procedures to evaluate security properties (**Barroca92?**; **Rushby93?**; **Gritzalis99?**). This thesis will advance the applied pi calculus and ProVerif in this context. # Contribution and literature review The objective of this thesis is to aid the secure design of cryptographic protocols and facilitate the evaluation of existing schemes. This is achieved in the context of the applied pi calculus by defining the security properties of protocols (Part II) and developing efficient procedures for the automated analysis of observational equivalence (Part III). Accordingly, this thesis will help avoid the current situation whereby numerous protocols are deployed and subsequently found to be insecure; ultimately helping to prevent attacks which cause financial loss, violations of personal privacy and threats towards democracy. The applicability of the methodologies and techniques introduced by this thesis are demonstrated throughout by analysing cryptographic protocols. A detailed description of the key chapters will now be presented. ### Chapter 3 Electronic voting systems lack the transparency offered by their paper-based counterparts. For example, in paper-based systems, the whole process, from ballot casting to tallying, can be observed; by contrast, it is not possible to observe electronic operations performed on data. Some electronic voting systems attempt to avoid this limitation by assuming the hardware and software running the election is trusted. In practice, this level of trust is very difficult to achieve and thus, systems based upon such assumptions have failed (**GermanyCourt09?**; **Dutch08?**; **DebraBowenCalifornia07?**; **ElectoralCommision07?**). A better approach is to provide *verifiable* voting systems (for example, (**JCJ02?**; **JCJ05?**; **ChaumRyanSchneider2005?**; **BenAdidaThesis?**; **DagstuhlAccord07?**; **Adida08?**)), that allow voters and election observers to check that votes have been recorded, tallied and declared correctly. Moreover, these checks can be performed in a manner independent of the election system’s hardware and software. In this chapter, a definition of election verifiability is presented. In related work, Juels, Catalano & Jakobsson (**JCJ02?**; **JCJ05?**; **JCJ10?**) present a definition of universal verifiability in the provable security model. Their definition assumes voting protocols produce non-interactive zero-knowledge proofs of knowledge (also called signature proofs of knowledge) demonstrating the correctness of tallying. Here we consider a definition in the formal model. Universal verifiability was also studied by Chevallier-Mames *et al.* (**Chevallier-Mames:Wote06?**; **Chevallier-Mames:WoteExt10?**). They show an incompatibility result: protocols cannot satisfy verifiability and vote privacy in an unconditional way (that is, without reliance on computational assumptions). But, as witnessed by (**JCJ02?**; **JCJ05?**), weaker versions of these properties can hold simultaneously; furthermore, our case studies demonstrate that privacy and verifiability can coexist. Baskar, Ramanujam & Suresh (**Baskar:TARK07?**) formalise individual verifiability, and Talbi *et al.* (**Talbi:ICICS08?**) consider individual and universal verifiability. Both of these definitions are tightly coupled with the protocol by Fujioka, Okamoto & Ohta (**FOO?**) and cannot easily be generalised. Moreover, Talbi *et al.* characterise individual execution traces as verifiable or not, and it is unclear how their definition can be used to assert that a protocol satisfies verifiability (that is, every execution of the protocol is verifiable); in particular, the authors only show that a single execution of the protocol by Fujioka, Okamoto & Ohta satisfies verifiability, and do not make any claims about the verifiability of the protocol. In complimentary work, Backes, Hriţcu & Maffei (**Backes08:Voting?**) formalise correctness properties (including inalterability and eligibility) for honest protocol executions; if an electronic voting scheme satisfies their definition and the participants execute the protocol as intended, then no one can change a voter’s vote and only registered voters can vote and at most once. However, their definition provides no assurances when participants deviate from the protocol (that is, when participants do not perform honest executions). It follows that a scheme can be correct, but not provide the intended security properties; this may occur, for example, because a dishonest administrator chooses to run a malicious variant of the protocol. In this respect, a verifiable electronic voting protocol is more desirable because voters and observers can check that the correctness properties hold, even in the presence of dishonest administrators. In addition to verifiability and correctness properties, electronic voting protocols are expected to satisfy privacy properties (including ballot secrecy, receipt freeness, and coercion resistance) and fairness (including ballot independence and no early results). Table [table:votingDefinitions] summarises these properties and highlights several definitions of security properties that have emerged in the literature.

Verifiability     

Individual verifiability: a voter can check that her own ballot is published on the election’s bulletin board. (JCJ05?; Baskar:TARK07?; Talbi:ICICS08?)
2-3 Universal verifiability: anyone can check that all the votes in the election outcome correspond to ballots published on the election’s bulletin board. (JCJ05?; Chevallier-Mames:Wote06?; Talbi:ICICS08?)
2-3 Eligibility verifiability: anyone can check that each ballot published on the bulletin board was cast by a registered voter and at most one ballot is tallied per voter. (JCJ05?)

Correctness      

Declared result: the election outcome is the correct sum of the votes cast.  (Backes08:Voting?)
Eligibility: only registered voters can vote and at most once.  (JCJ05?; KR05:vote-privacy?; Talbi:ICICS08?; Backes08:Voting?)
Inalterability: no one can change a voter’s vote.  (JCJ05?; Backes08:Voting?)

Privacy        

Ballot secrecy: A voter’s vote is not revealed to anyone.  (KR05:vote-privacy?; DKR06?; Chevallier-Mames:Wote06?; Baskar:TARK07?; Backes08:Voting?; DKR08?; Kremer09:Epistemic:VotePrivacy?; Jonker09:VotePrivacy?)
Receipt freeness: A voter cannot gain information which can be used to prove, to a coercer, how she voted. (DKR06?; Moran06?; Jonker06:ReceiptFreeness?; Chevallier-Mames:Wote06?; Baskar:TARK07?; Backes08:Voting?; DKR08?; Kusters09:CoercionResistance?; Jonker09:VotePrivacy?)
Coercion resistance: A voter cannot collaborate, with a coercer, to gain information which can be used to prove how she voted. (JCJ05?; DKR06?; Moran06?; Backes08:Voting?; DKR08?; Kusters09:CoercionResistance?; Kusters10:CoercionResistance?; Unruh10?)

Fairness 

Ballot independence: voters cannot cast related votes.  (Gennaro95:Independence:SK-voting?; Gennaro00:Independence?)
No early results: partial election results, which could alter voter behaviour (e.g., by influencing a voter’s decision or prompting a voter to pull-out), are unavailable. (KR05:vote-privacy?; Baskar:TARK07?; Talbi:ICICS08?)
We present a generic definition of election verifiability in terms of boolean tests. These tests are required to satisfy several conditions for all possible execution traces. This facilitates the evaluation of verifiability in electronic voting protocols. The definition also allows identification of the hardware and software components that must be trusted for the purpose of election verifiability, thereby facilitating the comparison of electronic voting protocols on the basis of trust assumptions. The framework is compatible with a large class of electronic voting schemes, including those based upon blind signatures, homomorphic encryption and mixnets. Moreover, the definition is used to analyse verifiability in three electronic voting protocols, two of which have been implemented and deployed. In particular, the Helios 2.0 protocol is evaluated; this scheme is particularly significant due to its real-world deployment: the International Association of Cryptologic Research used Helios to elect its board members (**IACRHelios10b?**), following a successful trial in a non-binding poll (**IACRHelios10?**); the Catholic University of Louvain adopted the system to elect the university president (**AdidaPereiraMarneffeQuisquater?**); and Princeton University used Helios to elect the student vice president (**HeliosPrinceton10?**). This demonstrates the suitability of the framework for analysing real-world election systems. ### Chapter 4 Trusted computing has introduced a hardware device, called a Trusted Platform Module, to allow systems to provide cryptographic guarantees about their state. The hardware chip contains a unique key to root trust and, as a consequence, cryptographic operations may reveal a platform’s identity. This raises privacy concerns. Brickell, Camenisch & Chen (**Chen04:RSA-DAA?**) overcome this privacy issue with the introduction of Direct Anonymous Attestation (DAA): a remote authentication scheme for trusted platforms which provides user-controlled anonymity and traceability. In this chapter, a definition of user-controlled anonymity is presented and used to analyse the RSA-based DAA scheme (**Chen04:RSA-DAA?**), discovering a vulnerability. In related work, Brickell, Camenisch & Chen (**Chen04:RSA-DAA?**) and Brickell, Chen & Li (**Chen08:DAA-security-preprint?**; **Chen09:DAA-security?**) present definitions in the provable security model; the relationship between these models is unknown (**Chen08:ECC-DAA-assymmetric-proof?**). Here we consider a definition in the formal model, based upon informal descriptions of user-controlled anonymity (**Chen08:DAA-security-preprint?**; **Chen09:DAA-security?**). By comparison, Backes, Maffei & Unruh (**Backes08:ZKP-DAA?**) formalised an earlier notion of user-controlled anonymity (informally described in (**Chen04:RSA-DAA?**)) for their model of the RSA-based DAA protocol. This formalisation can probably be generalised, but it pre-dates the definition of user-controlled anonymity by Brickell, Chen & Li (**Chen08:DAA-security-preprint?**; **Chen09:DAA-security?**) and considers a conceptually weaker adversary. Rudolph (**Rudolph07:DAAFlaw?**) also proposes an attack against RSA-based DAA which violates privacy; however, this vulnerability has been discounted by Leung, Chen & Mitchell (**Chen08:PossibleFlaw?**) as infeasible for large-scale violations of privacy and, moreover, can be detected in the presence of a single honest verifier. We present a generic definition of user-controlled anonymity as an equivalence property suited to automated reasoning using ProVerif. The definition is used to analyse anonymity in the RSA-based DAA protocol (**Chen04:RSA-DAA?**). This scheme is particularly significant, as the TPM specification version 1.2 (**TPMspec?**) (which has been defined as an ISO/IEC international standard (**ISO11889?**)) mandates support for RSA-based DAA and, moreover, estimates suggest the TPM has been embedded in over 300 million computers (**TCG10?**) (although, some experts claim only 5% of these TPMs have been turned on (**Martin08:TPM?**)). The analysis discovers a vulnerability which can be exploited by a passive adversary and, under weaker assumptions, by corrupt administrators. This demonstrates the suitability of the framework for analysing DAA schemes which have been deployed. Finally, a fix is identified and the revised scheme is shown to satisfy user-controlled anonymity. ### Chapter 5 Formal method techniques require efficient procedures for evaluating security properties. Moreover, automated reasoning is highly desirable to avoid errors associated with hand-written proofs. In this chapter, a new procedure for automatically verifying observational equivalence will be introduced, with particular emphasis on proving privacy properties. As previously discussed, uniformity is too strong for the equivalences we wish to consider and this chapter will introduce a weaker condition (see Section [sec:indi] for a summary of related work). In addition, the applied pi calculus is extended to allow modelling of barrier synchronisation. The study of equivalences in the context of synchronisation is particularly interesting, because certain security properties can only be realised if participants synchronise their actions in a specific manner. For example, privacy preserving protocols (including electronic voting, vehicular ad-hoc networks, and anonymity networks) make such assumptions. These results are implemented in the tool *ProSwapper*, an extension of ProVerif, and the applicability of the tool is demonstrated by analysing vote privacy in electronic voting protocols and privacy in vehicular ad-hoc networks. # List of publications This thesis is partly based upon the following publications: (**SmythPi10?**): . (**Smyth10:ElectionVerifiability?**): . (**Smyth10:ElectionVerifiabilityA?**): . (**Smyth08:Obs?**): . (**Smyth07:DAA?**): . # Overview and structure An overview of this thesis is outlined below. Part I. Presents introductory and background material. Part II. Formalises symbolic security definitions for electronic voting and anonymous attestation. Part III. Develops procedures for evaluation of security properties, with an emphasis on automation. Part IV. Presents an evaluation. # Background: Applied pi calculus The applied pi calculus (**AppliedPi?**; **SmythPi10?**) is a language for describing and analysing cryptographic protocols. It provides an intuitive process syntax to describe the actions of the participants in a protocol, emphasising their communication. The syntax is coupled with a formal semantics to allow reasoning about protocols. The language is based upon the pi calculus with the addition of a rich term algebra to enable modelling of the cryptographic operations used by protocols. In this respect, the applied pi calculus also has similarities with the spi calculus (**SpiCalculus?**). The key difference concerns the way in which cryptographic primitives are handled. The spi calculus has a fixed set of primitives built in (namely, symmetric and public key encryption), while the applied pi calculus allows a wide variety of more complex primitives (including, for example, non-deterministic encryption, digital signatures, and proofs of knowledge) to be defined by means of an equational theory. The applied pi calculus permits formal modelling of properties including: reachability, correspondence and observational equivalence. In the context of cryptographic protocols, these properties are particularly useful, since they allow the analysis of traditional security goals such as secrecy and authentication. Moreover, emerging properties such as privacy, traceability and verifiability can also be considered. # Syntax and informal semantics The calculus assumes an infinite set of names, an infinite set of variables, and a signature $\Sigma$ consisting of a finite set of function symbols, each with an associated arity. A function symbol with arity $0$ is a constant. Terms are built by applying function symbols to names, variables and other terms; as shown in Figure 1, where $f$ ranges over the functions of $\Sigma$ and $l$ is the arity of $f$.

 

XXX̄XXXXXXXXXXXXXXXxxX̄X̄ L, M, N, T, U, V : := terms
a, b, c, …, k, …, m, n, …, s name
x, y, z variable
f(M1, …, Ml) function application

Syntax for terms
We use metavariables $u,w$ to range over both names and variables. Tuples $u_1,\ldots,u_l$ and $M_1,\ldots,M_l$ are occasionally abbreviated $\tilde{u}$ and $\tilde{M}$. We write $\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ for the *substitution* that replaces the variable $x$ with the term $M$. Similarly, we write $\{\textnormal{\raisebox{2pt}{\footnotesize $m$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $n$}}\}$ for the substitution that replaces the name $n$ with the name $m$. Arbitrarily large substitutions can be written as $\{\textnormal{\raisebox{2pt}{\footnotesize $M_1$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_1$}},\ldots,\textnormal{\raisebox{2pt}{\footnotesize $M_l$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_l$}}\}$ or $\{\textnormal{\raisebox{2pt}{\footnotesize $\tilde{M}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde{x}$}}\}$. The letters $\sigma$ and $\tau$ range over substitutions. We write $N\sigma$ for the result of applying $\sigma$ to the variables (or names) of term $N$. A term is ground when it does not contain variables. We assume a type system for terms generated by a set of base types $\mathcal{S}$, which includes the universal type ${\ensuremath{\mathsf{Data}}}$. In addition, if $\omega$ is a type, then ${\ensuremath{\mathsf{Channel}\langle\omega\rangle}}$ is a type too. Formally, the set of types generated by the base types $\mathcal{S}$ is the smallest set $\Omega$ satisfying: 1) $\mathcal{S} \subseteq \Omega$, and 2) if $\omega \in \Omega$ then ${\ensuremath{\mathsf{Channel}\langle\omega\rangle}} \in \Omega$. Names and variables can have any type. By convention we use $a,b,c$ for channel names, $k,s$ as names of base type and $m,n$ for names of any type. A channel of type ${\ensuremath{\mathsf{Channel}\langle\omega\rangle}}$ may communicate messages of type $\omega$. For simplicity, function symbols can only be applied to, and return, terms of base type. We always assume that terms are well typed and that substitutions preserve types. The syntax for *processes* is presented in Figure 2.

 

XXX̄XXXXXXXXXXXXXXXxxX̄X̄ P, Q, R : := processes (or plain processes)
0 null process
P ∣ Q parallel composition
!P replication
ν n.P name restriction
$\textnormal{if } M=N \textnormal{ then } P \textnormal{ else }Q$ conditional
u(x).P message input
$\overline{u}\langle M\rangle.P$ message output

Syntax for processes
The null process $0$ does nothing; $P \mid Q$ is the parallel composition of processes $P$ and $Q$; replication $!P$ is the infinite composition $P \mid P \mid \ldots$; and name restriction $\nu\,n.P$ binds $n$ inside $P$. The conditional $\textnormal{if } M=N \textnormal{ then } P \textnormal{ else }Q$ is standard, but we stress $M = N$ represents equality (modulo an equational theory) rather than strict syntactic identity. For convenience, we abbreviate conditionals as: $\textnormal{if } M=N \textnormal{ then }{P}$, when $Q$ is the null process. Finally, communication is captured by message input and message output. The process $u(x).P$ awaits a message from channel $u$ and then behaves as $P$, with the received message bound to the variable $x$. The process $\overline{u}\langle M\rangle.P$ is ready to send $M$ on channel $u$ and then run $P$. In both of these cases, we may omit $P$ when it is $0$. We write $P\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ for $P$ with all free occurrences of $x$ replaced by $M$ and, in such a substitution, we insist that no name $n$ occurring in $M$ becomes bound by a restriction $\nu\,n$ occurring in $P$; sometimes we write $\textnormal{let } x=M \textnormal{ in }P$ in place of $P\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$. Bracketing must be used to avoid ambiguities in the way processes are written down. For example, the process $!\,P\mid Q$ might be interpreted as $(!P)\mid Q$ or as $!\,(P\mid Q)$. To avoid too much bracketing, we adopt conventions about the precedence of process operators. Unary operators $!$, $\nu\,n$, $u(x)$, and $\overline{u}\langle M\rangle$ bind more closely than binary operators, and the binary if-then-else operator binds more closely than the binary operator $\mid$. The expression $P\mid Q\mid R$ is also ambiguous, since it could mean either $(P\mid Q)\mid R$ or $P\mid (Q\mid R)$. However, we will later see that these processes are semantically identical, so we tolerate the ambiguity in the syntax. Another possible ambiguity arises because of the convention of omitting “else 0” in the if-then-else construct; consequently, it is not clear which “if” the “else” applies to in the expression: $\textnormal{if } M=N \textnormal{ then } \textnormal{if } K=L \textnormal{ then } Q \textnormal{ else }R.$ In absence of brackets indicating the contrary, we adopt the convention that the else branch belongs to the closest if and hence the statement should be interpreted as $\textnormal{if } M=N \textnormal{ then } (\textnormal{if } K=L \textnormal{ then } Q \textnormal{ else }R)$. Processes are extended with *active substitutions* to capture the knowledge exposed to the adversarial environment (Figure 3).

 

XXX̄XXXXXXXXXXXXXXXxxX̄X̄ A, B, C : := extended processes
P plain process
A ∣ B parallel composition
ν n.A name restriction
ν x.A variable restriction
$\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ active substitution

Syntax for extended processes
The active substitution $\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ represents a process that has previously output $M$. The value $M$ is now available to the environment by reference to the ‘handle’ $x$. The active substitution $\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ can replace the variable $x$ for the term $M$ in every process it comes into contact with. This behaviour can be controlled by restriction, and the process $\nu\,x.(\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\} \mid P)$ corresponds exactly to: $\textnormal{let } x=M \textnormal{ in }P$. This allows access to terms which the environment cannot construct. Arbitrarily large active substitutions can be obtained by parallel composition, and we occasionally abbreviate $\{\textnormal{\raisebox{2pt}{\footnotesize $M_1$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_1$}}\}\mid\ldots\mid\{\textnormal{\raisebox{2pt}{\footnotesize $M_l$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_l$}}\}$ as $\{\textnormal{\raisebox{2pt}{\footnotesize $M_1$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_1$}},\ldots,\textnormal{\raisebox{2pt}{\footnotesize $M_l$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_l$}}\}$ or $\{\textnormal{\raisebox{2pt}{\footnotesize $\tilde{M}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde{x}$}}\}$. We also use $\sigma$ and $\tau$ to range over active substitutions and we write $N\sigma$ for the result of applying $\sigma$ to the variables of $N$. Extended processes must have at most one active substitution for each variable, and there is exactly one when the variable is under restriction. Finally, we write $\nu\,\tilde{u}$ for the (possibly empty) series of pairwise-distinct binders $\nu\,u_1.\nu\,u_2.\cdots.\nu\,u_l$. The type system for terms is extended to processes. It enforces: $M,N$ are of the same type in the conditional expression $\textnormal{if } M=N \textnormal{ then } P \textnormal{ else }Q$; message input $u(x)$ is defined only where $u$ is of type ${\ensuremath{\mathsf{Channel}\langle\omega\rangle}}$ and $x$ is of type $\omega$; similarly, message output $\overline{u}\langle M\rangle$ requires $u$ of type ${\ensuremath{\mathsf{Channel}\langle\omega\rangle}}$ and $M$ of type $\omega$. Substitutions are always assumed to be cycle-free. In addition, active substitutions $\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ are such that the term $M$ and variable $x$ have the same base type; this assumption was not explicitly stated in (**AppliedPi?**) but its necessity has been confirmed (**AppliedPiEmail?**) and is essential for the validity of (**AppliedPi?**, Theorem 1) as shown in (**AppliedPiCounterExample?**). Finally, we assume extended processes are well-typed. The *scope* of names and variables are delimited by binders $u(x)$ and $\nu\,u$. The set of bound names $\textnormal{bn}(A)$ contains every name $n$ which is under restriction $\nu\,n$ inside $A$. The set of bound variables $\textnormal{bv}(A)$ consists of all those variables $x$ occurring in $A$ that are bound by a restriction $\nu\,x$ or input $u(x)$. We also define the set of free names and the set of free variables. The set of free names in $A$, denoted $\textnormal{fn}(A)$, consists of those names $n$ occurring in $A$ not in the scope of the binder $\nu\,n$. The set of free variables $\textnormal{fv}(A)$ contains the variables $x$ occurring in $A$ which are not in the scope of a restriction $\nu\,x$ or input $u(x)$. We occasionally write $\textnormal{fn}(M)$, and $\textnormal{fv}(M)$, for the set of names, and respectively variables, which appear in term $M$. An extended process is *closed* when every variable $x$ is either bound or defined by an active substitution. Bound names and bound variables are subject to $\alpha$-renaming. A *frame*, denoted $\varphi$ or $\psi$, is an extended process built from the null process $0$ and active substitutions $\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$, which are composed by parallel composition and restriction. The *domain* $\textnormal{dom}(\varphi)$ of a frame $\varphi$ is the set of variables that $\varphi$ exports; that is, the set of variables $x$ for which $\varphi$ contains an active substitution $\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$, where $x$ is not under restriction. Every extended process $A$ can be mapped to a frame $\varphi(A)$ by replacing every plain process in $A$ with $0$. The frame $\varphi(A)$ represents the static knowledge that is output by a process to its environment. The domain $\textnormal{dom}(A)$ of $A$ is the domain of $\varphi(A)$. # Operational semantics The signature $\Sigma$ is equipped with an equational theory $E$, that is, a set of equations of the form $M = N$, where the terms $M,N$ are defined over the signature $\Sigma$ (sometimes written $M,N\in T_\Sigma$). This allows us to capture relationships between primitives defined in $\Sigma$. We define equality modulo the equational theory, written $=_E$, as the smallest equivalence relation on terms that contains $E$ and is closed under application of function symbols, substitution of terms for variables and bijective renaming of names. We write $M =_EN$ when the equation $M = N$ is in the theory $E$, and keep the signature implicit. When $E$ is clear from the context, we may abbreviate $M =_EN$ as $M = N$. The negation of $M =_EN$ is denoted $M \not=_EN$ (and similarly abbreviated $M \not= N$). For further discussion on equational theories see Abadi & Fournet (**AppliedPi?**) and Abadi & Cortier (**Abadi04:EqTheories?**; **Abadi05:EqTheories?**; **Abadi06?**). Contexts may be used to represent the adversarial environment in which a process is run; that environment provides the data that the process inputs, and consumes the data that it outputs. We define *context* $C[\_]$ to be an extended process with a hole. We obtain $C[A]$ as the result of filling $C[\_]$’s hole with the extended process $A$. An *evaluation context* is a context whose hole is not in the scope of a replication, a conditional, an input, or an output. A context $C[\_]$ closes $A$ when $C[A]$ is closed. ## Structural equivalence Informally, two processes are structurally equivalent if they model the same thing, but the grammar permits different encodings. For example, to describe a pair of processes $A,B$ running in parallel, the grammar forces us to put one on the left and one on the right; that is, we have to write either $A \mid B$, or $B \mid A$. These two processes are said to be structurally equivalent. Formally, *structural equivalence* ($\equiv$) is the smallest equivalence relation on extended processes that is closed by $\alpha$-conversion of both bound names and bound variables, closed under application of evaluation contexts, and which satisfies the rules in Figure 1.

$$\begin{array}{lrcl} {\ensuremath{\mbox{\sc Par-0}}}& A & \equiv & A \mid 0\\ {\ensuremath{\mbox{\sc Par-A}}}& A\mid(B \mid C) & \equiv & (A \mid B) \mid C \\ {\ensuremath{\mbox{\sc Par-C}}}& A \mid B & \equiv & B \mid A \\ {\ensuremath{\mbox{\sc Repl}}}& !P & \equiv & P \mid {!P} \\ \\ {\ensuremath{\mbox{\sc New-0}}}& \nu\,n.0& \equiv & 0\\ {\ensuremath{\mbox{\sc New-C}}}& \nu\,u.\nu\,w.A & \equiv & \nu\,w.\nu\,u.A \\ {\ensuremath{\mbox{\sc New-Par}}}& A\mid\nu\,u.B & \equiv & \nu\,u.(A \mid B) \\ & & & \textrm{where } u\not\in \textnormal{fv}(A) \cup \textnormal{fn}(A)\\ \\ {\ensuremath{\mbox{\sc Alias}}}& \nu\,x.\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}& \equiv & 0\\ {\ensuremath{\mbox{\sc Subst}}}& \{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\} \mid A & \equiv & \{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\} \mid A\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\} \\ {\ensuremath{\mbox{\sc Rewrite}}}& \{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\} & \equiv & \{\textnormal{\raisebox{2pt}{\footnotesize $N$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\} \\ & & & \textrm{where } M =_EN \\ \end{array}$$

XXXXXXX̄Xx̄ ${\ensuremath{\mbox{\sc Comm}}}$ $\overline{c}\langle x\rangle.P\mid c(x).Q \xrightarrow{}P \mid Q$
${\ensuremath{\mbox{\sc Then}}}$ $\textnormal{if } N=N \textnormal{ then } P \textnormal{ else }Q \xrightarrow{}P$
${\ensuremath{\mbox{\sc Else}}}$ $\textnormal{if } L=M \textnormal{ then } P \textnormal{ else }Q \xrightarrow{}Q$
for ground terms L, M such that L≠EM

Semantics for processes
The rules for parallel composition, replication and restriction are self-explanatory. ${\ensuremath{\mbox{\sc Alias}}}$ enables the introduction of an arbitrary active substitution with restricted scope. ${\ensuremath{\mbox{\sc Subst}}}$ describes the application of an active substitution to a process that it comes into contact with. The final rule, ${\ensuremath{\mbox{\sc Rewrite}}}$, allows terms that are equal modulo the equational theory to be swapped as desired. Structural equivalence allows every closed extended process $A$ to be rewritten as a substitution and a closed plain process with some restricted names: $A \equiv \nu\,\tilde{n}.(\{\textnormal{\raisebox{2pt}{\footnotesize $\tilde{M}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde{x}$}}\} \mid P)$, where $\textnormal{fv}(\tilde{M}) = \textnormal{fv}(P) = \emptyset$ and $\tilde{n} \subseteq \textnormal{fn}(\tilde{M})$. It follows immediately that every closed frame $\varphi$ can be rewritten as a substitution with some restricted names: $\varphi \equiv \nu\,\tilde{n}.\{\textnormal{\raisebox{2pt}{\footnotesize $\tilde{M}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde{x}$}}\}$, where $\textnormal{fv}(\tilde{M}) = \emptyset$ and $\tilde{n} \subseteq \textnormal{fn}(\tilde{M})$. We note that the domain of $\varphi$ is $\tilde{x}$. ## Internal reduction A process can be executed without contact with its environment, either because if-statements are evaluated and the then- or else-branch is taken, or because internal sub-processes communicate with each other. The execution of a process with respect to control flow and communication is captured by *internal reduction*. Formally, internal reduction ($\xrightarrow{}$) is the smallest relation on extended processes closed under structural equivalence and application of evaluation contexts, satisfying the rules of Figure 1. We write $\xrightarrow{}^*$ for the reflexive and transitive closure of $\xrightarrow{}$. Communication (${\ensuremath{\mbox{\sc Comm}}}$) is defined on variables, making it look rather restricted. However, this entails no loss of generality because ${\ensuremath{\mbox{\sc Alias}}}$ and ${\ensuremath{\mbox{\sc Subst}}}$ can be used to allow communication of an arbitrary term $M$ instead of a variable $x$. Conditionals (${\ensuremath{\mbox{\sc Then}}}$ and ${\ensuremath{\mbox{\sc Else}}}$) are dependent on the equational theory. Applications of ${\ensuremath{\mbox{\sc Then}}}$ may require the use of the structural equivalence rule ${\ensuremath{\mbox{\sc Rewrite}}}$ to derive $``N = N"$ from $``M = N"$ where $M =_EN$. ${\ensuremath{\mbox{\sc Else}}}$ may require that active substitutions in the context be applied using ${\ensuremath{\mbox{\sc Alias}}}$ and ${\ensuremath{\mbox{\sc Subst}}}$ to ensure $L,M$ are ground. ## Labelled reduction The semantics in Section 1.2 allow us to reason about protocols with an adversary represented by a context. In order to prove that security properties hold for all adversaries, quantification over all contexts is typically required, which can be difficult in practice. The labelled operational semantics we now present aims to eliminate universal quantification of the context. The labelled semantics defines a ternary relation written $A \xrightarrow{\alpha} B$, where $\alpha$ is a *label* of the form $c(M),$ $\overline{c}\langle u\rangle,$ or $\nu\,u.\overline{c}\langle u\rangle$ such that $u$ is either a channel name or a variable of base type. The transition $A \xrightarrow{c(M)} B$ means that the process $A$ performs an input of the term $M$ from the environment on the channel $c$, and the resulting process is $B$. The situation for output is a bit more complicated, since there are several cases. If the value being output is a free variable $x$ or a free channel name $d$, then the label $\overline{c}\langle x\rangle$, respectively $\overline{c}\langle d\rangle$, is used. If the value is a restricted channel name $d$, then the label $\nu\,d.\overline{c}\langle d\rangle$ is used. Finally, if the value being output is a term $M$, then the label $\nu\,x.\overline{c}\langle x\rangle$ is used, after replacing the occurrence of the term $M$ by $x$ and wrapping the process in $\nu x.(\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\} \mid \_)$. The semantics are extended to include the rules that appear in Figure 2.

$$\begin{array}{lc} {\ensuremath{\mbox{\sc In}}}& c(x).P \xrightarrow{c(M)} P\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\} \\[0.2cm] {\ensuremath{\mbox{\sc Out-Atom}}}& \overline{c}\langle u\rangle.P \xrightarrow{\overline{c}\langle u\rangle} P \\[0.2cm] {\ensuremath{\mbox{\sc Open-Atom}}}& \dfrac{A \xrightarrow{\overline{c}\langle u\rangle} A' \qquad u \not= c} {\nu\,u.A \xrightarrow{\nu\,u.\overline{c}\langle u\rangle} A'} \\[0.5cm] {\ensuremath{\mbox{\sc Scope}}}& \dfrac{A \xrightarrow{\alpha} A' \qquad \textrm{$u$ does not occur in $\alpha$}} {\nu\,u.A \xrightarrow{\alpha} \nu\,u.A'} \\[0.5cm] {\ensuremath{\mbox{\sc Par}}}& \dfrac{A \xrightarrow{\alpha} A' \qquad \textnormal{bv}(\alpha) \cap \textnormal{fv}(B) = \textnormal{bn}(\alpha) \cap \textnormal{fn}(B) = \emptyset} {A \mid B \xrightarrow{\alpha} A' \mid B} \\[0.5cm] {\ensuremath{\mbox{\sc Struct}}}& \dfrac{A \equiv B \qquad B \xrightarrow{\alpha} B' \qquad B' \equiv A'} {A \xrightarrow{\alpha} A'} \end{array}$$

Semantics for labelled transitions
# Observational equivalence The notion of indistinguishability is a powerful concept which allows us to reason about complex properties that cannot be expressed as trace-based assertions. Intuitively, two processes are said to be equivalent if an observer has no way to tell them apart. The processes may be handling different data, and internally performing quite different computations, but they look the same to an external observer. This notion allows us to define strong notions of secrecy and privacy. Roughly speaking, processes $A$ and $B$ are said to be observationally equivalent if: they can output on the same channel for all contexts they are placed inside of, and for every step made by $A$, there exists a step that $B$ can make, such that the resulting pair of processes are observationally equivalent (and vice-versa). We write $A\Downarrow c$ when $A$ can evolve to a process that can send a message on channel $c$; that is, when $A\to^*C[\overline{c}\langle M\rangle.P]$ for some term $M$, process $P$ and evaluation context $C[\_]$ that does not bind $c$.
**Definition 1** (Observational equivalence). *Observational equivalence $\approx$ is the largest symmetric relation $\mathcal{R}$ between closed extended processes with the same domain such that $A \mathrel{\mathcal{R}}B$ implies:* 1. * if $A\Downarrow c$, then $B\Downarrow c$;* 2. * if $A \xrightarrow{}^* A'$, then $B \xrightarrow{}^* B'$ and $A' \mathrel{\mathcal{R}}B'$ for some $B'$;* 3. * $C[A] \mathrel{\mathcal{R}}C[B]$ for all closing evaluation contexts $C[\_]$.*
# Assumptions and notation In this thesis, all signatures are tacitly assumed to include the constant $\varnothing$, unary functions $\mathsf{fst}$, $\mathsf{snd}$, and the binary function $\mathsf{pair}$. In addition, equational theories are assumed to include: $$\mathsf{fst}(\mathsf{pair}(x, y)) = x \qquad \mathsf{snd}(\mathsf{pair}(x, y)) = y$$ For convenience, $\mathsf{pair}(M_1, \mathsf{pair}(\dots, \mathsf{pair}(M_n, \varnothing)))$ is occasionally abbreviated as $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}M_1,\dots,\allowbreak M_n \mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$ and $\mathsf{fst}(\mathsf{snd}^{i-1}(M))$ is denoted $\pi_{i}(M)$. We also introduce some convenient notation for sequence of names or variables. Given an infinite sequence of names or variables ${\sf u} = u_1,u_2,u_3,u_4,\dots$, the following self-explanatory abbreviations are used: $$\begin{array}{lcl} \mathsf{head}({\sf u}) &=& u_1\\ \mathsf{tail}({\sf u}) &=& u_2,u_3,u_4,\dots\\ \mathsf{odd}({\sf u}) &=& u_1,u_3,\dots\\ \mathsf{even}({\sf u}) &=& u_2,u_4,\dots \end{array}$$ **Formalisation of security properties**
**The failure of cryptographic protocols has been directly attributed to the absence of rigorously defined security properties. This part introduces symbolic definitions for security in electronic voting and anonymous attestation.**
# untitled section **\[tex2md\] this section could not be converted; its LaTeX follows verbatim:** `Error at (line 105, column 1): unexpected \vskip expecting \end{document} \end{overview} ^` ``` latex \chapter[Election verifiability in electronic voting] {Election verifiability in electronic voting\symbolfootnotemark}\label{chap:ev} \symbolfootnotetext{This chapter is an extension of~\cite{Smyth10:ElectionVerifiability,Smyth10:ElectionVerifiabilityA}.} %In particular, the definition of \emph{election verifiability} is strengthened in a manner desirable for electronic voting protocols based upon homomorphic encryption. \sout{Additionally, the methodology supporting automated reasoning was inspired by~\cite{Smyth10:ElectionVerifiabilityA}.}} \begin{overview} A definition of election verifiability is presented in terms of boolean tests which can be performed on the data produced by an election. The definition allows the evaluation of election verifiability in electronic voting protocols. It also allows the identification of hardware and software components that must be trusted for the purpose of verifiability, thereby facilitating the comparison of electronic voting protocols on the basis of trust assumptions. Our definition of election verifiability is compatible with a large class of electronic voting schemes -- including those based upon blind signatures, homomorphic encryption and mixnets -- as will be demonstrated by analysing the FOO, Helios 2.0 and JCJ-Civitas electronic voting protocols. \end{overview} \noindent %Electronic voting systems are being introduced, or trialled, in several countries. % to provide more efficient voting procedures. Electronic voting systems lack the transparency provided by their paper counterparts. For example, paper-based elections often allow observation of the whole process (that is, from ballot casting to tallying) and rely upon robustness characteristics of the physical world (such as the impossibility of altering the markings on a paper ballot sealed inside a locked ballot box). By comparison, it is not possible to observe the electronic operations performed on bitstrings. As a consequence, computer systems may alter votes in a way that cannot be detected. % by either voters or election observers. %From a voter's perspective this situation can be described as \emph{voting on Satan's computer}, analogously with \cite{AN95}. Some electronic voting systems attempt to eliminate the necessity for transparency under the hypothesis that the hardware and software running the election can be trusted. Unsurprisingly, this level of trust is very difficult to achieve and thus deployed systems based upon such assumptions have failed~\cite{GermanyCourt09,Dutch08,DebraBowenCalifornia07,ElectoralCommision07}. The concept of \emph{election verifiability} (also known as \emph{end-to-end verifiability}) has emerged in the academic literature to address this problem (for example, \cite{JCJ02,ChaumRyanSchneider2005,BenAdidaThesis,DagstuhlAccord07,Adida08}). The notion should allow voters and election observers to verify -- independently of the hardware and software running the election -- that votes have been recorded, tallied and declared correctly. Two aspects of verifiability are generally distinguished. \begin{itemize} \item \emph{Individual verifiability:} a voter can check that her own ballot is published on the election's bulletin board. \item \emph{Universal verifiability:} anyone can check that all the votes in the election outcome correspond to ballots published on the election's bulletin board. %\textcolor{red}{anyone can check the ballots published on the election's bulletin board are well-formed and all the votes in the election outcome correspond to those ballots.} %\textcolor{red}{anyone can check that all the votes in the election outcome correspond to distinct ballots published on the election's bulletin board.} %anyone can check that the election outcome corresponds to the ballots published on the bulletin board. \end{itemize} % In this thesis, another aspect is also identified. % \begin{itemize} \item \emph{Eligibility verifiability:} anyone can check that each ballot published on the bulletin board was cast by a registered voter and at most one ballot is tallied per voter. %anyone can check that each vote in the election outcome was cast by a registered voter and there is at most one vote per voter. \end{itemize} % Eligibility verifiability is explicitly distinguished as a distinct property (although it occasionally appears as part of universal verifiability in the literature). \contribution A definition of election verifiability which captures individual, universal and eligibility verifiability is presented. Formally, the definition captures verifiability as a triple of boolean tests $\Riv, \Ruv$, and $\Rev$ which are required to satisfy several conditions when parametrised with the data produced by an election protocol, for all possible protocol executions. The test $\Riv$ is intended to be checked by individual voters who instantiate the test with their private information (for example, their vote, and data derived during the execution of the protocol) and public information relating to the election (for example, the contents of the bulletin board). The tests $\Ruv$ and $\Rev$ can be checked by any external observer and hence only rely on public information. The consideration of eligibility verifiability is particularly interesting, as it provides an assurance that the election outcome corresponds to votes legitimately cast. This property has been largely neglected by existing electronic voting protocols, despite its suitability as a mechanism to detect ballot stuffing. Our definition of election verifiability dictates that only those parts of the voting system that need to be trusted to achieve verifiability should be modelled; all the remaining parts of the system are controlled by the adversarial environment. This is a further interesting aspect because it allows the clear identification of trust assumptions needed for verifiability, and, therefore, permits comparison of electronic voting protocols. In complementary work, Pieters~\cite{Pieters10:WhatProof} compares voting systems on the basis of the proof techniques used to achieve verifiability. Tests $\Riv, \Ruv$, and $\Rev$ are assumed to be verified in a trusted environment (if a test is checked by malicious software that always evaluates the test to hold, it is useless). However, the verification of these tests can be repeated on different machines, using software provided by various stakeholders, thereby increasing confidence. Alternatively, this assumption can be eliminated by adopting human-verifiable tests as described by Adida~\cite[Chapter~5]{BenAdidaThesis}. The application of our election verifiability definition is demonstrated by analysing verifiability in three case studies: the protocol by Fujioka, Okamoto \& Ohta~\cite{FOO} (commonly referred to as the FOO protocol); the Helios 2.0 protocol~\cite{AdidaPereiraMarneffeQuisquater} which was effectively used in % the election of board memebers for the International Association of Cryptologic Research, the presidential election at the Catholic University of Louvain, and the student vice president at Princeton University; and the protocol by Juels, Catalano \& Jakobsson~\cite{JCJ02,JCJ05,JCJ10} which has been implemented by Clarkson, Chong \& Myers~\cite{CCM08,CCM08b} as Civitas (we occassionally refer to this protocol as JCJ-Civitas). This demonstrates the suitability of the definition for a large class of protocols, including schemes based upon mixnets, homomorphic encryption and blind signatures. The protocols by Fujioka, Okamoto \& Ohta and Helios 2.0 will be shown not to satisfy eligibility verifiability and are vulnerable to ballot stuffing by dishonest administrators. As these protocols do not proclaim to satisfy eligibility verifiability, this is not claimed to be an attack, but simply a clarification of precisely which aspects of verifiability are satisfied. \structure Section~\ref{sec:ev:prot} formalises electronic voting protocols in the applied pi calculus. Section~\ref{sec:iv} specifies some notational conventions and defines the individual and universal verifiability aspects of our definition (Section~\ref{sec:ev:iv-uv}). The analysis of FOO is presented in Section~\ref{sec:foo}, and Helios is studied in Section~\ref{sec:helios}. Our definition %of election verifiability is extended to eligibility in Section~\ref{sec:elig}, and JCJ-Civitas is analysed in Section~\ref{sec:jcj}. Finally, a summary is presented in Section~\ref{sec:ev:summary}. ``` # Formalising electronic voting protocols The framework should permit explicit specification of the trusted parts of an election protocol. Ideally, only the communication channel between voters and voting terminals should be trusted. In particular, the voter should not need to trust the election hardware or software. However, achieving absolute verifiability in this context is difficult and the trustworthiness of some parts of the protocol are often assumed. Such trust assumptions are motivated by the fact that certain components of a protocol can be audited, or can be executed in a distributed manner amongst several different election officials. For instance, in Helios 2.0 (**AdidaPereiraMarneffeQuisquater?**) the ballot construction can be audited using a cast-or-audit mechanism (see Benaloh (**Benaloh06:BallotAudit?**; **Benaloh07:BallotAudit?**) for further details on ballot auditing). Formally, the trusted parts of the voting protocol can be captured using a voting process specification (Definition 1). This specification makes trust assumptions explicit; however, whether such assumptions are reasonable depends on the context of an election.
**Definition 1** (Voting process specification). *A *voting process specification* is a tuple $\langle V, A \rangle$, where $V$ is a plain process without replication and $A$ is a closed evaluation context such that $\textnormal{fv}(V)=\{v\}$ and $\textnormal{rv}(V) = \emptyset$.*
Given a voting process specification $\langle V, A \rangle$, integer $n\in\mathbb{N}$, and names $s_1,\dots,s_n$, we can build the voting process $${\sf VP}_n(s_1,\dots,s_n) = A[ V_1 \mid\dots\mid V_n]$$ where $V_i = V \{^{s_i} / _v\}$. Intuitively, ${\sf VP}_n(s_1,\allowbreak\dots,\allowbreak s_n)$ models the protocol with $n$ voters casting votes for candidates $s_1, \ldots, s_n$. Note that the votes $s_1, \ldots, s_n$ are not required to be distinct (several voters may cast votes for the same candidate).
**Example 1** (Raising hands protocol). *Consider the *raising hands* protocol in which every voter outputs her signed vote. Cryptographic primitives are captured by the signature $\Sigma = \{\mathsf{true},\mathsf{getmsg},\mathsf{pk},\mathsf{checksign},\mathsf{sign}\}$, where $\mathsf{true}$ is a constant, $\mathsf{getmsg}$ and $\mathsf{pk}$ are unary functions, and functions $\mathsf{checksign}$ and $\mathsf{sign}$ are binary. The signature is associated with the equations: $$\begin{array}{lcl} \mathsf{checksign}(\mathsf{pk}(x_{\mathsf{sk }}),\mathsf{sign}(x_{\mathsf{sk }},x_{\mathsf{msg }})) &=& \mathsf{true}\\ \mathsf{getmsg}(\mathsf{sign}(x_{\mathsf{sk }},x_{\mathsf{msg }})) &=& x_{\mathsf{msg }} \end{array}$$ A trusted administrator, modelled by the context $A_{\sf ex}$, is assumed to distribute keying material to voters and publish each voter’s public key. $$A_{\sf ex}[\_] \; \widehat = \; \nu d. \nu sk_A. ( ! \nu sk_V. \overline{d}\langle sk_V\rangle.\overline{c}\langle\mathsf{sign}(sk_A,\mathsf{pk}(sk_V))\rangle \mid \{ ^{\mathsf{pk}(sk_A)} / _{x_{pk}} \} \mid \_)$$ The channel $d$ is under name restriction to ensure voters’ keys are distributed privately, and the active substitution $\{ ^{\mathsf{pk}(sk_A)} / _{x_{pk}} \}$ models the fact that the administrator’s public key is known (for example, published on the election bulletin board). The voter, who receives her private key and then outputs her signed vote paired with her public key, is modelled by the process: $$V_{\sf ex} \; \widehat = \; d(x_{sk_V}). \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(x_{sk_V}), \mathsf{sign}(x_{sk_V},v)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \rangle$$ This protocol satisfies election verifiability, as will be shown later in this chapter.*
For the purposes of individual verifiability, the voter may rely upon some data derived during the protocol execution. To take such data into consideration, we distinguish a subset of variables which we call *record variables* $r$ and extend plain processes with the *record message* ${\sf rec}(r,M).P$ construct. The record message construct permits a voter to privately record some information which she may later use to verify the election. This behaviour is captured by extending internal reduction to include ${\sf rec}(r,M).P \to P \mid \{^M / _r\}$. Record variables are assumed to be unique in each process; that is, a record variable may appear at most once. The type system ensures that the term $M$ and record variable $r$ have the same type in ${\sf rec}(r,M)$; it also enforces that record variables may only be used in the first argument of the ${\sf rec}$ construct or in the domain of an extended process. Definition 2 allows processes to record restricted names and message inputs.
**Definition 2**. *Let $\sf rv$ be an infinite sequence of distinct record variables. Given a process $P$ which does not contain replication, we define $\mathsf{R}(P) =\mathsf{R}'({\sf rv}, P)$, where: $$\begin{array}{lcl} \mathsf{R}'({\sf r},\, 0) & \widehat= & 0 \\ \mathsf{R}'({\sf r},\, P \mid Q) & \widehat= & \mathsf{R}'(\text{odd}({\sf r}), P) \mid \mathsf{R}'(\text{even}({\sf r}),Q)\\ \mathsf{R}'({\sf r},\, \nu\,n.P) & \widehat= & \nu\,n.{\sf rec}(\text{head}({\sf r}), n).\mathsf{R}'(\text{tail}({\sf r}),P)\\ \mathsf{R}'({\sf r},\, u(x).P) & \widehat= & u(x).{\sf rec}(\text{head}({\sf r}), x).\mathsf{R}'(\text{tail}({\sf r}),P)\\ \mathsf{R}'({\sf r},\, \overline{u}\langle M\rangle.P) & \widehat= & \overline{u}\langle M\rangle.\mathsf{R}'({\sf r},P)\\% \mathsf{R}'({\sf r},\, \textnormal{if } M = N \textnormal{ then } P \textnormal{ else }Q) & \widehat= & \textnormal{if } M = N \textnormal{ then } \mathsf{R}'(\text{odd}({\sf r}),P) \textnormal{ else }\mathsf{R}'(\text{even}({\sf r}),Q) \end{array}$$*
Given a tuple of record variables $\tilde r$, the tuple of record variables obtained by indexing each record variable in $\tilde r$ with $i$ is denoted $\tilde r_i$. The set of record variables in a process and term are denoted $\textnormal{rv}(A)$ and $\textnormal{rv}(M)$. A voting process can now be constructed such that the voter $V$ records the values constructed and input during execution.
**Definition 3** (Augmented voting process). *Given a voting process specification $\langle V, A \rangle$, integer $n\in \mathbb N$ and names $s_1, \ldots , s_n$, the *augmented voting process* $${\sf VP}_n^+(s_1,\ldots,s_n) = A[V_1^+ \mid\dots\mid V_n^+]$$ where $V_i^+ = \mathsf{R}(V) \{^{s_i}/_v\} \{^{r_i}/_r \mid r \in \textnormal{rv}(\mathsf{R}(V))\}$.*
The augmented voting process ${\sf VP}_n^+(s_1,\ldots,s_n)$ models the voting protocol for $n$ voters casting votes $s_1,\ldots,s_n$, who privately record the data that may be needed for verification using record variables $\tilde r_i$.
**Example 2**. *Given integer $n\in \mathbb N$ and names $s_1, \ldots , s_n$, the augmented voting process associated with our raising hands process specification $\langle V_{\sf ex}, A_{\sf ex} \rangle$ is defined as follows $$\begin{gathered} A_{\sf ex}[d(x_{sk_V}). {\sf rec}(r_1, x_{sk_V}).\overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(x_{sk_V}), \mathsf{sign}(x_{sk_V},s_1)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \rangle \mid \dots \\\mid d(x_{sk_V}).{\sf rec}(r_n, x_{sk_V}). \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(x_{sk_V}), \mathsf{sign}(x_{sk_V},s_n)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \rangle ] \end{gathered}$$*
# Election verifiability Election verifiability is captured using three tests $\Phi^{IV}$, $\Phi^{UV}$, and $\Phi^{EV}$. Formally, a test is built from conjunctions and disjunctions of *atomic tests* of the form $(M = N)$, where $M,N$ are terms. Tests may contain variables, and will need to hold on frames arising from arbitrary protocol executions. We now recall the purpose of each test and assume some naming conventions about variables. *Individual verifiability:* The test $\Phi^{IV}$ allows a voter to identify her ballot on the bulletin board. The test has: - a variable $v$ referring to a voter’s vote. - a variable $w$ referring to a voter’s public credential. - some variables $x,x',\bar{x},\dots$ expected to refer to global public values pertaining to the election (for example, public keys belonging to election administrators). - a variable $y$ expected to refer to the voter’s ballot on the bulletin board. - some record variables $r_1,\dots,r_k$ referring to the voter’s private data. *Universal verifiability:* The test $\Phi^{UV}$ allows an observer to check that votes in the election outcome correspond to ballots on the bulletin board. - a variable $\hat{v}$ referring to a tuple representing the election outcome. - some variables $x,x',\bar{x},\dots$ as above. - a variable $\hat{y}$ expected to refer to a tuple containing all of the voters’ ballots on the bulletin board. - some variables $z,z',\bar z,\dots$ expected to refer to outputs generated by the protocol for the purposes of universal and eligibility verification. *Eligibility verifiability:* The test $\Phi^{EV}$ allows an observer to check that each ballot on the bulletin board was cast by a registered voter and at most one ballot is tallied per voter. The test has: - a variable $\hat{w}$ referring to a tuple containing public credentials of eligible votes. - a variable $\hat y$, variables $x,x',\bar{x},\dots$ and variables $z,z',\bar z,\dots$ as above. The remainder of this section will focus on the individual and universal aspects of our definition; eligibility verifiability will be discussed in Section [sec:elig]. ## Security definition: Individual and universal verifiability The test $\Phi^{IV}$ is parametrised with a single bulletin board entry (which an individual voter needs to identify in some way, possibly by testing all of them); by comparison, the tests $\Phi^{UV}$ and $\Phi^{EV}$ can be applied to several bulletin board entries. The tests $\Phi^{UV}$ and $\Phi^{EV}$ are therefore parametrised with an integer $m\in\mathbb{N}$ denoting the $m$ bulletin board entries considered; accordingly, we write $\Phi^{UV}_m$ and $\Phi^{EV}_m$ to denote such tests. The tests suitable for the purposes of election verifiability have to satisfy certain conditions: if the tests succeed, then the data output by the election is indeed valid (*soundness*), and there is a behaviour of the election administrators which produces election data satisfying the tests (*effectiveness*). Formally, these requirements are captured by Definition 1. We write $\hat T \simeq \hat{T}'$ to denote that the terms $\hat T$ and $\hat T'$ are a permutation of each other modulo the equational theory; that is, $\hat T = \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}T_1, \ldots T_n \mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$, $\hat T' = \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}T'_1, \ldots T'_n\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$ such that there exists a permutation $\chi$ on $\{1, \ldots ,n\}$ and for all $1 \leq i \leq n$ we have $\pi_{i}(T) =_E\pi_{\chi(i)}(T')$ for some terms $T_1,T'_1,\dots,T_n,T'_n$ and integer $n\in\mathbb{N}$.
**Definition 1** (Individual and universal verifiability). *A voting specification $\langle V, A \rangle$ *satisfies individual and universal verifiability* if there exists a test $\Phi^{IV}$, where for all $m\in\mathbb{N}$ there exists a test $\Phi^{UV}_m$, such that $\textnormal{fn}(\Phi^{IV})=\textnormal{fn}(\Phi^{UV}_m)= \textnormal{rv}(\Phi^{UV}_m) =\emptyset$ and $\textnormal{rv}(\Phi^{IV}) \subseteq \textnormal{rv}(\mathsf{R}(V))$, and for all names $s_1,\dots,s_n$ the conditions below hold. Let $\tilde r=\textnormal{rv}(\Phi^{IV})$ and $\Phi^{IV}_i = \Phi^{IV}\{^{s_i} /_v, \textnormal{\raisebox{2pt}{\footnotesize $\tilde r_{i}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde r$}} \}$.* #### Soundness. *For all contexts $C$, such that $C[{\sf VP}_n^+(s_1,\dots,\allowbreak s_n% ,\allowbreak id_1,\dots,\allowbreak id_n )]\allowbreak \mathrel{(\xrightarrow{}^* \xrightarrow{\alpha} \xrightarrow{}^*)^*} B$ and $\varphi(B)\equiv\nu\tilde n.\sigma$ for some process $B$, substitution $\sigma$ and names $\tilde n$, we have: $$\label{cond2} \forall i,j.\quad \Phi^{IV}_i\sigma \wedge \Phi^{IV}_j\sigma \Rightarrow i = j$$ $$\label{cond3} \Phi^{UV}_m \sigma \wedge \Phi^{UV}_m \{^{\hat v'}/_{\hat v} \} \sigma \Rightarrow \hat v\sigma \simeq \hat v'\sigma% \wedge |\hat y \sigma | = |\hat v \sigma|}$$ $$\label{cond5} \bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat{y})$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma \wedge \Phi^{UV}_m \sigma \wedge n = m \Rightarrow \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \simeq \hat v\sigma$$* #### Effectiveness. *There exists a context $C$, process $B$, substitution $\sigma$ and names $\tilde n$, such that $C[{\sf VP}_n^+(s_1,\dots,\allowbreak s_n% ,\allowbreak id_1,\dots,\allowbreak id_n )]\allowbreak \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B)\equiv\nu\tilde n.\sigma$ and $$\label{cond7} \bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat{y})$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma \wedge \Phi^{UV}_n \sigma$$*
An individual voter should verify that the test $\Phi^{IV}$ holds when instantiated with her vote $s_i$, the information $\tilde r_i\sigma$ recorded during the execution of the protocol and some bulletin board entry $y\sigma$. Condition ([cond2]) ensures that the test $\Phi^{IV}$ will hold for at most one bulletin board entry. (Note that $\Phi^{IV}_i$ and $\Phi^{IV}_j$ are evaluated with the same ballot $y\sigma$ provided by $C[\_]$.) The fact that her ballot is counted will be ensured by $\Phi^{UV}_m$, which should also be tested by the voter. The voter or an observer will instantiate the test $\Phi^{UV}_m$ with the bulletin board entries $\hat y\sigma$ and the election outcome $\hat v\sigma$. Condition ([cond3]) ensures that $\Phi^{UV}_m$ holds only for a single outcome. Condition ([cond5]) ensures that if the bulletin board contains the ballots of voters who voted $s_1, \ldots ,s_n$, then $\Phi^{UV}_m$ holds only if the declared outcome is a permutation of these votes, where $\Phi^{UV}_m$ is instantiated with precisely the $n$ ballots cast by those voters (that is, there are no additional ballots in $\hat y\sigma$). The necessity for the precondition $n=m$ should make it clear that individual and universal verifiability cannot detect ballot stuffing. Finally, Condition ([cond7]) ensures that there exists an execution where the tests hold. In particular, this allows us to verify whether the protocol can satisfy the tests when executed as expected. This also forbids tests which always evaluate to false and would make Conditions ([cond2])-([cond5]) vacuously hold. ## Case study: FOO The FOO protocol, by Fujioka, Okamoto & Ohta (**FOO?**), is a seminal work based upon blind signatures. ### Protocol description An election is created by naming a registrar and a tallier. The protocol is divided into four phases: *setup*, *preparation*, *commitment* and *tallying*. The steps of the protocol (Figure 1) will now be detailed, starting with the setup phase.

 

 
  
  
 
  
FOO electronic voting protocol
1. The registrar creates a signing key pair $sk_R,\mathsf{pk}(sk_R)$ and publishes the public part $\mathsf{pk}(sk_R)$. Similarly, each voter is assumed to have a key pair $sk_V,\mathsf{pk}(sk_V)$. The preparation phase then proceeds as follows. 2. The voter computes the commitment to her vote $M = \mathsf{commit}(k,v)$ and sends the signed blind commitment $\mathsf{sign}(sk_V,\mathsf{blind}(k',M))$, paired with her public key, to the registrar. 3. The registrar checks that the signature belongs to an eligible voter and returns the blind commitment signed by the registrar $\mathsf{sign}(sk_R,\mathsf{blind}(k',M))$. 4. The voter verifies the registrar’s signature and unblinds the message to recover $M' = \mathsf{sign}(sk_R,M)$, that is, her commitment signed by the registrar. After some fixed deadline, the protocol enters the commitment phase. 5. The voter posts her ballot $M,M'$ to the bulletin board. Similarly, the last phase begins after some fixed deadline. 6. The tallier verifies all the bulletin board entries and appends an identifier $\ell$ to each valid entry. 7. The voter checks the bulletin board for her entry, the triple $\ell, M,M'$, and appends the commitment factor $k$. 8. Finally, using $k$, the tallier opens all of the ballots and announces the election outcome. The distinction between phases is essential to uphold the protocol’s security properties. In particular, voters must synchronise before the commitment phase to ensure privacy (observe that without synchronisation, traffic analysis may allow the voter’s signature to be linked with the commitment to her vote, which can then be linked to her vote) and before the tallying phase to avoid publishing partial results, that is, to ensure the *fairness* property of electronic voting. ### Equational theory Based upon (**KR05:vote-privacy?**; **DKR06?**; **DKR08?**; **DKR10?**), blind signatures and bit commitment are modelled by the following equations $$\begin{array}{rclcrcl} \mathsf{unblind}(x_{\mathsf{rand }},\mathsf{sign}(x_{\mathsf{sk }},\mathsf{blind}(x_{\mathsf{rand }},x_{\mathsf{msg }}))) &=& \mathsf{sign}(x_{\mathsf{sk }},x_{\mathsf{msg }}) \\ \mathsf{unblind}(x_{\mathsf{rand }},\mathsf{blind}(x_{\mathsf{rand }},x_{\mathsf{plain }})) &=& x_{\mathsf{plain }}\\ \mathsf{open}(x_{\mathsf{rand }},\mathsf{commit}(x_{\mathsf{rand }},x_{\mathsf{plain }})) &=& x_{\mathsf{plain }}\\ \mathsf{checksign}(\mathsf{pk}(x_{\mathsf{sk }}),\mathsf{sign}(x_{\mathsf{sk }},x_{\mathsf{msg }})) &=& \mathsf{true}\\ \mathsf{getmsg}(\mathsf{sign}(x_{\mathsf{sk }},x_{\mathsf{msg }})) &=& x_{\mathsf{msg }} \end{array}$$ where $\mathsf{true}$ is a constant. ### Model in applied pi For verifiability, the voter must be able to generate a fresh nonce $\mathit{k}$ (which should subsequently be used by the untrusted voting terminal to compute the commitment to her vote); all other operations – such as computing the commitment, blinding and signing – can be performed by an untrusted voting terminal. Accordingly, the trusted components are modelled as follows.
**Definition 2**. *The voting process specification $\langle V_{\sf foo},A_{\sf foo}\rangle$ is defined as $V_{\sf foo} \mathrel{\hat =} \nu \mathit{k}. \overline{c}\langle v\rangle. \overline{c}\langle\mathit{k}\rangle$ and $A_{\sf foo}[\_] \mathrel{\hat =} \_ .$*
We do not assert that the voting terminal uses blind signatures (although this is crucial for privacy properties, it does not contribute to verifiability); accordingly, blinding operations do not appear in our specification and, moreover, no trust assumptions are made about whether blinding is used. Similarly, the voter’s signature on the blinded committed vote and the confidentiality of signing keys are not required for individual and universal verifiability; they are, however, essential for eligibility. ### Analysis: Individual and universal verifiability Given integer $m\in\mathbb{N}$ let tests $\Phi^{IV}$ and $\Phi^{UV}_m$ be defined as follows: $$\begin{array}{lcl} \Phi^{IV}&\mathrel{\hat=}& y =_E \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{r,\mathsf{commit}(r,v)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \\ \Phi^{UV}_m &\mathrel{\hat=}& \hat v =_E \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{open}(\pi_{1}(\pi_{1}(\hat y)),\pi_{2}(\pi_{1}(\hat y))),\dots, \mathsf{open}(\pi_{1}(\pi_{m}(\hat y)),\pi_{2}(\pi_{m}(\hat y)))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}%\\ %&& \textcolor{blue}{\mathrel{\wedge} \mathsf{snd}^m(\hat y) =_\EE \Emptytuple} \end{array}$$ Intuitively, a bulletin board entry should be a pair formed from the voter’s nonce and the associated commitment to her vote. The identifier $\ell$ and the registrar’s signature are not required for the purpose of verifiability, so these details are omitted.
**Theorem 1**. *$\langle V_{\sf foo},A_{\sf foo}\rangle$ satisfies individual and universal verifiability.*
*Proof.* Suppose $m\in\mathbb{N}$ and tests $\Phi^{IV},\Phi^{UV}_m$ are given above. We will now show that the conditions of Definition 1 are satisfied. 1. For all names $s_1,\dots,s_n$ suppose $C$ is a context, $B$ is a process, $\sigma$ is a substitution, $\tilde{n}$ is a tuple of names and $i$, $j$ are integers such that $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)] \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B) \equiv \nu \tilde n.\sigma$, $\Phi^{IV}\{\textnormal{\raisebox{2pt}{\footnotesize $s_i$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $v$}},\textnormal{\raisebox{2pt}{\footnotesize $r_i$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $r$}}\}\sigma$ and $\Phi^{IV}\{\textnormal{\raisebox{2pt}{\footnotesize $s_j$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $v$}},\textnormal{\raisebox{2pt}{\footnotesize $r_j$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $r$}}\}\sigma$, where $r = \textnormal{rv}(\Phi^{IV})$. It follows that $\pi_{1}(y)\sigma =_Er_i\sigma =_Er_j\sigma$. Since the record variables $r_i$ and $r_j$ are handles for fresh nonces generated by name restriction in processes $V_{{\sf foo},i}$ and $V_{{\sf foo},j}$, it follows that $i=j$. 2. We prove a stronger result: namely, the condition holds for all substitutions $\sigma$. Suppose $\sigma$ is an arbitrary substitution such that $\Phi^{UV}_m \sigma$ and $\Phi^{UV}_m \{^{\hat v'}/_{\hat v} \} \sigma$ hold. We have $$\hat v \sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{open}(\pi_{1}(\pi_{1}(\hat y)),\pi_{2}(\pi_{1}(\hat y))),\dots,\mathsf{open}(\pi_{1}(\pi_{m}(\hat y)),\pi_{2}(\pi_{m}(\hat y)))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma =_E\hat v' \sigma$$ and immediately derive $\hat v\sigma \simeq \hat v'\sigma$. 3. Again, we will show that the condition holds for all substitutions $\sigma$. Suppose $\sigma$ is an arbitrary substitution such that $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat{y})$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma$ and $\Phi^{UV}_m \sigma$ hold, where $n = m$. By $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat{y})$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma$ it must be the case for all $1\leq i \leq n$ that $$\pi_{i}(\hat y)\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{r_i,\mathsf{commit}(r_i,s_i)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$$ and hence $\mathsf{open}(\pi_{1}(\pi_{i}(\hat y)),\pi_{2}(\pi_{i}(\hat y)))\sigma =_Es_i$. Moreover, since $n = m$ and $\Phi^{UV}_m \sigma$ we have $$\begin{array}{lcl} \hat v\sigma &=_E& \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{open}(\pi_{1}(\pi_{1}(\hat y)),\pi_{2}(\pi_{1}(\hat y))),\dots,\mathsf{open}(\pi_{1}(\pi_{m}(\hat y)),\pi_{2}(\pi_{m}(\hat y)))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \\ &=_E& \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \end{array}$$ The result $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \simeq \hat v\sigma$ follows. 4. Suppose $s_1,\dots,s_n$ are names and consider the following context: $$\begin{array}{lcl} C_{\sf foo} &=& c(x_{\mathsf{vote} }{}_{,1}).c(x_{\mathsf{rand }}{}_{,1}).\textnormal{let } y_1=\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_{\mathsf{rand }}{}_{,1},\mathsf{commit}(x_{\mathsf{rand }}{}_{,1},x_{\mathsf{vote} }{}_{,1})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \textnormal{ in }\\ &&\vdots\\ &&c(x_{\mathsf{vote} }{}_{,n}).c(x_{\mathsf{rand }}{}_{,n}).\textnormal{let } y_n=\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_{\mathsf{rand }}{}_{,n},\mathsf{commit}(x_{\mathsf{rand }}{}_{,n},x_{\mathsf{vote} }{}_{,n})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \textnormal{ in }\\ &&\overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{y_1,\dots,y_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.\\ &&\overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{open}(\pi_{1}(y_1),\pi_{2}(y_1)),\dots,\mathsf{open}(\pi_{1}(y_n),\pi_{2}(y_n))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle \mid \_ \end{array}$$ We have $C[{\sf VP}_n^+(s_1,\dots,s_n)] \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$ such that $$\begin{gathered} B = \nu\,k_1,\dots,k_n.(\overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{k_1,\mathsf{commit}(k_1,s_1)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\dots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{k_n,\mathsf{commit}(k_n,s_n)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.\\ \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle \mid \{ \textnormal{\raisebox{2pt}{\footnotesize $k_1$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $r_1$}},\dots,\textnormal{\raisebox{2pt}{\footnotesize $k_n$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $r_n$}}\}) \end{gathered}$$ Moreover, $B \mathrel{\xrightarrow{\nu\,\hat{y}.\overline{c}\langle\hat{y}\rangle}\xrightarrow{\nu\,\hat{v}.\overline{c}\langle\hat{v}\rangle}} \nu\,k_1,\dots,k_n.\sigma$ such that $$\sigma = \{\textnormal{\raisebox{2pt}{\footnotesize $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{k_1,\mathsf{commit}(k_1,s_1)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\dots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{k_n,\mathsf{commit}(k_n,s_n)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\hat y$}},\textnormal{\raisebox{2pt}{\footnotesize $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\hat v$}},\textnormal{\raisebox{2pt}{\footnotesize $k_1$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $r_1$}},\dots,\textnormal{\raisebox{2pt}{\footnotesize $k_n$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $r_n$}}\}$$ It can trivially be seen that $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat{y})$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma \wedge \Phi^{UV}_n \sigma$.  ◻
## Case study: Helios 2.0 Helios 2.0 (**AdidaPereiraMarneffeQuisquater?**) is an open-source web-based election system, based upon homomorphic tallying of encrypted votes (**ElGamal85?**; **Pedersen92?**; **Schoenmakers94:Proof-of-ciphertext?**; **CramerGennaroSchoenmakers97:AdditiveElGamal?**; **Schoenmakers09:Chapter-on-Voting-Schemes?**). It allows the secret election key to be distributed amongst several trustees, and supports distributed decryption of the election result. It also allows independent verification by voters and observers. Helios 2.0 has been successfully used by the International Association of Cryptologic Research to elect its board members (**IACRHelios10b?**), following a successful trial in a non-binding poll (**IACRHelios10?**). Helios has also been used by the Catholic University of Louvain, in an election that had 25,000 eligible voters, to elect the University president, and by Princeton University to elect the student vice president (**HeliosPrinceton10?**). ### Protocol description An election is created by naming an election officer, selecting a set of trustees and running a protocol that provides each trustee with a share of the secret part of a public key pair. The election officer publishes the public part of the trustees’ key and the candidate list $\tilde{t} = (t_1,\dots,t_l)$ on the bulletin board. The steps that participants take during a run of Helios are as follows. (See (**Smyth10:Helios?**; **Smyth11:Helios?**) for a formal cryptographic description.) 1. To cast a vote, the voter runs a browser script that inputs her vote $s\in\tilde {t}$ and creates a ballot consisting of her vote encrypted by the trustees’ public key and a proof that the ballot represents an allowed vote (this is needed because the ballots are never decrypted individually; in particular, it prevents multiple votes being encoded as a single ballot). 2. The voter can audit the ballot to check if it really represents a vote for her chosen candidate; if she decides to do this, then the script provides her with the random data used in the ballot creation. She can then independently reconstruct her ballot and verify that it was indeed well-formed, but the ballot is now invalid. (Invalidating audited ballots provides some protection against vote selling.) 3. When the voter has decided to cast her ballot, she submits it to the election officer. The election officer authenticates the voter and checks that she is eligible to vote. The election officer also verifies the proof, and publishes the ballot on the bulletin board. 4. Individual voters can check that their ballots appear on the bulletin board and, by verifying the proof, observers are assured that ballots represent permitted votes. 5. After some predefined deadline, the election officer homomorphically combines the ballots and publishes the encrypted tally on the bulletin board. Anyone can check that tallying is performed correctly. 6. Each of the trustees publishes a partial decryption of the encrypted tally, together with a proof of correct construction. Anyone can verify these proofs. 7. The election officer decrypts the tally and publishes the result. Anyone can check this decryption. ### Equational theory We use a signature in which $\mathsf{penc}(x_{\mathsf{pk }},x_{\mathsf{rand }},x_{\mathsf{plain }})$ denotes the encryption of plaintext $x_{\mathsf{plain }}$ using random $x_{\mathsf{rand }}$ and key $x_{\mathsf{pk }}$, and $x_{\mathsf{ciph }}*y_{\mathsf{ciph }}$ denotes the homomorphic combination of ciphertexts $x_{\mathsf{ciph }}$ and $y_{\mathsf{ciph }}$ (the corresponding operation on plaintexts is written $+$ and on randoms $\circ$). The term $\mathsf{ballotPf}(x_{\mathsf{pk }},x_{\mathsf{rand }},s,x_{\mathsf{ballot }})$ represents a proof that the ballot $x_{\mathsf{ballot }}$ is a ciphertext on some plaintext name $s$, random $x_{\mathsf{rand }}$ and key $x_{\mathsf{pk }}$; ${\mathsf{partial}}(x_{\mathsf{sk }},x_{\mathsf{ciph }})$ is a partial decryption of $x_{\mathsf{ciph }}$ when $x_{\mathsf{ciph }}$ is a ciphertext encrypted using the public key $\mathsf{pk}(x_{\mathsf{sk }})$; and ${\mathsf{partialPf}}(x_{\mathsf{sk }},x_{\mathsf{ciph }},x_{\mathsf{partial }})$ is a proof that $x_{\mathsf{partial }}$ is a partial decryption of $x_{\mathsf{ciph }}$ when $x_{\mathsf{ciph }}$ is a ciphertext encrypted using public key $\mathsf{pk}(x_{\mathsf{sk }})$. We use the equational theory that asserts that $+,*,\circ$ are commutative and associative, and includes the equations:
xx̄x̄ $\mathsf{dec}(x_{\mathsf{sk }},\mathsf{penc}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }},x_{\mathsf{plain }})) = x_{\mathsf{plain }}$ $\mathsf{dec}({\mathsf{partial}}(x_{\mathsf{sk }},ciph),ciph) = x_{\mathsf{plain }}$ where $ciph=\mathsf{penc}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }},x_{\mathsf{plain }})$ $\mathsf{penc}(x_{\mathsf{pk }},y_{\mathsf{rand }},y_{\mathsf{plain }})*\mathsf{penc}(x_{\mathsf{pk }},z_{\mathsf{rand }},z_{\mathsf{plain }}) = \mathsf{penc}(x_{\mathsf{pk }},y_{\mathsf{rand }}\circ z_{\mathsf{rand }},y_{\mathsf{plain }}+z_{\mathsf{plain }})$ $\mathsf{checkBallotPf}(x_{\mathsf{pk }},ballot,\mathsf{ballotPf}(x_{\mathsf{pk }},x_{\mathsf{rand }},s,ballot)) = \mathsf{true}$ where $ballot=\mathsf{penc}(x_{\mathsf{pk }},x_{\mathsf{rand }},s)$ ${\mathsf{checkPartialPf}}(\mathsf{pk}(x_{\mathsf{sk }}),ciph,partial,{\mathsf{partialPf}}(x_{\mathsf{sk }},ciph,partial)) = \mathsf{true}$ where $ciph=\mathsf{penc}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }},x_{\mathsf{plain }})\text{ and }partial={\mathsf{partial}}(x_{\mathsf{sk }},ciph)$
Note that in the equation for $\mathsf{checkBallotPf}$, $s$ is a name and not a variable. As the equational theory is closed under bijective renaming of names, this equation holds for any name, but fails if one replaces the name by a term, for example, $s + s$. We assume that all names are possible votes but give the possibility to check that a voter does not include a term $s + s$ which would add a vote to the outcome. ### Model in applied pi The browser script is not verifiable; accordingly, the voter most trust: - Ballot construction; that is, the script generates a pair consisting of the voter’s encrypted vote and a proof that the ballot represents an allowed vote. Although the voter cannot be assured that the script behaves correctly, trust is motivated because the voter can audit ballot construction. Accordingly, the browser script is modelled as part of the trusted context $A_{\sf helios}$ in the voting process specification $\langle V_{\sf helios},A_{\sf helios}\rangle$. The voter $V_{\sf helios}$ receives a channel name $y$ on a private channel; this is a technical aspect of our formalisation which allows the voter to privately communicate with her browser script. She sends her vote on this channel to $A_{\sf helios}$, which creates the ballot for her. The voter is sent the constructed ballot $x_{\mathsf{ballot }}$ and forwards it to the bulletin board. We assume that the voter’s inputs $y$ and $x_{\mathsf{ballot }}$ are stored in record variables $r_y$ and $r_{ballot}$. $A_{\sf helios}$ represents the parts of the system that are required to be trusted; it publishes the election key, and includes the ballot creation script $B$ which receives a voter’s vote, generates a random $m$ and returns the ballot (that is, the encrypted vote and a proof) to the voter.
**Definition 3**. *The voting process specification $\langle V_{\sf helios},A_{\sf helios}\rangle$ is defined where $$\begin{array}{r@{\;}c@{\;}l} V_{\sf helios} &\hat=& d(y).\overline{y}\langle v\rangle. y(x_{\mathsf{ballot }}).\overline{c}\langle x_{\mathsf{ballot }}\rangle\\ A_{\sf helios}[\_] &\hat=& \nu d.\big(\, (! \nu d'.\overline{d}\langle d'\rangle.B) \mid \{\textnormal{\raisebox{2pt}{\footnotesize $\mathsf{pk}(sk)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{pk }}$}}\}\mid \_\ \big) \\ B &\hat=& d'(x_{\mathsf{vote} }).\nu m. \overline{d'}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{penc}(x_{\mathsf{pk }},m,x_{\mathsf{vote} }),\mathsf{ballotPf}(x_{\mathsf{pk }},m,x_{\mathsf{vote} },\mathsf{penc}(x_{\mathsf{pk }},m,x_{\mathsf{vote} }))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle \end{array}$$*
At the end of the election the bulletin board is represented by a frame. The frame is expected to define the trustees’ public key as $x_{pk}$ and the ballots as $\hat y$. It also contains the homomorphic tally $z_{\mathsf{tally} }$ of the encrypted ballots, and the partial decryption $z_{\mathsf{partial} }$, together a proof of correctness $z_{\mathsf{partialPf}}$, obtained from the trustees. When the protocol is honestly executed by $n$ voters, the resulting frame should have a substitution $\sigma$ such that for all $1 \leq i \leq n$ we have $$\begin{array}{lcl} x_{pk} \sigma&=& \mathsf{pk}(sk) \\ \pi_{i}(\hat y) \sigma &=& \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\mathsf{penc}(\mathsf{pk}(sk),m_i,s_i), \mathsf{ballotPf}(\mathsf{pk}(sk),m_i,s_i,\mathsf{penc}(\mathsf{pk}(sk),m_i,s_i))\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\\ z_{\mathsf{partial} }\sigma&=& {\mathsf{partial}}(sk,z_{\mathsf{tally} })\sigma \\ z_{\mathsf{partialPf}}\sigma&=& {\mathsf{partialPf}}(sk,z_{\mathsf{tally} },z_{\mathsf{partial} })\sigma \\ z_{\mathsf{tally} }\sigma&=& \pi_{1}(\pi_{1}(\hat y\sigma))*\dots*\pi_{1}(\pi_{n}(\hat y\sigma)) \end{array}$$ ### Analysis: Individual and universal verifiability Given $m\in\mathbb{N}$, the tests $\Phi^{IV}$ and $\Phi^{UV}_m$, defined below, are introduced for verifiability purposes. $$\begin{array}{r@{\;}c@{\;}l} \Phi^{IV}&\widehat=& y =_Er_{ballot} \\ \Phi^{UV}_m &\widehat=& z_{\mathsf{tally} }=_E\pi_{1}(\pi_{1}(\hat y))*\dots*\pi_{1}(\pi_{m}(\hat y))\\ && \mathrel{\land} \bigwedge_{i=1}^{m}(\mathsf{checkBallotPf}(x_{\mathsf{pk }},\pi_{1}( \pi_{i}(\hat y)),\pi_{2}(\pi_{i}(\hat y))) =_E\mathsf{true})\\ && \mathrel{\land} {\mathsf{checkPartialPf}}(x_{\mathsf{pk }},z_{\mathsf{tally} },z_{\mathsf{partial} },z_{\mathsf{partialPf}}) =_E\mathsf{true}\\ && \mathrel{\land} \pi_{1}(\hat v)+\dots+\pi_{m}(\hat v) =_E\mathsf{dec}(z_{\mathsf{partial} },z_{\mathsf{tally} }) \\ && \mathrel{\land} %\mathsf{snd}^m(\hat y) =_\EE \Emptytuple \land \mathsf{snd}^m(\hat v) =_E\varnothing \end{array}$$ The test $\Phi^{IV}$ checks that the voter’s ballot is recorded on the bulletin board and $\Phi^{UV}_m$ checks that the tally is correctly computed.
**Theorem 2**. *$\langle V_{\sf helios},A_{\sf helios} \rangle$ satisfies individual and universal verifiability.*
*Proof.* Suppose $m\in\mathbb{N}$ and tests $\Phi^{IV},\Phi^{UV}_m$ are given above. We show for all names $s_1,\dots,s_n$ that Conditions ([cond2])–([cond7]) of Definition 1 hold. - Suppose $C$, $B$, $\sigma$, $\tilde{n}$, $i$ and $j$ are such that $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)]\allowbreak (\to^* \xrightarrow{\alpha} \to^*)^* B$, $\varphi(B) \equiv \nu \tilde n.\sigma$, $\Phi^{IV}_i\sigma$ and $\Phi^{IV}_j\sigma$. It follows that $\pi_{i}(\hat y)\sigma =_Er_{ballot,i}\sigma$ and similarly $\pi_{j}(\hat y)\sigma =_Er_{ballot,j}\sigma$. But since record variables $r_{ballot,i}\sigma$ and $r_{ballot,j}\sigma$ contain distinct fresh nonces $m_i$ and $m_j$ created by name restriction in the ballot creation script $B$, it follows that $i=j$. - We prove a stronger result: namely, the condition holds for all substitutions $\sigma$. Suppose $\sigma$ is an arbitrary substitution such that $\Phi^{UV}_m\sigma$ and $\Phi^{UV}_m\{^{\hat v'}/_{\hat v} \}\sigma$ hold. Since $\allowbreak\bigwedge_{i=1}^{m}\allowbreak\mathsf{checkBallotPf}(x_{\mathsf{pk }},\pi_{1}( \pi_{i}(\hat y)),\pi_{2}(\pi_{i}(\hat y))\sigma =_E\mathsf{true}$, by inspection of the equational theory it must be the case that $$\pi_{1}(\pi_{i}(\hat y))\sigma =_E\mathsf{penc}(M_{\mathsf{pk},i},M_{\mathsf{rand},i},s_i)$$ for some ground terms $M_{\mathsf{pk},i}$, $M_{\mathsf{rand},i}$ and name $s_i$, where $1\leq i \leq m$. It follows that $z_{\mathsf{tally} }\sigma =_E\mathsf{penc}(M_{\mathsf{pk},1},M_{\mathsf{rand},1},s_1) * \dots * \mathsf{penc}(M_{\mathsf{pk},m},M_{\mathsf{rand},m},s_{m})$. Moreover, we have ${\mathsf{checkPartialPf}}(x_{\mathsf{pk }},z_{\mathsf{tally} },z_{\mathsf{partial} },z_{\mathsf{partialPf}})\sigma =_E\mathsf{true}$, hence $$z_{\mathsf{tally} }\sigma =_E\mathsf{penc}(\mathsf{pk}(M_{\mathsf{sk}}),M_{\mathsf{rand},1} \circ \dots \circ M_{\mathsf{rand},m},s_1 + \dots + s_{m})$$ where $\mathsf{pk}(M_{\mathsf{sk}}) =_EM_{\mathsf{pk},1} =_E\dots =_EM_{\mathsf{pk},m}$ for some term $M_{\mathsf{sk}}$. It also follows that $$z_{\mathsf{partial} }\sigma =_E{\mathsf{partial}}(M_{\mathsf{sk}},z_{\mathsf{tally} })\sigma$$ We have $\mathsf{dec}(z_{\mathsf{partial} },z_{\mathsf{tally} })\sigma =_E\pi_{1}(\hat v)+\dots+\pi_{m}(\hat v)\sigma=_E\pi_{1}(\hat v')+\dots+\pi_{m}(\hat v')\sigma =_Es_1 + \dots + s_{m}$ and since $\mathsf{snd}^m(\hat v)\sigma =_E\mathsf{snd}^m(\hat v')\sigma =_E\varnothing$, it must be the case that $$\hat v\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\hat v),\dots,\pi_{m}(\hat v)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \simeq \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_{m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \simeq \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\hat v'),\dots,\pi_{m}(\hat v')}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma =_E\hat v'\sigma$$ It follows immediately that $\hat v\sigma \simeq \hat v'\sigma$. - Again, we will show that the condition holds for all substitutions. Suppose $\sigma$ is an arbitrary substitution such that $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $y_{i}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma$ and $\Phi^{UV}_m\sigma$ hold, where $n = m$. By $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat{y})$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma$ it must be the case for all $1\leq i \leq n$ that $$\pi_{i}(\hat y) =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{penc}(\mathsf{pk}(sk),m_i,s_i), \mathsf{ballotPf}(\mathsf{pk}(sk),m_i,s_i,\mathsf{penc}(\mathsf{pk}(sk),m_i,s_i))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$$ Since $n = m$ and $\Phi^{UV}_m\sigma$ holds, we have $$z_{\mathsf{tally} }\sigma =_E\pi_{1}(\pi_{1}(\hat y))*\dots*\pi_{1}(\pi_{m}(\hat y)) =_E\mathsf{penc}(\mathsf{pk}(sk),m_1 \circ \dots \circ m_n,s_1 + \dots + s_n)$$ Moreover, ${\mathsf{checkPartialPf}}(x_{\mathsf{pk }},z_{\mathsf{tally} },z_{\mathsf{partial} },z_{\mathsf{partialPf}})\sigma =_E\mathsf{true}$ and hence $$z_{\mathsf{partial} }\sigma =_E{\mathsf{partial}}(\mathsf{pk}(sk),z_{\mathsf{tally} })\sigma$$ It follows that $\mathsf{dec}(z_{\mathsf{partial} },z_{\mathsf{tally} })\sigma =_Es_1 + \dots + s_{m}$. By $\Phi^{UV}_m\sigma$ we also have $\mathsf{dec}(z_{\mathsf{partial} },z_{\mathsf{tally} })\sigma \allowbreak=_E \pi_{1}(\hat v)+\dots+\pi_{m}(\hat v)\sigma$ and $\mathsf{snd}^m(\hat v)\sigma =_E\varnothing$. As before, we conclude $\hat v\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\pi_{1}(\hat v),\dots,\allowbreak\pi_{m}(\hat v)\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \simeq \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_{m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$, hence $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_{m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \simeq \hat v\sigma$ - The context $C$ must marshal the election data onto the frame such that for all $1 \leq i \leq n$ we have $x_{pk} \sigma$, $\pi_{i}(\hat y) \sigma$, $z_{\mathsf{partial} }\sigma$, $z_{\mathsf{partialPf}}\sigma$ and $z_{\mathsf{tally} }\sigma$ as defined above. Moreover, it defines $\hat v\sigma = \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$. For brevity, we omit formally defining $C$.  ◻
Observe that Condition [cond3] cannot be proved where $\Phi^{UV}_m \mathrel{\widehat=} \pi_{1}(\hat v)+\dots+\pi_{m}(\hat v) =_E\mathsf{dec}(z_{\mathsf{partial} },z_{\mathsf{tally} })$ because, in general, given terms $M_1,\dots,M_k,N_1,\dots,N_k,U,V$ such that $M_1 + \dots + M_k =_E\mathsf{dec}(U,V) =_EM_1 + \dots + N_k$ it is not the case that $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{M_1,\dots,M_k}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \simeq \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{N_1,\dots,N_k}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$. # Security definition: Election verifiability To fully capture *election verifiability*, the tests $\Phi^{IV}$ and $\Phi^{UV}$ must be supplemented with a test $\Phi^{EV}$. We suppose that the public credentials of registered voters appear on the bulletin board and $\Phi^{EV}$ allows an observer to check that only these individuals (that is, those in possession of credentials) cast ballots, and at most one ballot is tallied per voter.
**Definition 1** (Election verifiability). *A voting specification $\langle V, A \rangle$ *satisfies election verifiability* if there exists a test $\Phi^{IV}$, where for all $m \in \mathbb{N}$ there exists tests $\Phi^{UV}_m,\Phi^{EV}_m$, such that $\textnormal{fn}(\Phi^{IV})=\textnormal{fn}(\Phi^{UV}_m)=\textnormal{fn}(\Phi^{EV}_m)= \textnormal{rv}(\Phi^{UV}_m)=\textnormal{rv}(\Phi^{EV}_m) =\emptyset$ and $\textnormal{rv}(\Phi^{IV}) \subseteq \textnormal{rv}(\mathsf{R}(V))$, and for all names $s_1,\dots,s_n$ the conditions below hold. Let $\tilde r=\textnormal{rv}(\Phi^{IV})$, $\Phi^{IV}_i = \Phi^{IV}\{^{s_i} /_v, \textnormal{\raisebox{2pt}{\footnotesize $\tilde r_{i}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde r$}}, \textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat w)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $w$}}\}$ and $X = \textnormal{fv}(\Phi^{EV}_m) \backslash \textnormal{dom}({\sf VP^+_n}(s_1, \dots, s_n))$.* #### Soundness. *For all contexts $C$, such that $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)]\allowbreak \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$ and $\varphi(B)\equiv\nu\tilde n.\sigma$ for some process $B$, substitution $\sigma$ and names $\tilde n$, we have Conditions ([cond2])–([cond5]) and Conditions ([evCond1]) – ([evCond2]) hold. $$\label{evCond1}%\label{cond4} \Phi^{EV}_m \sigma \wedge \Phi^{EV}_m \{^{x'} / _x \mid x\in X%\cup\tilde{w} \backslash\hat y\} \sigma \Rightarrow \hat w\sigma \simeq \hat w'\sigma$$ $$\label{evCond3n} \Phi^{EV}_m \sigma \wedge \Phi^{EV}_m \{^{x'} / _x \mid x\in X%\cup\tilde{y} \backslash\hat w \} \sigma \Rightarrow \hat y\sigma \simeq \hat y'\sigma \\$$ $$\label{evCond2}%\label{cond6} \bigwedge_{1 \leq i \leq n} \Phi^{IV}_i\{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\}\sigma \wedge \Phi^{EV}_n\{^{\hat w'}/_{\hat w} \} \sigma %\mathrel\wedge n = m \mathrel\wedge \mathsf{snd}^n(\hat w)\sigma =_E{\varnothing} %\wedge \mathsf{snd}^n(\hat y)\sigma =_\EE {\Endtuple} \mathrel\Rightarrow {\hat{w}\sigma \simeq \hat{w}' \sigma}$$* #### Effectiveness. *There exists a context $C$, process $B$, substitution $\sigma$ and names $\tilde n$ such that $C[{\sf VP^+_n}(s_1,\allowbreak\dots,\allowbreak s_n)]\allowbreak \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B)\equiv\nu\tilde n.\sigma$ and Condition ([evCond4]) holds. $$\label{evCond4}%\label{cond7b} \bigwedge_{1 \leq i \leq n} \Phi^{IV}_i\{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma \wedge \Phi^{UV}_m \sigma \wedge \Phi^{EV}_m \sigma$$*
An observer should verify that the test $\Phi^{EV}_m$ holds when instantiated with the public bulletin board, to ensure that ballots were cast by eligible voters. Given ballots $\hat y\sigma$ provided by the environment, Condition ([evCond1]) ensures that $\Phi^{EV}_m$ succeeds for only one tuple of public voter credentials. Similarly, given credentials $\hat w\sigma$, Condition ([evCond3n]) ensures that only one tuple of ballots $\hat y\sigma$ are accepted by $\Phi^{EV}_m$ (observe that for such a strong requirement to hold, we expect the voting specification’s frame to contain a public key to root trust). Condition ([evCond2]) ensures that if the bulletin board contains ballots cast by voters with public credentials $\hat w\sigma$, then $\Phi^{EV}_m$ holds only on a permutation of these credentials. Finally, the effectiveness condition is similar to Condition ([cond7]) of the previous section. #### Case studies: Raising hands, FOO and Helios 2.0. Neither FOO nor Helios use public voting credentials in a manner suitable for eligibility verifiability. In FOO, the administrator is responsible for ensuring eligibility, that is, checking the validity of the voter’s ballots; whereas in Helios, there are no public voting credentials. It follows immediately that Condition ([evCond3n]), in particular, cannot be satisfied. By comparison, the raising hands protocol (Example [ex:raising-hands-spec]) does define suitable public voting credentials and satisfies our definition.
**Proposition 1**. *The raising hands protocol $\langle A_{\sf ex},V_{\sf ex}\rangle$ satisfies election verifiability.*
The proof of this result appears in Appendix [app:ev:hands]. # Case study: JCJ-Civitas The protocol by Juels, Catalano & Jakobsson (**JCJ02?**; **JCJ05?**; **JCJ10?**) is based upon mixnets and was implemented by Clarkson, Chong & Myers (**CCM08?**; **CCM08b?**) as an open-source voting system called Civitas. ## Protocol description An election is created by naming a set of registrars and talliers. The protocol is divided into four phases: *setup*, *registration*, *voting* and *tallying*. We now detail the steps of the protocol, starting with the setup phase. 1. The registrars, respectively talliers, run a protocol which constructs a public key pair and distributes a share of the secret part amongst the registrars, respectively talliers. The public part $\mathsf{pk}(sk_R)$, respectively $\mathsf{pk}(sk_T)$, of the key is published. The registrars also construct a distributed signing key pair $ssk_R$, $\mathsf{pk}(ssk_R)$. The registration phase then proceeds as follows. 2. The registrars generate and distribute voter credentials. These consist of a private part $d$ and a public part $\mathsf{penc}(\mathsf{pk}(sk_R),m'',d)$, that is, the probabilistic encryption of $d$ under the registrars’ public key $\mathsf{pk}(sk_R)$. This is done in a distributed manner, so that no individual registrar learns the value of any private credential $d$. 3. The registrars publish the signed public voter credentials. 4. The registrars announce the candidate list $\tilde{t} = (t_1,\ldots,t_l)$. The protocol then enters the voting phase. 5. Each voter selects her vote $s\in\tilde{t}$ and computes two ciphertexts $M = \allowbreak \mathsf{penc}(\allowbreak\mathsf{pk}(sk_T),\allowbreak m,s)$ and $M' = \mathsf{penc}(\mathsf{pk}(sk_R),m',d)$, where $m,m'$ are nonces. $M$ contains her vote and $M'$ her credential. In addition, the voter constructs a non-interactive zero-knowledge proof of knowledge (or signature proof of knowledge) demonstrating the correct construction of her ciphertexts and the validity of her chosen candidate. (The proof provides protection against coercion resistance, by preventing forced abstention attacks via a *write in*, and binds the two ciphertexts for eligibility verifiability.) The voter derives her ballot as the triple, consisting of her ciphertexts and signature proof of knowledge, and posts it to the bulletin board. After some predefined deadline the tallying phase commences. 6. The talliers read the $n'$ ballots posted to the bulletin board by voters (that is, the triples consisting of the two ciphertexts and the signature proof of knowledge) and discards any entries for which the signature proof of knowledge does not hold. 7. Elimination of re-votes is performed on the ballots using pairwise *plaintext equality tests* (PET) on the ciphertexts containing private voter credentials. (A PET (**Jakobsson00?**) is a cryptographic predicate which allows a key holder to provide a proof that two ciphertexts contain the same plaintext.) Re-vote elimination is performed in a verifiable manner with respect to some publicly defined policy, for example, by the order of ballots on the bulletin board. 8. The talliers perform a verifiable re-encryption mix on the ciphertexts in the ballots (recall that the ballots include a vote ciphertext and a public credential ciphertext; the link between these ciphertexts is preserved by the mix.) The mix ensures that a voter cannot trace her vote, allowing the protocol to achieve coercion resistance. 9. The talliers perform a verifiable re-encryption mix on the list of public credentials published by the registrars. This mix anonymises public voter credentials, breaking any link with the voter for privacy purposes. 10. Ballots based upon invalid credentials are weeded using PETs between the mixed ciphertexts provided by voters and the mixed public credentials. (Using PETs the correctness of weeding is verifiable.) 11. Finally, the talliers perform a verifiable decryption and publish the result. ## Equational theory The protocol uses the homomorphic ElGamal encryption scheme. Accordingly, we adopt the signature and associated equational theory from the Helios case study. We model the signature proof of knowledge demonstrating correct construction of the voter’s ciphertexts, re-encryption and PETs by the equations $$\begin{array}{l} \mathsf{checkBallot}(\mathsf{ballotPf}(x_{\mathsf{pk }},x_{\mathsf{rand }},x_{\mathsf{plain }},x_{\mathsf{pk }}',x_{\mathsf{rand }}',x_{\mathsf{plain }}') ,\\\qquad \qquad\quad\ \mathsf{penc}(x_{\mathsf{pk }},x_{\mathsf{rand }},x_{\mathsf{plain }}),\mathsf{penc}(x_{\mathsf{pk }}',x_{\mathsf{rand }}',x_{\mathsf{plain }}')) = \mathsf{true}\\ \mathsf{renc}(y_{\mathsf{rand }},\mathsf{penc}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }},x_{\mathsf{plain }})) = \mathsf{penc}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }}\circ y_{\mathsf{rand }},x_{\mathsf{plain }})\\ \mathsf{pet}(\mathsf{petPf}(x_{\mathsf{sk }},ciph,ciph'),ciph,ciph') = \mathsf{true} \end{array}$$ where $ciph \mathrel{\hat=} \mathsf{penc}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }},x_{\mathsf{plain }})$ and $ciph' \mathrel{\hat=} \mathsf{penc}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }}',x_{\mathsf{plain }})$. In addition, we consider verifiable re-encryption mixnets, and introduce for each permutation $\chi$ on $\{1,\ldots,n\}$, where $n\in\mathbb{N}$, the equation: $$\begin{gathered} \mathsf{checkMix}( \mathsf{mixPf}(x_{\mathsf{ciph }}{}_{,1},\ldots,x_{\mathsf{ciph }}{}_{,n},ciph_{1},\ldots,ciph_{n},z_{\mathsf{rand }}{}_{,1},\ldots,z_{\mathsf{rand }}{}_{,n}) ,\\ x_{\mathsf{ciph }}{}_{,1},\ldots,x_{\mathsf{ciph }}{}_{,n},ciph_{1},\ldots,ciph_{n}) = \mathsf{true} \end{gathered}$$ where $ciph_{i} \mathrel{\hat=} \mathsf{renc}(z_{\mathsf{rand }}{}_{,i},x_{\mathsf{ciph }}{}_{,\chi(i)})$. We also define re-encryption of pairs of ciphertexts, and introduce for each permutation $\chi$ on $\{1,\dots,n\}$,= where $n\in\mathbb{N}$, the equation: $$\begin{gathered} \mathsf{checkMixPair}( \mathsf{mixPairPf}(\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_1,x'_1}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_n,x'_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\allowbreak\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c_1,c'_1}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c_n,c'_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\\\allowbreak \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_1,z'_1}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\allowbreak\ldots,\allowbreak\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_n,z'_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}) ,\allowbreak\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_1,x'_1}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_n,x'_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\allowbreak\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c_1,c'_1}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c_n,c'_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}) = \mathsf{true} \end{gathered}$$ where $c_{i} \mathrel{\hat=} \mathsf{renc}(z_{i},x_{\chi(i)})$ and $c'_{i} \mathrel{\hat=} \mathsf{renc}(z'_{i},x'_{\chi(i)})$. ## Model in applied pi We make the following trust assumptions for verifiability: - The voter is able to construct her ballot; that is, she is able to generate nonces $m,m'$, construct her ciphertexts and generate a signature proof of knowledge. - The registrars construct distinct credentials $d$ for each voter and construct the voter’s public credential correctly. (The latter assumption can be dropped if the registrars provides a designated verified proof that the public credential is correctly formed (**JCJ02?**; **JCJ05?**; **JCJ10?**).) The registrars keep the private part of the signing key secret. Although neither voters nor observers can verify that the registrars adhere to such expectations, they trust them because trust is distributed. The trusted components are modelled by the voting process specification $\langle A_{\sf jcj}, V_{\sf jcj} \rangle$ (Definition 1). The context $A_{\sf jcj}$ distributes private keys on a private channel, launches an unbounded number of registrar processes, and publishes the public keys of both the registrars and talliers. The registrar $R$ constructs a fresh private credential $d$ and sends the private credential along with the signed public part (that is, $\mathsf{sign}(ssk_R,\mathsf{penc}(x_{pk_R},m'',d))$) to the voter; the registrar also publishes the signed public credential on the bulletin board. The voter $V_{\sf jcj}$ receives the private and public credentials from the registrar and constructs her ballot; that is, the pair of ciphertexts and a signature proof of knowledge demonstrating their correct construction.
**Definition 1**. *The voting process specification $A_{\sf jcj},V_{\sf jcj}$ is defined where: $$\begin{array}{rcl} A_{\sf jcj} &\mathrel{\hat=}& \nu\,a,ssk_R.({!R} \mid \{\textnormal{\raisebox{2pt}{\footnotesize $\mathsf{pk}(sk_R)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{pk_R}}$}},\textnormal{\raisebox{2pt}{\footnotesize $\mathsf{pk}(ssk_R)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{spk_R}$}},\textnormal{\raisebox{2pt}{\footnotesize $\mathsf{pk}(sk_T)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{pk_T}}$}}\} \mid \_)\\ V_{\sf jcj} &\mathrel{\hat=}& \nu\,m,m'.a(x_{cred}).\textnormal{let } ciph=\mathsf{penc}(x_{pk_T},m,v) \textnormal{ in }\\ &&\textnormal{let } ciph'=\mathsf{penc}(x_{pk_R},m',\pi_{1}(x_{cred})) \textnormal{ in }\\ &&\textnormal{let } spk=\mathsf{ballotPf}(x_{pk_T},m,v,x_{pk_R},m',\pi_{1}(x_{cred})) \textnormal{ in }\\ &&\overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{ciph,ciph',spk}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle\\ R &\mathrel{\hat=}& \nu\,d,m''.\, % &&\Letin{cred}{\Penc{x_{pk_R}}{\rr''}{d}}\\ \textnormal{let } sig=\mathsf{sign}(ssk_R,\mathsf{penc}(x_{pk_R},m'',d)) \textnormal{ in } \overline{a}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{d,sig}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.\overline{c}\langle sig\rangle \end{array}$$*
At the end of the election, the bulletin board is represented by a frame. In our formalism, we expect the frame to contain the substitution $\sigma$ which defines the voters’ public credentials as $\hat w$, the registrars’ public keys as $x_{pk_R}$ and $x_{spk_R}$, and talliers’ public key as $x_{pk_T}$. A tuple $\hat y$ containing triples representing each voter’s ciphertexts and signature proofs of knowledge. The mixed re-encryptions of the voter’s ciphertexts $z_{\mathsf{bal},1},\dots,z_{\mathsf{bal},n}$, along with a proof ${z_{\mathsf{mixPairPf}}}$ that the mix was performed correct. For verifiable decryption, we assume $z_{\mathsf{partial},i}$ is defined as a partial decryption associated with the proof $z_{\mathsf{partialPf},i}$. For the purposes of eligibility verifiability, we also expect the mixed re-encryptions of the voter’s public credentials $z_{\mathsf{cred},1}, \dots, z_{\mathsf{cred},1}$, along with a proof of correctness ${z_{\mathsf{mixPf}}}$. For convenience, a reordering ${\bar{z}}_{\mathsf{cred},1},\dots,{\bar{z}}_{\mathsf{cred},n}$ of these re-encryptions is also computed. Finally, we expect PET proofs $z_{\mathsf{petPf},1},\dots,z_{\mathsf{petPf},n}$ for the re-encryptions of the ciphertext constructed by the voter on her private credential (that is, the output of the verifiable mix in Step [jcj:mixBallot] of the protocol) and the re-encryptions of the voter’s public credential constructed by the registrars (that is, the output of the mix in Step [jcj:mixCred]), such that the PET holds, that is, the pair of ciphertexts contain the same private credential. Accordingly, given $n$ voters we expect $\sigma$ to be such that for all $1 \leq i \leq n$ we have: $$\begin{array}{lcl} % r_{cred,i}\sigma &=& \tuple{d_i,c''_i}\\ \pi_{i}(\hat w)\sigma &=& \mathsf{sign}(ssk_R,c''_i)\\ x_{pk_R}\sigma &=& \mathsf{pk}(sk_R)\\ x_{spk_R}\sigma &=& \mathsf{pk}(ssk_R)\\ x_{pk_T}\sigma &=& \mathsf{pk}(sk_T)\\ \pi_{i}(\hat y)\sigma &=& \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}c_i, c'_i, \mathsf{ballotPf}(\mathsf{pk}(sk_T),m_i,s_i,\mathsf{pk}(sk_R),m'_i,d_i) \mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\\ z_{\mathsf{bal},i}\sigma&=& \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{renc}(\bar{m}_{i},c_{\chi(i)}),\mathsf{renc}(\bar{m}'_{i},c'_{\chi(i)})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\\ {z_{\mathsf{mixPairPf}}}\sigma&=& \mathsf{pfMixPair}( \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c_1,c'_1}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c_n,c'_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{renc}(\bar{m}_1,c_{\chi(1)}),\mathsf{renc}(\bar{m}'_1,c'_{\chi(1)})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\\ && \; \ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{renc}(\bar{m}_n,c_{\chi(n)}),\mathsf{renc}(\bar{m}'_n,c'_{\chi(n)})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\bar{m}_1,\bar{m}'_1}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\dots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\bar{m}_n,\bar{m}'_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$})\\ z_{\mathsf{partial},i}\sigma&=&{\mathsf{partial}}(sk_T,\mathsf{renc}(\bar{m}_{i},c_{\chi(i)}))\\ z_{\mathsf{partialPf},i}\sigma&=& {\mathsf{partialPf}}(sk_T,\mathsf{renc}(\bar{m}_{i},c_{\chi(i)}),{\mathsf{partial}}(sk_T,\mathsf{renc}(\bar{m}_{i},c_{\chi(i)})))\\ z_{\mathsf{cred},i}\sigma &=& \mathsf{renc}(\bar{m}''_i,c''_{\chi'(i)})\\ {\bar{z}}_{\mathsf{cred},i}\sigma &=& \mathsf{renc}(\bar{m}''_{\chi(\chi'^{-1}(i))},c''_{\chi(i)})\\ {z_{\mathsf{mixPf}}}\sigma &=& \mathsf{pfMix}(c''_1,\ldots,c''_n,\mathsf{renc}(\bar{m}''_1,c''_{\chi'(1)}),\ldots,\mathsf{renc}(\bar{m}''_n,c''_{\chi'(n)}), \bar{m}''_1,\ldots,\bar{m}''_n) \\ z_{\mathsf{petPf},i}\sigma &=& \mathsf{petPf}(sk_R,\mathsf{renc}(\bar{m}'_{i},c'_{\chi(i)}),\mathsf{renc}(\bar{m}''_{\chi(\chi'^{-1}(i))},c''_{\chi(i)})) \end{array}$$ where $c_i \mathrel{\hat=} \mathsf{penc}(\mathsf{pk}(sk_T),m,s_i)$, $c'_i \mathrel{\hat=} \mathsf{penc}(\mathsf{pk}(sk_R),\allowbreak m',\allowbreak d_i)$, $c''_i \mathrel{\hat=} \mathsf{penc}(\mathsf{pk}(sk_R),\allowbreak m'',d_i)$ and $\chi,\chi'$ are permutations on $\{1,\dots,n\}$. ## Analysis: Election verifiability We assume record variables $\tilde r = (r_{cred},r_m,r_{m'}) = \textnormal{rv}(\mathsf{R}(V))$ (corresponding to the variable $x_{cred}$ and names $m$, $m'$ in the process $V$). Accordingly, given $m\in\mathbb{N}$ we define:
$\Phi^{IV}$xx̄$\widehat =$̄ $\Phi^{IV}$ $\widehat =$ $y =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\mathsf{penc}(x_{\mathsf{pk_T}},r_{m},v),\mathsf{penc}(x_{\mathsf{pk_R}},r_{m'},\pi_{1}(r_{cred})),$ $\qquad\mathsf{ballotPf}(x_{\mathsf{pk_T}},r_{m},v,x_{\mathsf{pk_R}},r_{m'},\pi_{1}(r_{cred})) \mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\wedge w = \pi_{2}(r_{cred})$ $\Phi^{UV}_m$ $\widehat =$ $\mathsf{checkMixPair}({z_{\mathsf{mixPairPf}}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{1}(\hat y)),\pi_{2}(\pi_{1}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{m}(\hat y)),\pi_{2}(\pi_{m}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},$ $\qquad\qquad z_{\mathsf{bal},1},\ldots,z_{\mathsf{bal},m}) =_E\mathsf{true}$ $\mathrel{\wedge} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{dec}(z_{\mathsf{partial},1},\pi_{1}(z_{\mathsf{bal},1})),\dots,\mathsf{dec}(z_{\mathsf{partial},m},\pi_{1}(z_{\mathsf{bal},m}))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} =_E\hat v$ $\mathrel{\wedge}\bigwedge_{i=1}^{m} {\mathsf{checkPartialPf}}(x_{\mathsf{pk_T}},\pi_{1}(z_{\mathsf{bal},i}),z_{\mathsf{partial},i},z_{\mathsf{partialPf},i}) =_E\mathsf{true}$ $\Phi^{EV}_m$$\widehat =$ $\bigwedge_{i=1}^{m} \mathsf{checkBallot}(\pi_{3}(\pi_{i}(\hat y)),\pi_{1}(\pi_{i}(\hat y)),\pi_{2}(\pi_{i}(\hat y))) =_E\mathsf{true}$ $\mathrel{\wedge}\mathsf{checkMixPair}({z_{\mathsf{mixPairPf}}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{1}(\hat y)),\pi_{2}(\pi_{1}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{{m}}(\hat y)),\pi_{2}(\pi_{{m}}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},$ $\qquad\qquad z_{\mathsf{bal},1},\ldots,z_{\mathsf{bal},{m}}) =_E\mathsf{true}$ $\mathrel{\wedge}\bigwedge_{i=1}^{m} \mathsf{pet}(z_{\mathsf{petPf},i},\pi_{2}(z_{\mathsf{bal},i}),{\bar{z}}_{\mathsf{cred},i}) =_E\mathsf{true}$ $\mathrel{\wedge}\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_{\mathsf{cred},1},\ldots,z_{\mathsf{cred},{m}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\simeq\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{{\bar{z}}_{\mathsf{cred},1},\ldots,{\bar{z}}_{\mathsf{cred},{m}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$ $\mathrel{\wedge}\mathsf{checkMix}({z_{\mathsf{mixPf}}},\mathsf{getmsg}(\pi_{1}(\hat w)),\ldots,\mathsf{getmsg}(\pi_{{m}}(\hat w)),z_{\mathsf{cred},1},\ldots,z_{\mathsf{cred},{m}}) =_E\mathsf{true}$ $\mathrel{\wedge}\bigwedge_{i=1}^{m} \mathsf{checksign}(x_{spk_R},\pi_{i}(\hat w))=_E\mathsf{true}$ $\bigwedge_{i=1}^{m} \pi_{4}(\hat y) =_E{\varnothing}\mathrel{\wedge} \mathsf{snd}^m(\hat w) =_E{\varnothing}\mathrel{\wedge} \mathsf{snd}^m(\hat y) =_E{\varnothing}$
The test $\Phi^{IV}$ checks that the voter’s ballot and public credential are recorded on the bulletin board. The test $\Phi^{UV}_m$ checks that the tally is correctly computed; that is, the mix is checked, the validity of partial decryptions have been verified and the decrypted tally corresponds to the election outcome. Finally, the test $\Phi^{EV}_m$ checks that only eligible ballots are considered; that is, ballots are correctly formed, mixes have been handled in a suitable manner, PETs have been verified and only authentic public voter credentials are considered.
**Theorem 1**. *$\langle A_{\sf jcj}, V_{\sf jcj} \rangle$ satisfies election verifiability.*
The proof of Theorem 1 is presented in Appendix [app:ev:civitas]. # Summary This chapter presents a symbolic definition of election verifiability which allows the precise identification of voting system components that need to be trusted for the purposes of verifiability. The suitability of systems can then be evaluated and compared on the basis of trust assumptions. The consideration of eligibility verifiability is of particular interest, since it provides an essential mechanism for detecting ballot stuffing, although it is often neglected within the literature and only satisfied by a few protocols. Our definition of election verifiability has been successfully used to evaluate three electronic voting protocols, namely: FOO, which uses blind signatures; Helios 2.0, which is based upon homomorphic encryption; and JCJ-Civitas, which uses mixnets. For each of these protocols the trust assumptions required for election verifiability are discussed. Helios 2.0 and JCJ-Civitas protocols have been implemented and deployed, therefore demonstrating the suitability of the framework for analysing real-world election systems. # untitled section **\[tex2md\] this section could not be converted; its LaTeX follows verbatim:** `Error at (line 113, column 1): unexpected \vskip expecting \end{document} \end{overview} ^` ``` latex \chapter[Anonymity in Direct Anonymous Attestation] {Anonymity in Direct Anonymous Attestation\symbolfootnotemark}\label{chap:DAA} %\chaptermark{Anonymity in Direct Anonymous Attestation} %\symbolfootnotetext{This chapter is partly based upon~\cite{Smyth08:DAA,Smyth07:DAA,Smyth08:Obs}. An initial draft of the formal model (Section~\ref{sec:daa:prop}) was devised in~\cite{Smyth08:DAA}. %: \bibentry{Smyth08:DAA}. %A preliminary analysis of RSA-based DAA (Section~\ref{sec:daa:RSA}), which discovered an attack and presented a fix, originally appeared in~\cite{Smyth07:DAA}. %: \bibentry{Smyth07:DAA}. %Finally, a preliminary analysis (Section~\ref{sec:daa:RSA:analysis}) of the fixed RSA-based DAA protocol was considered in~\cite{Smyth08:Obs}.%: \bibentry{Smyth08:Obs}. %} \symbolfootnotetext{This chapter is partly based upon~\cite{Smyth07:DAA,Smyth08:Obs}. A preliminary analysis of the RSA-based DAA protocol (Section~\ref{sec:daa:RSA}) -- which discovered an attack and presented a fix -- originally appeared in~\cite{Smyth07:DAA}, and %: \bibentry{Smyth07:DAA}. an initial analysis (Section~\ref{sec:daa:RSA:analysis}) of the fixed scheme was considered in~\cite{Smyth08:Obs}.%: \bibentry{Smyth08:Obs}. } \begin{overview} A definition of user-controlled anonymity is introduced in the context of Direct Anonymous Attestation schemes. The definition is expressed as an equivalence property suited to automated reasoning using ProVerif. The practicality of the definition is demonstrated by analysing the RSA-based Direct Anonymous Attestation protocol by Brickell, Camenisch \& Chen. The analysis discovers a vulnerability which can be exploited by a passive adversary and, under weaker assumptions, corrupt administrators. A security fix is identified and the revised scheme is shown to satisfy our definition of user-controlled anonymity. \end{overview} \noindent Trusted computing allows commodity computers to provide cryptographic assurances about their behaviour. At the core of the architecture is a hardware device called the Trusted Platform Module (TPM). The TPM uses shielded memory to store cryptographic keys, and other sensitive data, which can be used to achieve security objectives. In particular, the chip can measure and report its state, and authenticate. Cryptographic operations, by their nature, may reveal a platform's identity and as a consequence the TPM threatens privacy. Brickell, Camenisch \& Chen~\cite{Chen04:RSA-DAA} have introduced the notion of Direct Anonymous Attestation (DAA) to overcome these privacy concerns. More precisely, DAA is a remote authentication mechanism for trusted platforms which provides user-controlled anonymity and user-controlled traceability. The concept is based upon group signatures with stronger anonymity guarantees; in particular, the identity of a signer can never be revealed, but signatures may be linked with the signer's consent, and signatures produced by compromised platforms can be identified. A DAA scheme considers a set of \emph{hosts}, \emph{issuers}, \emph{TPMs}, and \emph{verifiers}; the host and TPM together form a \emph{trusted platform} or \emph{signer}. % \sout{$\Host$}, \sout{$\I$}, \sout{$\M$}, sout{$\V$}; \sout{$\Signer$}. DAA protocols proceed as follows. A host requests membership to a group provided by an issuer. The issuer authenticates the host as a trusted platform and grants an \emph{attestation identity credential} (occasionally abbreviated \emph{credential}). The host can now produce signatures using the credential, thereby permitting a verifier to authenticate the host as a group member and therefore a trusted platform. %Recall that the input to the sign algorithm is dependent on the desired linkability properties; if $\ybsn = {\perp}$, then signatures should be unlinkable and a random basebane $\bsn$ is used, otherwise $\ybsn$ is supplied as input. Accordingly Brickell, Chen \& Li~\cite{Chen08:DAA-security-preprint,Chen09:DAA-security} characterise the following properties for Direct Anonymous Attestation schemes: % \begin{itemize} \item \emph{User-controlled anonymity.} \begin{itemize} \item \emph{Privacy.} The identity of a signer cannot be revealed from a signature. \item \emph{Unlinkability.} Signatures cannot be linked without the signer's consent. \end{itemize} \item \emph{User-controlled traceability.} \begin{itemize} \item \emph{Unforgeability.} Signatures cannot be produced without a TPM. \item \emph{Basename linkability.} Signatures are linkable with the signer's consent. \end{itemize} \item \emph{Correctness.} Valid signatures can be verified and, where applicable, linked. %\item \emph{Correctness.} %\begin{itemize} %\item \emph{Verification.} The \emph{verify} algorithm succeeds for honestly contructed signatures. %\item \emph{Linkability.} The \emph{link} algorithm succeeds for signatures produced by the same trusted platform \end{itemize} % %In a similar manner to privacy in electronic voting (see Chapter~\ref{}) user-controlled anonymity requires the existence of at least two honest signers. In addition, unforgeability requires % The contrasting nature of anonymity and traceability properties aims to provide a balance between the privacy demands of users and the accountability needs of administrators. % and DAA is therefore widely available for execution. The %The notion of and first concrete scheme was introduced by . %In broad terms a trusted platform contacts an issue and requests membership to a group. If the issuer wishes to accept the request, it grants the platform an \emph{attestation identity credential} (the terms \emph{credential} and attestation identity credential will be used interchangably). The trusted platform is now able to anonymously authenticate itself as a group member with respect to the attestation identity credential. The first concrete Direct Anonymous Attestation scheme was introduced by Brickell, Camenisch \& Chen~\cite{Chen04:RSA-DAA} and is based upon RSA. The RSA-based DAA protocol is reliant on the strong RSA and decisional Diffie-Hellman assumptions. However, some users are uncomfortable with these assumptions. This motivated the work of Brickell, Chen \& Li~\cite{Chen08:ECC-DAA,Chen09:DAA-security} who provide the first ECC-based DAA protocol using symmetric pairing. This scheme is reliant on the LRSW~\cite{LRSWassumption} and decisional Bilinear Diffie-Hellman assumptions. Moreover, ECC-based schemes are more efficient and therefore better suited to devices with limited resources, such as the TPM. Chen, Morrissey \& Smart~\cite{Chen08:ECC-DAA-assymmetric-proof,Chen08:ECC-DAA-assymmetric} extend the scheme based upon symmetric pairing to an asymmetric setting to improve efficiency; however, Li discovered a vulnerability which violates user-controlled traceability and Chen \& Li propose a fix~\cite{Chen10}. Chen, Morrissey \& Smart~\cite{Chen09} identified further traceability attacks against the asymmetric scheme %described in~\cite{Chen08:ECC-DAA-assymmetric-proof,Chen08:ECC-DAA-assymmetric} \sout{and also found attacks against the symmetric pairing based scheme. They propose fixes to both protocols~\cite{Chen09}.} and proposed a fix. In addition, Chen, Morrissey \& Smart~\cite{Chen10b} have found traceability attacks against the symmetric pairing based scheme~\cite{Chen08:ECC-DAA,Chen09:DAA-security} and the original RSA-based scheme~\cite{Chen04:RSA-DAA}. % These attacks allow a malicious host to extract the TPM's secret $\tsk$, if the protocol is implemented in hardware without \emph{stage control mechanisms}; the host can then violate user-controlled traceability by forging signatures. However, since the TPM provides stage control protection, there is no practical threat in the current setting; but, we should still consider these attacks interesting because it identifies settings in which DAA protocols cannot be deployed (for example, in other trusted computing settings which do not use the TPM). We remark that the analysis of user-controlled traceability of the RSA-based scheme by Backes, Maffei \& Unruh~\cite{Backes08:ZKP-DAA} could not identify this attack because they consider a setting where the host and TPM are both honest. % An optimisation of the fixed asymmetric scheme %~\cite{Chen08:ECC-DAA-assymmetric-proof,Chen08:ECC-DAA-assymmetric,Chen09} has been proposed by Chen, Page \& Smart~\cite{Chen10:ECC-DAA-assymmetric-optimised} and three further ECC-based DAA protocols have been defined: Chen \& Feng~\cite{CF08}, Brickell \& Li~\cite{BL09,BL09a} and Chen~\cite{Chen10:DAA-security-non-frameability-eprint,Chen09:DAA-security-non-frameability}. %The first ECC-based DAA protocol was introduced by Brickell, Chen \& Li~\cite{Chen08:ECC-DAA,Chen09:DAA-security} using symmetric pairing and was extended by Chen, Morrissey \& Smart~\cite{Chen08:ECC-DAA-assymmetric-proof,Chen08:ECC-DAA-assymmetric} to an asymmetric setting to improve efficiency; however, Li discovered a vulnerability and Chen \& Li propose a fix~\cite{Chen10}. Chen, Morrissey \& Smart~\cite{Chen09} identified further attacks against~\cite{Chen08:ECC-DAA-assymmetric-proof,Chen08:ECC-DAA-assymmetric} and also found attacks against the symmetric pairing based protocol~\cite{Chen08:ECC-DAA,Chen09:DAA-security}; they propose fixes to both schemes~\cite{Chen09}. An optimisation of the fixed asymmetric scheme~\cite{Chen08:ECC-DAA-assymmetric-proof,Chen08:ECC-DAA-assymmetric,Chen09} has been proposed by Chen, Page \& Smart~\cite{Chen10:ECC-DAA-assymmetric-optimised}. Three further ECC-based DAA protocols have been defined by Chen \& Feng~\cite{CF08}, Brickell \& Li~\cite{BL09,BL09a} and Chen~\cite{Chen10:DAA-security-non-frameability-eprint,Chen09:DAA-security-non-frameability}. \contribution A definition of user-controlled anonymity is presented as an equivalence property which is suited to automated reasoning using ProVerif. Informally, the definition asserts that an adversary cannot distinguish between signatures produced by two distinct signers, even when the adversary controls the issuer and has observed previous signatures produced by each signer. The application of the definition is demonstrated by analysing user-controlled anonym\-ity in %two case studies: the RSA-based DAA protocol~\cite{Chen04:RSA-DAA}. %and the ECC-based DAA protocol~\cite{Chen08:ECC-DAA,Chen09:DAA-security}. Support for the RSA-based scheme is mandated by the TPM specification version 1.2~\cite{TPMspec} which has been defined as an ISO/IEC international standard~\cite{ISO11889}. Moreover, estimates suggest that the TPM has been embedded in over 300 million computers~\cite{TCG10} (although, some experts claim only 15 million of these TPMs have been turned on~\cite[\S6]{Martin08:TPM}). This demonstrates the suitability of this framework for analysing schemes which have been deployed in the real-world. The analysis of RSA-based DAA discovers a vulnerability in the protocol which allows an adversary to violate user-controlled anonymity. As a consequence, applications which use RSA-based DAA as a building block -- for example, the peer-to-peer networking scheme by Balfe, Lakhani \& Paterson~\cite{BLP05a,BLP05} and the authentication scheme by Leung \& Mitchell~\cite{LM07} -- are also flawed. A fix is identified, and the revised RSA-based DAA protocol is shown to be secure. \structure Section~\ref{sec:obs:proverif} recalls the variant of the applied pi calculus introduced by~\cite{Blanchet04,BlanchetJLAP07}. Section~\ref{sec:daa:prot} defines Direct Anonymous Attestation protocols, and presents a formalisation in the applied pi calculus. Section~\ref{sec:daa:prop} defines user-controlled anonymity as an observational equivalence property, and the definition is used in Section~\ref{sec:daa:RSA} to analyse the RSA-based DAA protocol. Finally, a summary is presented in Section~\ref{sec:daa:summary}. \newif\ifResearchPaper \ResearchPaperfalse ``` # Preliminaries: Calculus of ProVerif The calculus presented here is a combination of the applied pi calculus (Chapter [chap:applied]) with one of its dialects (**Blanchet04?**; **BlanchetJLAP07?**). This variant is particularly useful due to the automated support provided by ProVerif. ## Syntax and semantics The calculus assumes an infinite set of names, an infinite set of variables, and a signature $\Sigma$ consisting of a finite set of function symbols (constructors and destructors), each with an associated arity. A function symbol with arity $0$ is a constant. We write $f$ for a constructor, $g$ for a destructor, and $h$ for either a constructor or destructor. Substitutions $\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ replace the variable $x$ with the term $M$ and we let the letters $\sigma$ and $\tau$ range over substitutions. We write $N\sigma$ for the result of applying $\sigma$ to the free variables of $N$. The signature $\Sigma$ is equipped with an equational theory $E$, that is, a finite set of equations of the form $M = N$. We define $=_E$ as the smallest equivalence relation on terms, that contains $E$ and is closed under application of constructors, substitution of terms for variables and bijective renaming of names. The calculus assumes an infinite set of names, an infinite set of variables and a signature $\Sigma$ consisting of a finite set of function symbols each with an associated arity. An explicit distinction is made between constructors (termed functions in Chapter [chap:applied]) and destructors within the signature. We write $f$ for a constructor, $g$ for a destructor, and $h$ for either a constructor or destructor. Terms are built by applying constructors to names, variables and other terms (Figure 1). As usual, the signature $\Sigma$ is equipped with an equation theory $E$. The semantics of a destructor $g$ of arity $l$ is given by a finite set $\mathrm{def}_{\Sigma}(g)$ of rewrite rules $g(M'_1, \ldots, M'_l) \rightarrow M'$, where $M'_1,\ldots, M'_l, M'$ are terms that contain only constructors and variables; moreover, the variables of $M'$ are bound in $M'_1, \ldots, M'_l$, and variables are subject to renaming. The term $g(M_1, \ldots, M_l)$ is defined if and only if there exists a substitution $\sigma$ and a rewrite rule $g(M'_1, \ldots, M'_l) \rightarrow M'$ in $\mathrm{def}_{\Sigma}(g)$ such that $M_i = M'_i\sigma$ for all $i \in \{ {1}, \ldots, {l}\}$, and in this case $g(M_1, \ldots, M_l)$ is defined as $M'\sigma$. The grammar for terms and  processes is presented in Figure 1. The process $\textnormal{let } x=D \textnormal{ in } P \textnormal{ else }\allowbreak Q$ tries to evaluate $D$; if this succeeds, then $x$ is bound to the result and $P$ is executed, otherwise $Q$ is executed. For convenience, the statement $\textnormal{let } x=D \textnormal{ in } P \textnormal{ else }Q$ may be abbreviated as $\textnormal{let } x=D \textnormal{ in }{P}$ when $Q$ is the null process. The syntax does not include the conditional $\textnormal{if } M=N \textnormal{ then } P \textnormal{ else }Q$, but this can be defined as $\textnormal{let } x=\mathsf{eq}(M,N) \textnormal{ in } P \textnormal{ else }Q$, where $x$ is a fresh variable and $\mathsf{eq}$ is a binary destructor with the rewrite rule $\mathsf{eq}(x,x) \rightarrow x$. We always include this destructor in $\Sigma$. In addition, evaluation contexts forbid holes under the scope of a term evaluation. The rest of the syntax is standard (see (**Blanchet04?**; **BlanchetJLAP07?**))(see Chapter [chap:applied] and (**Blanchet04?**; **BlanchetJLAP07?**)). The bracketing conventions defined in Section [sec:applied:syntax] will be adopted with an additional assumption that the expression $P\mid Q\mid R$ is bracketed as $P\mid (Q\mid R)$. Although $(P\mid Q)\mid R \equiv P\mid (Q\mid R)$, this convention simplifies our compiler design in Chapter 5. Bracketing must be used to avoid ambiguities in the way processes are written down. For example, the process $!\,P\mid Q$ might be interpreted as $(!P)\mid Q$, or as $!(P\mid Q)$. These processes are different. To avoid too much bracketing, we adopt conventions about the precedence of process operators. Unary operators $!$, $\nu\,n$, $u(x)$, and $\overline{u}\langle M\rangle$ bind more closely than binary operators; and the binary let-in-else operator binds more closely than the binary parallel operator. It follows that the expression $c(x).\textnormal{let } x=M \textnormal{ in }P \mid {!Q} \mid R$ means $(c(x).\textnormal{let } x=M \textnormal{ in }P) \mid (!Q) \mid R$. The expression $P\mid Q\mid R$ is also ambiguous, since it could mean either $(P\mid Q)\mid R$ or $P\mid (Q\mid R)$. In this paper we assume the latter convention.

̄ ̄ ̄

M, N : :=terms
a, b, c, …, k, …, m, n, …, sname
x, y, zvariable
f(M1, …, Ml)constructor application
D : :=term evaluations
Mterm
eval h(D1, …, Dl)function evaluation
P, Q, R : :=processes
0null process
P ∣ Qparallel composition
!Preplication
ν a.Pname restriction
M(x).Pmessage input
$\overline{M}\langle N\rangle.P$message output
$\textnormal{let } x=D \textnormal{ in } P \textnormal{ else }Q$term evaluation

Syntax for terms and processes
The sets of free and bound names, respectively variables, in process $P$ are denoted by $\textnormal{fn}(P)$, $\textnormal{bn}(P)$, $\textnormal{fv}(P)$, $\textnormal{bv}(P)$. We also write $\textnormal{fn}(M)$, $\textnormal{fv}(M)$ for the names, respectively variables, in term $M$. A process $P$ is closed if it has no free variables. A context $C$ is a process with a hole. We obtain $C[P]$ as the result of filling $C$’s hole with $P$. An evaluation context is a context whose hole is not in the scope of a replication, an input, an output, or a term evaluation. The rules of Figure 2 axiomatise the reduction relation for processes ($\rightarrow_\Sigma$), thus defining the operational semantics of our calculus. Auxiliary rules define term evaluation ($\mathop{\Downarrow}_{\Sigma}$) and the structural congruence relation ($\equiv$). Both $\equiv$ and $\rightarrow_\Sigma$ are defined only on closed processes. We write $\rightarrow_{\Sigma}^*$ for the reflexive and transitive closure of $\rightarrow_{\Sigma}$, and $\,\rightarrow_{\Sigma}^* \equiv\,$ for its union with $\equiv$. When $\Sigma$ is clear from the context, we abbreviate $\rightarrow_{\Sigma}$ and $\mathop{\Downarrow}_{\Sigma}$ to $\rightarrow$ and $\mathop{\Downarrow}$, respectively.

M⇓M
eval h(D1, …, Dn)⇓Nσ
if h(N1, …, Nn) → N ∈ defΣ(h),
and σ is such that for all i, Di⇓Mi and Σ ⊢ Mi = Niσ


P ∣ 0 ≡ P
P ∣ Q ≡ Q ∣ P
(P ∣ Q) ∣ R ≡ P ∣ (Q ∣ R)
ν a.ν b.P ≡ ν b.ν a.P
ν a.(P ∣ Q) ≡ P ∣ ν a.Q
if $a \notin \textnormal{fn}(P)$

P ≡ P
Q ≡ P ⇒ P ≡ Q
P ≡ Q, Q ≡ R ⇒ P ≡ R
P ≡ Q ⇒ P ∣ R ≡ Q ∣ R
P ≡ Q ⇒ ν a.P ≡ ν a.Q


$\overline{N}\langle M\rangle.Q \mid N'(x).P \;\rightarrow\; Q \mid P\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ (Red I/O)
if Σ ⊢ N = N′
$\textnormal{let } x=D \textnormal{ in } P \textnormal{ else }Q \rightarrow P\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ (Red Fun 1)
if D⇓M
$\textnormal{let } x=D \textnormal{ in } P \textnormal{ else }Q \rightarrow Q$ (Red Fun 2)
if there is no M such that D⇓M
!P → P ∣ !P (Red Repl)
P → Q ⇒ P ∣ R → Q ∣ R (Red Par)
P → Q ⇒ ν a.P → ν a.Q (Red Res)
P′ ≡ P, P → Q, Q ≡ Q′ ⇒ P′ → Q′ (Red ≡)
Semantics for terms and processes
## Biprocesses The calculus provides a notation for modelling pairs of processes that have the same structure and differ only by the terms and term evaluations that they contain. We call such a pair of processes a *biprocess*. The grammar for the calculus is a simple extension of the grammar of Figure 1, with additional cases so that $\textnormal{diff}[M,M']$ is a term and $\textnormal{diff}[D,D']$ is a term evaluation. The semantics for biprocesses include the rules in Figure 2, except for (Red I/O), (Red Fun 1), and (Red Fun 2) which are revised in Figure 3. We also extend the definition of contexts to permit the use of $\textrm{diff}$, and sometimes refer to contexts without $\textrm{diff}$ as plain contexts. Given a biprocess $P$, we define two processes $\textnormal{fst}(P)$ and $\textnormal{snd}(P)$, as follows: $\textnormal{fst}(P)$ is obtained by replacing all occurrences of $\textnormal{diff}[M,M']$ with $M$ and $\textnormal{diff}[D,D']$ with $D$ in $P$; and similarly, $\textnormal{snd}(P)$ is obtained by replacing $\textnormal{diff}[M,M']$ with $M'$ and $\textnormal{diff}[D,D']$ with $D'$ in $P$. We define $\textnormal{fst}(D)$, $\textnormal{fst}(M)$, $\textnormal{snd}(D)$, and $\textnormal{snd}(M)$ similarly.
$\overline{N}\langle M\rangle.Q \mid N'(x).P \;\rightarrow\; Q \mid P\{\textnormal{\raisebox{2pt}{\footnotesize $M$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ (Red I/O)
$\textnormal{let } x=D \textnormal{ in } P \textnormal{ else }Q \rightarrow P\{\textnormal{\raisebox{2pt}{\footnotesize $\textnormal{diff}[M_1,M_2]$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ (Red Fun 1)
if $\textnormal{fst}(D) \mathop{\Downarrow}M_1$ and $\textnormal{snd}(D) \mathop{\Downarrow}M_2$
$\textnormal{let } x=D \textnormal{ in } P \textnormal{ else }Q \rightarrow Q$ (Red Fun 2)
if there is no M1 such that $\textnormal{fst}(D) \mathop{\Downarrow}M_1$ and
there is no M2 such that $\textnormal{snd}(D) \mathop{\Downarrow}M_2$
Generalised semantics for biprocesses
## Observational equivalence Intuitively, processes $P$ and $Q$ are said to be observationally equivalent if they can output on the same channels, no matter what context they are placed inside. Formally, we write $P \downarrow_M$ when $P$ can send a message on $M$, that is, when $P \equiv C[\overline{M'}\langle N\rangle.R]$ for some evaluation context $C[\_]$ such that $\textnormal{fn}(C)\cap\textnormal{fn}(M) = \emptyset$ and $\Sigma \vdash M = M'$. The definition of observational equivalence (**Blanchet04?**; **BlanchetJLAP07?**) can now be recalled as follows.
**Definition 1** (Observational equivalence). **Observational equivalence* $\sim$ is the largest symmetric relation $\mathcal{R}$ between closed processes such that $P \mathrel{\mathcal{R}} Q$ implies:* 1. *if $P \downarrow_M$, then $Q\downarrow_M$;* 2. *if $P \rightarrow P'$, then $Q \rightarrow Q'$ and $P' \mathrel{\mathcal{R}} Q'$ for some $Q'$;* 3. *$C[P]\mathrel{\mathcal{R}}C[Q]$ for all evaluation contexts $C[\_]$.*
We define observational equivalence as a property of biprocesses.
**Definition 2**. *The closed biprocess $P$ *satisfies observational equivalence* if $\textnormal{fst}(P)\sim\textnormal{snd}(P)$.*
It follows from the semantics of biprocess that if $P \xrightarrow{}Q$ for some biprocesses $P,Q$, then $\textnormal{fst}(P) \xrightarrow{}\textnormal{fst}(Q)$ and $\textnormal{snd}(P)\xrightarrow{}\textnormal{snd}(Q)$. However, reductions in $\textnormal{fst}(P)$ or $\textnormal{snd}(P)$ do not necessarily imply biprocess reductions in $P$; that is, there exist biprocesses $P$ such that $\textnormal{fst}(P) \xrightarrow{}\textnormal{fst}(Q)$, but there is no such reduction $P \xrightarrow{}Q$, and symmetrically for $\textnormal{snd}(P)$. For example, consider the biprocess $P = \overline{\textnormal{diff}[a,c]}\langle n\rangle \mid a(x)$, we have $\textnormal{fst}(P) \xrightarrow{}0$, but there is no reduction $P \xrightarrow{}0$. Blanchet, Abadi & Fournet (**Blanchet04?**; **BlanchetJLAP07?**) have shown that a biprocess $P$ satisfies observational equivalence when reductions in $\textnormal{fst}(P)$ or $\textnormal{snd}(P)$ imply reductions in $P$. This proof technique is formalised using the notion of *uniformity*.
**Definition 3** (Uniform). *A biprocess $P$ is *uniform* if for all processes $Q_1$ such that $\textnormal{fst}(P) \xrightarrow{}Q_1$, then $P \xrightarrow{}Q$ for some biprocess $Q$, where $\textnormal{fst}(Q) \equiv Q_1$, and symmetrically for $\textnormal{snd}(P) \xrightarrow{}Q_2$.*
**Definition 4** (Strong uniformity). *A closed biprocess $P$ *satisfies strong uniformity* if for all plain evaluation contexts $C$ and biprocesses $Q$ such that $C[P] \xrightarrow{}^*\equiv Q$, then $Q$ is uniform.*
**Theorem 1** (Strong uniformity implies equivalence (**BlanchetJLAP07?**)). *Given a closed biprocess $P$, if $P$ satisfies strong uniformity, then $P$ satisfies observational equivalence.*
# Formalising DAA protocols The concept of Direct Anonymous Attestation was defined by Brickell, Camenisch & Chen (**Chen04:RSA-DAA?**), and a historical account of its development is presented in (**Chen04:DAA-in-context?**). A Direct Anonymous Attestation scheme allows remote authentication of trusted platforms, and comprises of five algorithms, each of which will now be discussed. #### Setup. The setup algorithm is primarily used by the issuer to construct a public key pair $sk_I,\mathsf{pk}(sk_I)$, and the public part $\mathsf{pk}(sk_I)$ is published. In addition, the setup algorithm may define implementation specific parameters. #### Join. The join algorithm is run between a trusted platform and an issuer for the purpose of obtaining group membership. The algorithm assumes that the trusted platform and issuer have established a one-way authenticated channel, that is, the issuer is assured to be communicating with a host and TPM. The definition of DAA does not mandate a particular authentication mechanism, although the Trusted Computing Group recommend encrypting every message sent by the issuer under the TPM’s endorsement key (**TPMspec?**). (Although, as demonstrated by the RSA-based DAA scheme, lighter solutions are possible.) On successful completion of the join algorithm, the issuer grants the trusted platform with an attestation identity credential $\texttt{cre}$ based upon a secret $\texttt{tsk}$ known only by the TPM. #### Sign. The sign algorithm is executed by a trusted platform to produce a signature $\sigma$, based upon an attestation identity credential $\texttt{cre}$ and secret $\texttt{tsk}$, which asserts group membership and therefore trusted platform status. The algorithm takes as input a message $m$ and a basename $\texttt{bsn}$ (which is used to control linkability between signatures). If $\texttt{bsn}= {\perp}$, then signatures should be unlinkable; otherwise, signatures produced by the same signer and based upon the same basename can be linked. #### Verify. The verification algorithm is used by a verifier to check the validity of a signature. The algorithm takes as input a set of secret keys $\texttt{ROGUE}_{\texttt{tsk}}$, which are known to have been successfully extracted from compromised TPMs (see Tarnovsky (**Tarnovsky10:TPM-extract-key?**) for further details on key extraction), allowing the identification of rogue platforms. The methodology used to build $\texttt{ROGUE}_{\texttt{tsk}}$ is not defined by DAA. #### Link. The link algorithm is used by a verifier to check if two valid signatures $\sigma$, $\sigma'$ are linked, that is, signed using the same basename $\texttt{bsn}$ and secret $\texttt{tsk}$. The inputs and outputs of these algorithms are explicitly summarised in Table [table:daa:in-out].
Algorithm Input Output
Setup Security parameters. A public key pair skI, pk(skI) and implementation specific parameters.
Join

Trusted platform inputs: the system parameters (including the issuer’s public key and any implementation specific parameters defined by the setup algorithm), the TPM’s internal secret DAASeed (this value is defined during manufacture (TPMspec?)), a counter value cnt selected by the host, and the TPM’s endorsement key.

Issuer’s inputs: the system parameters.

Trusted platform outputs: a pair consisting of the attestation identity credential cre and secret tsk.

Issuer’s outputs: the public part of the TPM’s endorsement key.

Sign The system parameters, a verifier’s basename bsn, a message m, an attestation identity credential cre, and a secret tsk. A signature σ.
Verify The system parameters, a verifier’s basename bsn, a message m, a candidate signature σ for m, and a set of secret keys ROGUEtsk. 1 (accept) or 0 (reject).
Link The system parameters, and two candidate signatures σ and σ′ for messages m and m′. ⊥ (invalid signature) if the verify algorithm outputs 0 for signature σ (respectively σ′) using the system parameters, basename ⊥, the message m (respectively m′), and the empty set of secret keys. Otherwise, the algorithm returns 1 if the signatures can be linked and 0 if the signatures cannot be linked.
#### Linkability in DAA protocols. The ability to link signatures, without revealing the identity of the signer, is a particularly interesting aspect of DAA schemes and the degrees of linkability are identified below, with reference to an application domain in which several verifiers offer multiple services and signers must consent to linkability. 1. *Single-service linkability.* A verifier offering a single service is able to link multiple transactions with the same signer. 2. *Cross-service linkability.* A verifier offering multiple services which share the same basename is able to link transactions with the same signer over multiple services. 3. *Cross-verifier linkability.* Multiple verifiers offering services which share the same basename are able to link transactions with the same signer across all services. The classifications of linkability all assume the existence of a single issuer. *Cross issuer linkability*, that is, linkability between signatures produced in different groups (under different issuers), is not expressly forbidden by Direct Anonymous Attestation; however, the schemes considered in this thesis do not provide this property because the secret $\texttt{tsk}$ is partly derived from the issuer’s public key. Moreover, the game-based security definition (**Chen08:DAA-security-preprint?**; **Chen09:DAA-security?**) does not consider this case. ## DAA process specification This chapter considers user-controlled anonymity, which is dependent on a trusted platform’s behaviour, that is, the join and sign algorithms. Formally, these algorithms are captured by a *Direct Anonymous Attestation process specification* (Definition 1). Since our focus is on automated reasoning, we will adopt the calculus of ProVerif (Section [sec:obs:proverif]).
**Definition 1** (Direct Anonymous Attestation process specification). *A *Direct Anonymous Attestation process specification* is a tuple of processes $\langle \sf{Join}, \sf{Sign}\rangle$.*
The signer (or trusted platform) is able to execute arbitrarily many instances of the join, and sign, algorithms, to become a member of a group and subsequently produce signatures as a group member. This behaviour is captured by the $\sf{Signer}$ process modelled below. The join and sign algorithms are modelled by the processes $\sf{Join}$ and $\sf{Sign}$, which are expected to behave like services; that is, they can be called by, and return results to, the $\sf{Signer}$ process. The communication between the $\sf{Signer}$ and $\sf{Join}$/$\sf{Sign}$ processes is achieved using private communication over channels $a_j,a'_j,a_s,a'_s$. In essence, the private channel communication models the internal bus used by computer systems for communication between the host and TPM. This chapter focuses on user-controlled anonymity and hence it is sufficient to assume the processes $\sf{Join}$ and $\sf{Sign}$ are initiated by input on channels $a_j$ and $a_s$; and similarly, output results on channels $a'_j$ and $a'_s$. Intuitively, it follows that some processes not satisfying these conditions will satisfy our definition of user-controlled anonymity. In fact, the Direct Anonymous Attestation process specification $\langle 0, 0 \rangle$ will satisfy our definition. We tolerate this limitations here, and in future work we will consider a complete definition of the DAA properties, including correctness and user-controlled traceability. The correctness property will exclude degenerate process specifications such as $\langle 0, 0 \rangle$. Similar considerations are made in the literature, for example, in definitions of vote privacy for electronic voting (**KR05:vote-privacy?**; **DKR06?**; **DKR08?**; **DKR10?**) and privacy for vehicular ad-hoc networks (**Delaune10:Vanets?**). $$\begin{array}{lcl} \sf{Signer} &=& \nu\,a_j.\nu\,a'_j.\nu\,a_s.\nu\,a'_s\mathrel{.} (\,( {!\sf{Join}} ) \mid ({!\sf{Sign}} ) \mid (\nu\,\texttt{cnt}.\nu\,\texttt{DAASeed}.\nu\,sk_{M}.\overline{c}\langle\mathsf{pk}(sk_M)\rangle.\\ % && \qquad \textrm{\sout{$\new{\DAASeed}.\new{\cnt}.$}}\\ && \qquad!c(w_{\mathsf{params }}).\overline{a_j}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},\texttt{DAASeed},\texttt{cnt},sk_{M}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a'_j(x).\\ && \qquad \textnormal{let } x_{\mathsf{cre }}=\pi_{1}(x) \textnormal{ in }\textnormal{let } x_{\texttt{tsk}}=\pi_{2}(x) \textnormal{ in }(\\ && \qquad\qquad!c(y).\textnormal{let } y_{\mathsf{bsn }}=\pi_{1}(y) \textnormal{ in }\textnormal{let } y_{\mathsf{msg }}=\pi_{2}(y) \textnormal{ in }\\ && \qquad\qquad\overline{a_s}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},y_{\mathsf{bsn }},y_{\mathsf{msg }},x_{\mathsf{cre }},x_{\texttt{tsk}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a'_s(z).\overline{c}\langle z\rangle\\ % && \qquad\qquad\textrm{\sout{$\Ifthen{\ybsn}{\perp}$}}\\ % && \qquad\qquad\qquad\textrm{\sout{$\new{\bsn}.\Out[a_s]{\tuple{\wparams,\bsn,\ymsg,\xcre,\xtsk}}.\In[a'_s]{z}.\Out{z}$}}\\ % && \qquad\qquad\textrm{\sout{$\Else$}}\\ % && \qquad\qquad\qquad\textrm{\sout{$\Out[a_s]{\tuple{\wparams,\ybsn,\ymsg,\xcre,\xtsk}}.\In[a'_s]{z}.\Out{z}$}}\\ && \qquad)\\ && )) \end{array}$$ The process $\sf{Signer}$ instantiates arbitrarily many instances of the $\sf{Join}$ and $\sf{Sign}$ processes. The restricted channel names $a_j$, $a'_j$ are introduced to ensure communication between the $\sf{Signer}$ and $\sf{Join}$ processes is private; similarly, names $a_s$, $a'_s$ ensure private communication between the $\sf{Signer}$ and $\sf{Sign}$ processes. The bound name $\texttt{cnt}$ is a counter value selected by the host. The bound name $\texttt{DAASeed}$ represents the TPM’s internal secret and $sk_{M}$ represents the TPM’s endorsement key (these values are defined during manufacture (**TPMspec?**)). The public part of the endorsement key is published by the $\sf{Signer}$ process. The remainder of the $\sf{Signer}$ process models a signer’s ability to execute arbitrarily many instances of the join and sign algorithms. The $\sf{Signer}$ process must first input system parameters $w_{\mathsf{params }}$, provided by the issuer. The $\sf{Join}$ process is assumed to act like a service and listens for input on channel $a_j$. It follows, that the $\sf{Signer}$ process can invoke the service by message output $\overline{a_j}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},\texttt{DAASeed},\texttt{cnt},w_{\mathsf{ek }}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle$, where $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},\texttt{DAASeed},\texttt{cnt},w_{\mathsf{ek }}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$ models the join algorithm’s parameters. The $\sf{Join}$ process is assumed to output results on channel $a'_j$, and this response can be received by the $\sf{Signer}$ process using message input $a'_j(x)$; the result is bound to the variable $x$, and is expected to consist of a pair $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_{\mathsf{cre }},x_{\texttt{tsk}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$ representing the attestation identity credential and TPM’s secret. The interaction between the $\sf{Sign}$ and $\sf{Signer}$ processes is similar. The $\sf{Signer}$ process first inputs a variable $y$ which is expected to be a pair representing the verifier’s basename $y_{\mathsf{bsn }}$ and a message $y_{\mathsf{msg }}$. The invocation of the sign algorithm by the signer is modelled by the message output $\overline{a_s}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},y_{\mathsf{bsn }},y_{\mathsf{msg }},x_{\mathsf{cre }},x_{\texttt{tsk}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle$, where $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},y_{\mathsf{bsn }},y_{\mathsf{msg }},x_{\mathsf{cre }},x_{\texttt{tsk}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$ represents the algorithm’s parameters. The sign algorithm is expected to output a signature which can be sent to a verifier, in the $\sf{Signer}$ process this signature is received from the $\sf{Sign}$ process by message input $a'_s(z)$ and the variable $z$ representing the signature is immediately output. # Security definition: User-controlled anonymity Informally, the notion of user-controlled anonymity asserts that given two honest signers $\mathcal{A}$ and $\mathcal{B}$, an adversary cannot distinguish between a situation in which $\mathcal{A}$ signs a message, from another one in which $\mathcal{B}$ signs a message. Based upon Brickell, Chen & Li (**Chen08:DAA-security-preprint?**; **Chen09:DAA-security?**) we present the following security definition. #### Initial: The adversary constructs the public key pair $sk_I,\mathsf{pk}(sk_I)$ and publishes the public part $\mathsf{pk}(sk_I)$ for the signers. The adversary also publishes any additional parameters. #### Phase 1: The adversary makes the following requests to signers $\mathcal{A}$ and $\mathcal{B}$: - Join. The signer executes the join algorithm to create $\texttt{cre}$ and $\texttt{tsk}$. The adversary, as the issuer, learns $\texttt{cre}$ but typically not $\texttt{tsk}$. - Sign. The adversary submits a basename $\texttt{bsn}$ and a message $m$. The signer runs the sign algorithm and returns the signature to the adversary. At the end of phase 1, both signers are required to have run the join algorithm at least once. #### Phase 2 (Challenge): The adversary submits a message $m$ and a basename `bsn` to the signers, with the restriction that the basename has not been previously used if $\texttt{bsn}\not= {\perp}$. Each signer produces a signature on the message and returns it to the adversary. #### Phase 3: The adversary continues to probe the signers with join and sign requests, but is explicitly forbidden to use the basename used in phase 2 if $\texttt{bsn}\not= {\perp}$. #### Result: The protocol satisfies user-controlled anonymity if the adversary cannot distinguish between the two signatures output during the challenge. Formally, this definition can be modelled as an observational equivalence (Definition 1), which is suitable for automated reasoning, based upon the *augmented Direct Anonymous Attestation biprocess* ${\sf DAA}$ expressed in Figure 1. As observed by Rudolph (**Rudolph07:DAAFlaw?**), and as specified by Brickell, Chen & Li (**Chen08:DAA-security-preprint?**; **Chen09:DAA-security?**), user-controlled anonymity can only be expected if both signers use $\mathsf{pk}(sk_I)$ for the issuer (that is, the signers do not accept two distinct keys from the issuer). This is captured by the biprocess ${\sf DAA}$ by providing the same parameters $w_{\mathsf{params }}$ to both signers. The $\sf{Challenge}$ process is designed to capture the behaviour of the signers in phase 2. This is achieved by outputting an attestation identity credential $x_{\mathsf{cre }}$ and a secret $x_{\texttt{tsk}}$, produced by the signers in phase 1, on the private channels $b_A$, $b_B$ in $\sf{Signer^+}$, and inputting these values in the $\sf{Challenge}$ process. The $\sf{Challenge}$ process then continues by producing a signature in the standard manner, but uses $\textnormal{diff}[x_{\mathsf{cre }},y_{\mathsf{cre }}]$ and $\textnormal{diff}[x_{\texttt{tsk}},y_{\mathsf{tsk }}]$ to ensure that the signature is produced by $\mathcal{A}$ on the left hand side and $\mathcal{B}$ on the right hand side. Finally, the necessity for a distinct basename in phase 2 (when $\texttt{bsn}\not= {\perp}$) is enforced by prefixing the basename used by $\sf{Challenge}$ with $chl^-$ and, similarly, prefixing the basenames used by $\sf{Signer^+}$ with $chl^+$. The definition of user-controlled anonymity follows naturally.

 

1.75 Given a Direct Anonymous Attestation process specification $\langle \sf{Join}, \sf{Sign}\rangle$, the augmented Direct Anonymous Attestation biprocess ${\sf DAA}$ is defined as $$\nu\,b_A. \nu\,b_B . c(w_{\mathsf{params }}) \mathrel.(\sf{Challenge}\mid \sf{Signer^+}\{\textnormal{\raisebox{2pt}{\footnotesize $b_A$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $w_b$}}\} \mathrel | \sf{Signer^+}\{\textnormal{\raisebox{2pt}{\footnotesize $b_B$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $w_b$}}\})$$ such that $b_A,b_B \not\in (\textnormal{fn}(\sf{Sign})\cup\textnormal{fv}(\sf{Sign})\cup\textnormal{fn}(\sf{Join})\cup\textnormal{fv}(\sf{Join}))$ and where $$\begin{array}{lcl} \sf{Signer^+} &=& \nu\,a_j . \nu\,a'_j . \nu\,a_s . \nu\,a'_s . (\, ({!\sf{Join}}) \mid ({!\sf{Sign}}) \mid (\nu\,\texttt{cnt}.\nu\,\texttt{DAASeed}.\nu\,sk_{M}.\overline{c}\langle\mathsf{pk}(sk_M)\rangle\\ && \quad!\overline{a_j}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},\texttt{DAASeed},\texttt{cnt},sk_{M}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a'_j(x).\\ && \quad\textnormal{let } x_{\mathsf{cre }}=\pi_{1}(x) \textnormal{ in }\textnormal{let } x_{\texttt{tsk}}=\pi_{2}(x) \textnormal{ in }(\\ && \quad\quad!c(y).\textnormal{let } y_{\mathsf{bsn }}=\pi_{1}(y) \textnormal{ in }\textnormal{let } y_{\mathsf{msg }}=\pi_{2}(y) \textnormal{ in }\\ && \quad\quad\textnormal{if } y_{\mathsf{bsn }}=\perp \textnormal{ then }\\ % && \quad\quad\quad\textrm{\sout{$\new{\bsn}.$}}\Out[a_s]{\tuple{\wparams,\textrm{\sout{$\bsn$}} \ybsn,\ymsg,\xcre,\xtsk}}.\In[a'_s]{z}.\Out{z}\\ && \quad\quad\quad\overline{a_s}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},y_{\mathsf{bsn }},y_{\mathsf{msg }},x_{\mathsf{cre }},x_{\texttt{tsk}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a'_s(z).\overline{c}\langle z\rangle\\ && \quad\quad\textnormal{ else }\\ && \quad\quad\quad\overline{a_s}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{chl^+,y_{\mathsf{bsn }}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},y_{\mathsf{msg }},x_{\mathsf{cre }},x_{\texttt{tsk}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a'_s(z).\overline{c}\langle z\rangle\\ && \quad)\mathrel{|}(\\ && \quad\quad \overline{w_b}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_{\mathsf{cre }},x_{\texttt{tsk}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle\\ && \quad)\\ && ))\\ %\end{array} %\] % %\[ %\begin{array}{lcl} \sf{Challenge} &=& \nu\,a_s.\nu\,a'_s\mathrel{.} (\, (\sf{Sign}) \mid (\\ && \quad b_A(x).\textnormal{let } x_{\mathsf{cre }}=\pi_{1}(x) \textnormal{ in }\textnormal{let } x_{\texttt{tsk}}=\pi_{2}(x) \textnormal{ in }\\ && \quad b_B(y).\textnormal{let } y_{\mathsf{cre }}=\pi_{1}(y) \textnormal{ in }\textnormal{let } y_{\mathsf{tsk }}=\pi_{2}(y) \textnormal{ in }\\ && \quad c(z).\textnormal{let } z_{\mathsf{bsn }}=\pi_{1}(z) \textnormal{ in }\textnormal{let } z_{\mathsf{msg }}=\pi_{2}(z) \textnormal{ in }\\ && \quad\textnormal{if } z_{\mathsf{bsn }}=\perp \textnormal{ then }\\ && \quad\quad\overline{a_s}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},z_{\mathsf{bsn }},z_{\mathsf{msg }},\textnormal{diff}[x_{\mathsf{cre }},y_{\mathsf{cre }}],\textnormal{diff}[x_{\texttt{tsk}},y_{\mathsf{tsk }}]}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a'_s(z).\overline{c}\langle z\rangle\\ % && \quad\quad\textrm{\sout{$\new{\bsn}.$}}\Out[a_s]{\tuple{\wparams,\textrm{\sout{$\bsn$}} \zbsn,\zmsg,\diff{\xcre}{\ycre},\diff{\xtsk}{\ytsk}}}.\In[a'_s]{z}.\Out{z}\\ && \quad\textnormal{ else }\\ && \quad\quad\overline{a_s}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\mathsf{params }},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{chl^-,z_{\mathsf{bsn }}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},z_{\mathsf{msg }},\textnormal{diff}[x_{\mathsf{cre }},y_{\mathsf{cre }}],\textnormal{diff}[x_{\texttt{tsk}},y_{\mathsf{tsk }}]}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a'_s(z).\overline{c}\langle z\rangle\\ && )) \end{array}$$ for some constants chl+, chl−.

Biprocess modelling user-controlled anonymity in DAA
**Definition 1** (User-controlled anonymity). *Given a Direct Anonymous Attestation process specification $\langle \sf{Join}, \sf{Sign}\rangle$, *user-controlled anonymity* is satisfied if the augmented Direct Anonymous Attestation biprocess ${\sf DAA}$ satisfies observational equivalence.*
The definition has been used to analyse user-controlled anonymity in RSA-based DAA. # Case study: RSA-based DAA The first concrete Direct Anonymous Attestation scheme was introduced by Brickell, Camenisch & Chen (**Chen04:RSA-DAA?**) and is based on RSA. ## Primitives and building blocks We first recall the details of Camenisch-Lysyanskaya (CL) signatures (**CamenischLysyanskaya03?**; **Lysyanskaya02?**), which form the foundations of RSA-based DAA, and introduce some notational conventions. #### Signature scheme. A CL signature is denoted $\mathsf{clsign}(x_{\mathsf{sk }},x_{\mathsf{prime }},x_{\mathsf{rand }},x_{\mathsf{msg }})$, where $x_{\mathsf{sk }}$ is the secret key, $x_{\mathsf{prime }}$ is a random prime, $x_{\mathsf{rand }}$ is a nonce, and $x_{\mathsf{msg }}$ is a message. The prime and nonce components can be derived from a signature. Verification is standard given a signature, message, and public key, that is, $\mathsf{checkclsign}(\allowbreak\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{msg }},\mathsf{clsign}(x_{\mathsf{sk }},x_{\mathsf{prime }},x_{\mathsf{rand }},\allowbreak x_{\mathsf{msg }})) = \mathsf{accept}$. #### Signature scheme for committed values. The scheme supports signatures on committed values. Given the public part of a signing key $\mathsf{pk}(x_{\mathsf{sk }})$, a message $x_{\mathsf{csk }}$, and commitment factor $x_{\mathsf{cf }}$, the committed value is $U = \mathsf{clcommit}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{cf }},x_{\mathsf{csk }})$ and the associated signature is $\mathsf{clsign}(x_{\mathsf{sk }},y_{\mathsf{prime }},y_{\mathsf{rand }},U)$ for some prime $y_{\mathsf{prime }}$ and random $y_{\mathsf{rand }}$. This signature can be opened to recover $\sigma = \mathsf{clopen}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{cf }},\mathsf{clsign}(x_{\mathsf{sk }},y_{\mathsf{prime }},y_{\mathsf{rand }},U)) = \mathsf{clsign}(x_{\mathsf{sk }},y_{\mathsf{prime }},y_{\mathsf{rand }}\circ x_{\mathsf{cf }},x_{\mathsf{csk }})$, that is, the signature on $x_{\mathsf{csk }}$. (A proof should also be provided to demonstrate that $\sigma$ does not contain a covert channel – such details will be omitted from the model presented here – see Appendix [app-daa-rsa] for further details.) #### Notation for primitives that prove knowledge. Various primitives which prove knowledge of, and relations among, discrete logarithms are used by CL signatures and RSA-based DAA. These primitives will be described using the notation introduced by Camenisch & Stadler (**CamSta97?**). For instance, $$\mathit{PK}\{(\alpha,\beta): N = \mathsf{commit}(\alpha,Z) \wedge U = \mathsf{clcommit}(\mathsf{pk}(sk_I),\alpha,\beta)\}$$ denotes a *“zero-knowledge *P*roof of *K*nowledge of $\alpha,\beta$ such that $N = \mathsf{commit}(\alpha,Z)$ and $U = \mathsf{clcommit}(\mathsf{pk}(sk_I),\alpha,\beta)$ holds."* In the example, the Greek letters in parentheses are used for values about which knowledge is being proved and these values are kept secret by the prover. All other values, that is, those from the Latin alphabet, are known to the verifier. The Fiat-Shamir heuristic (**FS87?**; **PoiSte96?**) allows an interactive zero-knowledge scheme to be converted into a signature scheme. A signature acquired in this way is termed a **S*ignature *P*roof of *K*nowledge* and is denoted, for example, as $\mathit{SPK}\{(\alpha) : N = \mathsf{commit}(\alpha,Z)\}(m)$, where $m$ is a message. #### Proving knowledge of a signature. The signature scheme for committed values can be used to build an anonymous credential system. Given a signature $\sigma = \mathsf{clsign}(x_{\mathsf{sk }},x_{\mathsf{prime }},\allowbreak x_{\mathsf{rand }},x_{\mathsf{csk }})$ and commitment factor $x_{\mathsf{cf }}$, an anonymous credential $\hat\sigma = \mathsf{clcommit}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{cf }},\allowbreak\sigma)$. The zero-knowledge proof of knowledge $$\mathit{PK}\{(x_{\mathsf{csk }},x_{\mathsf{cf }}) : \mathsf{checkclsign}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{csk }},\mathsf{clopen}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{cf }},\hat{\sigma})) = \mathsf{accept}\}$$ can then be used to demonstrate that the anonymous credential $\hat\sigma$ is indeed a commitment to a signature on the message $x_{\mathsf{csk }}$ using commitment factor $x_{\mathsf{cf }}$. The application of these primitives to construct the RSA-based DAA protocol will be considered in the next section. ## Protocol description For the purpose of studying user-controlled anonymity, it is sufficient to consider the join and sign algorithms. Given system parameters $\mathsf{pk}(sk_I)$, $\texttt{bsn}_I$ (that is, the issuer’s public key and basename), the TPM’s secret $\texttt{DAASeed}$, a counter value $\texttt{cnt}$, and the TPM’s endorsement key; the join algorithm (Figure 1) proceeds as follows:

 


c@width 1pt> X@width 1ptc &&

&&
&
&&
&
&&
&
&&
&
&&
&
&

   &
&&
&
&&
&
&

  &

&

  
&
&

  &

&

   &
&
&

  &
&&

RSA-based DAA join algorithm
1. The host computes $\zeta_I = \mathsf{hash}(\mathsf{0},\texttt{bsn}_I)$ and inputs the value to the TPM. The TPM computes secret $\texttt{tsk}= \mathsf{hash}(\mathsf{hash}(\texttt{DAASeed},\mathsf{hash}(\mathsf{pk}(sk_I))),\texttt{cnt},\mathsf{0})$ and derives the commitment $N_I = \mathsf{commit}(\texttt{tsk},\zeta_I)$. The TPM also generates a blinding factor $v'$, which is used to compute the commitment $U = \mathsf{clcommit}(\mathsf{pk}(sk_I),v',\texttt{tsk})$. The trusted platform sends $U,N_I$ to the issuer. 2. The issuer generates a nonce $n_e$ and sends the encrypted nonce to the TPM. The TPM decrypts the ciphertext to recover $n_e$, computes $a_U = \mathsf{hash}(U,n_e)$ and sends $a_U$ to the issuer, therefore authenticating as a trusted platform. (Note that the protocol does not rely on the authentication technique recommended by the Trusted Computing Group.) 3. The trusted platform generates a signature proof of knowledge that the messages $U,N_I$ are correctly formed and sends it to the issuer. 4. The issuer verifies the proof and generates a signature $\mathsf{clsign}(sk_I,e,v'',U)$. The signature is sent to the trusted platform. 5. The trusted platform verifies the signature and opens it to reveal the credential $\texttt{cre}= \mathsf{clsign}(sk_I,e,v' \circ v'',\texttt{tsk})$, that is, the TPM’s secret $\texttt{tsk}$ signed by the issuer. The join algorithm outputs $\texttt{cre},\texttt{tsk}$; which can be provided as input, along with the system parameters, a basename $\texttt{bsn}$, and message $m$, to the sign algorithm. The sign algorithm proceeds as follows. 5. If $\texttt{bsn}= {\perp}$, the host generates a nonce $\zeta$; otherwise, the host computes $\zeta = \mathsf{hash}(\mathsf{0},bsn)$. The host provides the TPM with $\zeta$. The TPM computes the commitment $N_V = \mathsf{commit}(\texttt{tsk},\zeta)$ and generates the anonymous credential $\widehat{\texttt{cre}} = \mathsf{clcommit}(\mathsf{pk}(sk_I),w,\texttt{cre})$ using a nonce $w$. The trusted platform then produces a signature proof of knowledge that $\widehat{\texttt{cre}}$ is a commitment to a valid credential, and that $N_V$ is correctly formed. The sign algorithm outputs the signature proof of knowledge which is sent to the verifier. Intuitively, if a verifier is presented with such a proof, then the verifier is convinced that it is communicating with a trusted platform. ## Equational theory The signature is defined below $$\begin{gathered} \Sigma = \{ \mathsf{accept}, \perp, \mathsf{0}, \mathsf{1}, \mathsf{F}_{\mathsf{join}}, \mathsf{F}_{\mathsf{sign}}, \mathsf{clgetnonce}, \mathsf{clgetprime}, \mathsf{hash}, \mathsf{pk}, \mathsf{commit}, \circ, \\\mathsf{dec}, \mathsf{open}, \mathsf{checkclsign}, \mathsf{checkspk}, \mathsf{clcommit}, \mathsf{clopen}, \mathsf{penc}, \mathsf{spk}, \mathsf{clsign} \} \end{gathered}$$ Functions $\mathsf{accept}$, $\perp$, $\mathsf{0}$, $\mathsf{1}$, $\mathsf{F}_{\mathsf{join}}$, $\mathsf{F}_{\mathsf{sign}}$ are constant symbols; $\mathsf{clgetnonce}$, $\mathsf{clgetprime}$, $\mathsf{hash}$, $\mathsf{pk}$ are unary functions; $\mathsf{commit}$, $\circ$, $\mathsf{dec}$, $\mathsf{open}$ are binary functions; $\mathsf{checkclsign}$, $\mathsf{checkspk}$, $\mathsf{clcommit}$, $\mathsf{clopen}$, $\mathsf{penc}$, $\mathsf{spk}$ are ternary functions; and $\mathsf{clsign}$ is a function of arity four. Since $\mathsf{hash}$ is defined as a unary function, we occasionally write $\mathsf{hash}(x_{\mathsf{plain,1}},\dots,x_{\mathsf{plain,n}})$ to denote $\mathsf{hash}(\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{x_{\mathsf{plain,1}},\dots,x_{\mathsf{plain,n}}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$})$. The equations associated with these functions are defined below.
xx̄xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx̄x̄ $\mathsf{dec}(x_{\mathsf{sk }},\mathsf{penc}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }},x_{\mathsf{plain }})) = x_{\mathsf{plain }}$ $\mathsf{clgetprime}(\mathsf{clsign}(x_{\mathsf{sk }},x_{\mathsf{prime }},x_{\mathsf{rand }},x_{\mathsf{msg }})) = x_{\mathsf{prime }}$ $\mathsf{clgetnonce}(\mathsf{clsign}(x_{\mathsf{sk }},x_{\mathsf{prime }},x_{\mathsf{rand }},x_{\mathsf{msg }})) = x_{\mathsf{rand }}$ $\mathsf{checkclsign}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{msg }},\mathsf{clsign}(x_{\mathsf{sk }},x_{\mathsf{prime }},x_{\mathsf{rand }},x_{\mathsf{msg }})) = \mathsf{accept}$ $\mathsf{open}(x_{\mathsf{rand }},\mathsf{commit}(x_{\mathsf{rand }},x_{\mathsf{plain }})) = x_{\mathsf{plain }}$ $\mathsf{clopen}(x,x_{\mathsf{rand }},\mathsf{clcommit}(x,x_{\mathsf{rand }},x_{\mathsf{plain }})) = x_{\mathsf{plain }}$ $\mathsf{clopen}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }},\mathsf{clsign}(x_{\mathsf{sk }},y_{\mathsf{prime }},y_{\mathsf{rand }},\mathsf{clcommit}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{rand }},x_{\mathsf{msg }})))$ $\mathrel{=}\mathsf{clsign}(x_{\mathsf{sk }},y_{\mathsf{prime }},y_{\mathsf{rand }}\circ x_{\mathsf{rand }},x_{\mathsf{msg }})$
A signature proof of knowledge is encoded in the form $\mathsf{spk}(F,U,V)$, where $F$ is a constant declaring the particular proof in use, $U$ denotes the witness (or private component) of a signature of knowledge, and $V$ defines the public parameters and message being signed. The function $\mathsf{checkspk}$ is used to verify a signature and we define the following equations.
xx̄x̄ $\mathsf{checkspk}(\mathsf{F}_{\mathsf{join}},V,\mathsf{spk}(\mathsf{F}_{\mathsf{join}},(x_{\texttt{tsk}},x_{\mathsf{cf }}),V)) = \mathsf{accept}$ where $V = (x_{\mathsf{\zeta_I }},x_{\mathsf{pk }},\mathsf{commit}(x_{\texttt{tsk}},x_{\mathsf{\zeta_I }}),\mathsf{clcommit}(x_{\mathsf{pk }},x_{\mathsf{cf }},x_{\texttt{tsk}}) ,x_{\mathsf{msg }})$ $\mathsf{checkspk}(\mathsf{F}_{\mathsf{sign}},V,\mathsf{spk}(\mathsf{F}_{\mathsf{sign}},(x_{\texttt{tsk}},x_{\mathsf{cf }}),V)) = \mathsf{accept}$ where $V = (x_{\mathsf{\zeta }}, \mathsf{pk}(x_{\mathsf{sk }}), \mathsf{commit}(x_{\texttt{tsk}},x_{\mathsf{\zeta }}),$ $\mathsf{clcommit}(\mathsf{pk}(x_{\mathsf{sk }}),x_{\mathsf{cf }},\mathsf{clsign}(x_{\mathsf{sk }},x_{\mathsf{prime }},x_{\mathsf{rand }},x_{\texttt{tsk}})), x_{\mathsf{msg }})$
The first equation is used to verify the signature proof of knowledge produced by the trusted platform during the join algorithm and the second is used by a trusted platform during the sign algorithm to assert group membership. ## Model in applied pi The RSA-based DAA process specification is presented in Definition 1. For convenience we abbreviate $c(x).\textnormal{let } x_1=\pi_{1}(x) \textnormal{ in }\dots\ \textnormal{let } x_n=\pi_{n}(x) \textnormal{ in }P$ as $c(x_1,\dots,x_n).P$.
**Definition 1**. *The DAA process specification $\langle \sf{Join}_{\sf RSA}, \sf{Sign}_{\sf RSA} \rangle$ is defined where $$\begin{array}{lcl} \sf{Join}_{\sf RSA} & \hat{=} & a_j(w_{\mathsf{params }},w_{\sf DAASeed},w_{\sf cnt},w_{\mathsf{ek}})\mathrel.\nu\,v'\mathrel.\\ && \textnormal{let } w_{\mathsf{pk }}=\pi_{1}(w_{\mathsf{params }}) \textnormal{ in } \textnormal{let } w_{\mathsf{bsn_I }}=\pi_{2}(w_{\mathsf{params }}) \textnormal{ in }\\ && \textnormal{let } \zeta_I=\mathsf{hash}(\mathsf{0},w_{\mathsf{bsn_I }}) \textnormal{ in } \\ && \textnormal{let } \texttt{tsk}=\mathsf{hash}(\mathsf{hash}(w_{\sf DAASeed},\mathsf{hash}(w_{\mathsf{pk }})),w_{\sf cnt},\mathsf{0}) \textnormal{ in }\\ && \textnormal{let } N_I=\mathsf{commit}(\texttt{tsk},\zeta_I) \textnormal{ in } \\ && \textnormal{let } U=\mathsf{clcommit}(w_{\mathsf{pk }},v',\texttt{tsk}) \textnormal{ in } \\ && \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{N_I,U}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle\mathrel.%\\ c(x)\mathrel.\overline{c}\langle\mathsf{hash}(U,\mathsf{dec}(w_{\mathsf{ek}},x))\rangle\mathrel . %\\ c(y)\mathrel.\nu\,n_t\mathrel.\\ && \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{n_t,\mathsf{spk}(\mathsf{F}_{\mathsf{join}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\texttt{tsk},v'}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\zeta_I,w_{\mathsf{pk }},N_I,U,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{n_t,y}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle\mathrel.c(z)\\ && \textnormal{let } \texttt{cre}=\mathsf{clopen}(w_{\mathsf{pk }},v',z) \textnormal{ in } \\ && \textnormal{if } \mathsf{checkclsign}(w_{\mathsf{pk }},\texttt{tsk},\texttt{cre})=\mathsf{accept} \textnormal{ then }\\ && \overline{a'_j}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\texttt{cre},\texttt{tsk}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle\\[1em] % \sf{Sign}_{\sf RSA} & \hat{=} & a_s(w_{\mathsf{params }},w_{\mathsf{bsn }},w_{\mathsf{msg }},w_{\mathsf{cre }},w_{\sf tsk})\mathrel. \textnormal{let } w_{\mathsf{pk }}=\pi_{1}(w_{\mathsf{params }}) \textnormal{ in }\\ && c(x)\mathrel.\nu\,n_t\mathrel.\nu\,w\mathrel.\\ && \textnormal{if } w_{\mathsf{bsn }}=\perp \textnormal{ then }\\ && \qquad\nu\,\zeta\mathrel.\\ &&\qquad\textnormal{let } \widehat{\texttt{cre}}=\mathsf{clcommit}(w_{\mathsf{pk }},w,w_{\mathsf{cre }}) \textnormal{ in }\\ &&\qquad\textnormal{let } N_V=\mathsf{commit}(w_{\sf tsk},\zeta) \textnormal{ in }\\ &&\qquad\textnormal{let } spk=\mathsf{spk}(\mathsf{F}_{\mathsf{sign}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\sf tsk},w}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\zeta,w_{\mathsf{pk }},N_V,\widehat{\texttt{cre}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{n_t,x,w_{\mathsf{msg }}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}) \textnormal{ in }\\ &&\qquad\overline{a'_s}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\zeta,w_{\mathsf{pk }},N_V,\widehat{\texttt{cre}},n_t,spk}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle \\ && \textnormal{ else }\\ && \qquad\textnormal{let } \zeta=\mathsf{hash}(\mathsf{0},w_{\mathsf{bsn }}) \textnormal{ in }\\ &&\qquad\textnormal{let } \widehat{\texttt{cre}}=\mathsf{clcommit}(w_{\mathsf{pk }},w,w_{\mathsf{cre }}) \textnormal{ in }\\ &&\qquad\textnormal{let } N_V=\mathsf{commit}(w_{\sf tsk},\zeta) \textnormal{ in }\\ &&\qquad\textnormal{let } spk=\mathsf{spk}(\mathsf{F}_{\mathsf{sign}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_{\sf tsk},w}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\zeta,w_{\mathsf{pk }},N_V,\widehat{\texttt{cre}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{n_t,x,w_{\mathsf{msg }}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}) \textnormal{ in }\\ &&\qquad\overline{a'_s}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\zeta,w_{\mathsf{pk }},N_V,\widehat{\texttt{cre}},n_t,spk}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle \end{array}$$*
The join process $\sf{Join}_{\sf RSA}$ is instantiated by inputting the join algorithm’s parameters: the RSA-based DAA system parameters $w_{\mathsf{params }}$; the TPM’s internal secret $w_{\sf DAASeed}$; the counter value $w_{\sf cnt}$ chosen by the host; and the TPM’s endorsement key $w_{\mathsf{ek}}$. The system parameters $w_{\mathsf{params }}$ are expected to be a pair containing the issuer’s public key $w_{\mathsf{pk }}$ and basename $w_{\mathsf{bsn_I }}$. The process constructs the terms $N_I$, $U$ in accordance with the protocol’s description (Section 1.2) and outputs the values to the issuer. The process then receives a ciphertext $x$, which it decrypts, and outputs the hash of the plaintext paired with $U$. A nonce $y$ is then input and a signature proof of knowledge is produced. Finally, the process inputs a signature $z$ on the commitment $U$ and concludes by outputting the attestation identity credential $\texttt{cre}$ and TPM’s secret $\texttt{tsk}$ on the private channel $a_j'$; that is, the $\sf{Join}_{\sf RSA}$ process returns the values $\texttt{cre}$, $\texttt{tsk}$ to the $\sf{Signer^+}$ process. The sign process $\sf{Sign}_{\sf RSA}$ is instantiated by inputting the sign algorithm’s parameters: the RSA-based DAA system parameters $w_{\mathsf{params }}$; the verifier’s basename $w_{\mathsf{bsn }}$; the message $w_{\mathsf{msg }}$ to be signed; the attestation identity credential $w_{\mathsf{cre }}$; and the TPM’s secret $w_{\sf tsk}$. The process recovers the issuer’s public key $w_{\mathsf{pk }}$ from the system parameters, and inputs a nonce $x$ from the verifier. The if-then-else branch models the signer’s ability to produce either linkable or unlinkable signatures, based upon the parameter $w_{\mathsf{bsn }}$; in particular, the if-branch produces an unlinkable signature, whereas the else-branch produces a linkable signature. The process concludes by outputting a signature on the private channel $a_s'$; that is, the $\sf{Sign}_{\sf RSA}$ process returns the signature to the $\sf{Signer^+}$ process. ## Analysis: Violating user-controlled anonymity The Direct Anonymous Attestation process specification $\langle \sf{Join}_{\sf RSA}, \sf{Sign}_{\sf RSA} \rangle$ does not satisfy *user-controlled anonymity* (Theorem 1). This is due to a vulnerability which can be exploited by the following adversaries to violate privacy. 1. Passive adversary. A passive adversary can violate privacy under the assumptions: a) the identity of a trusted platform can be observed during the join algorithm[^1]; b) there exists a basename which is shared between an issuer and a verifier; and c) a signer is willing to accept the same basename from an issuer and verifier. The attack proceeds as follows. We have $\texttt{bsn}_I = \texttt{bsn}$, and since the signer is willing to accept the same basename as input to both the sign and join algorithms we have $\zeta_I = \zeta$, hence $N_I = N_V$. Since the $N_I,N_V$ values are unique for a particular signer and the adversary knows the identity of the trusted platform that produced $N_I$ during the join algorithm; it follows that the signer’s identity can be revealed. 2. Corrupt administrators. Corrupt administrators can violate privacy under the assumption that a signer is willing to accept the same basename from an issuer and verifier. An issuer and verifier can conspire to use the same basename (that is, $\texttt{bsn}_I = \texttt{bsn}$) and since the issuer knows the identity of the trusted platform that produced $N_I$, the identity of the signer can be revealed. The linchpin of these attacks is the willingness of a signer to accept the same basename from an issuer and verifier. This can be justified as follows. Firstly, this mode of operation is not explicitly forbidden by the protocol definition (**Chen04:RSA-DAA?**). Secondly, this behaviour is expected when the issuer and verifier are the same entity, as demonstrated, for example, by Camenisch *et al.* (**Camenisch01?**; **Camenisch02?**) in the *idemix* system. Finally, the signer has insufficient resources to handle such a duty.
**Theorem 1**. *The RSA-based Direct Anonymous Attestation process specification $\langle \sf{Join}_{RSA}, \sf{Sign}_{RSA} \rangle$ does not satisfy user-controlled anonymity.*
Formally, Theorem 1 can be proved by presenting a context $C[\_]$ such that $\textnormal{fst}(C[{\sf DAA_{RSA}}]) \xrightarrow{}^* Q$ and $Q$ can output on some channel $M$, but there is no reduction $\textnormal{snd}(C[{\sf DAA_{RSA}}]) \xrightarrow{}^* Q'$ such that $Q'$ can output on $M$, where both reductions are of the same length and ${\sf DAA_{RSA}}$ is the augmented Direct Anonymous Attestation biprocess derived from $\langle \sf{Join}_{RSA}, \sf{Sign}_{RSA} \rangle$. Such a context is presented in Appendix [app-daa-counter]. In addition to the formal result (Theorem 1), a real-world attack is demonstrated against the RSA-based Direct Anonymous Attestation protocol (**Chen04:RSA-DAA?**) in Appendix [app-daa-no-privacy]. ## Solution: Restoring user-controlled anonymity The protocol can be fixed by refining the definition of $\zeta$; the revised RSA-based Direct Anonymous Attestation process specification $\langle \sf{Join}_{RSA'}, \sf{Sign}_{RSA'} \rangle$ is the same as the original, with $\zeta$ redefined as $\zeta = \mathsf{hash}(\mathsf{1},\texttt{bsn})$. The attacks presented are no longer possible, regardless of whether $\texttt{bsn}_I = \texttt{bsn}$. Furthermore, the revised RSA-based Direct Anonymous Attestation process specification $\langle \sf{Join}_{RSA'}, \sf{Sign}_{RSA'} \rangle$ satisfies user-controlled anonymity; this can be automatically verified using ProVerif (see Appendix [app-daa-thm]). A fix for the concrete scheme (**Chen04:RSA-DAA?**) is presented in Appendix [app-daa-fix]. # Summary This chapter presents a definition of user-controlled anonymity for Direct Anonymous Attestation protocols. The definition is expressed as an equivalence property suitable for automated reasoning. The practicality of the approach is demonstrated by evaluating the RSA-based Direct Anonymous Attestation protocol. This scheme is particularly significant because support is mandated by the TPM specification version 1.2, which has been implemented and deployed in over 300 million computers. The analysis discovers a vulnerability which can be exploited by a passive adversary and, under weaker assumptions, by corrupt administrators. A security fix is identified and the revised protocol is shown to satisfy user-controlled anonymity. The fix only affects the host’s part of the protocol and therefore no hardware changes to the TPM are required. Furthermore, this research appears to have influenced the design of subsequent Direct Anonymous Attestation schemes, for example, the conceptual design of the join algorithm has been revised in (**Chen08:ECC-DAA?**; **Chen09:DAA-security?**). **Automated reasoning**
**The lack of formal security analysis prior to system deployment can be partially attributed to the absence of suitable tools. This part develops new procedures for the automated analysis of observational equivalence.**
# untitled section **\[tex2md\] this section could not be converted; its LaTeX follows verbatim:** `Error at (line 137, column 1): unexpected \vskip expecting \end{document} \end{overview} ^` ``` latex \chapter[Observational equivalence and barriers] {Observational equivalence and barriers\symbolfootnotemark}\label{chap:obs} \symbolfootnotetext{This chapter is partly based upon~\cite{Smyth08:Obs} which introduces the fundamental notion of swapping at synchronisation points and considered a preliminary analysis of privacy in FOO. The software associated with this chapter is available online: \url{http://www.bensmyth.com/proswapper.php}.} %\symbolfootnotetext{This chapter is partly based upon~\cite{Smyth08:Obs,Smyth10:Obs,Smyth10:ObsA}. The %fundamental notion of swapping at synchronisation points was introduced in~\cite{Smyth08:Obs}. %This result was refined and generalised in~\cite{Smyth10:Obs}, a preliminary version of which appears %in Sections~\ref{sec:obs:sync} and~\ref{sec:obs:auto}. The analysis of privacy in FOO (Section~\ref{sec:obs:FOO}) was first considered %in~\cite{Smyth08:Obs}, and automated support was provided by~\cite{Smyth10:ObsA}. The software associated with this chapter is available online: \url{http://www.bensmyth.com/proswapper.php}.} %The notion of \emph{barrier synchronisation} is formalised with %respect to processes and a methodology for automatically verifying %equivalence properties is introduced. The study of barrier %synchronisation in relation to equivalence is particularly %interesting because certain equivalence properties can only be %realised under specific synchronisation assumptions. For example, %privacy preserving protocols typically require %the existence of at least two honest participants whom synchronise %prior to performing certain actions. This particular pre-requisite %can be observed in domains including: electronic voting, Direct %Anonymous Attestation, and anonymity networks. \begin{overview} A procedure for the automated analysis of observational equivalence is delivered. In addition, the notion of barrier synchronisation is characterised for processes. The study of barrier synchronisation in relation to equivalence is particularly interesting because certain equivalence properties can only be realised under specific synchronisation assumptions. In particular, privacy preserving protocols -- including electronic voting schemes, vehicular ad-hoc networking protocols, and anonymity networks -- make such assumptions. The results have been implemented in the tool \emph{ProSwapper}, an extension to ProVerif, and the applicability of this research is demonstrated by analysing vote privacy in electronic voting protocols and privacy in vehicular ad-hoc networks. \end{overview} %Barrier synchronisation is %an important building block for protocol analysis because certain %equivalence properties can only be realised if processes %synchronise their actions in a specific manner. For example, %privacy preserving protocols typically require %the existence of at least two honest participants whom synchronise %prior to performing certain actions. This particular pre-requisite %can be observed in domains including: electronic voting, Direct %Anonymous Attestation, and anonymity networks. \noindent Blanchet, Abadi \& Fournet~\cite{Blanchet04,BlanchetJLAP07} %have developed automatic reasoning techniques which focus on equivalences $P \sim Q$ in which processes $P$ and $Q$ share the same structure and differ only in the choice of terms. Their work introduces the notion of \emph{strong uniformity} (see Section~\ref{sec:obs:proverif}), a sufficient condition for observational equivalence, that has been implemented in ProVerif, an automatic analysis tool for protocols written in the applied pi calculus. Strong uniformity is a sufficient condition for observational equivalence, but it is not necessary. This precludes the automated analysis of certain equivalence properties, as a simple example will demonstrate. \begin{example}\label{ex:obs} The biprocess $P = \Out{\diff{m}{n}}\mid\Out{\diff{n}{m}}$ is observationally equivalent because $\fst{P}\equiv\snd{P}$. However, the plain evaluation context \[ C[\_] = \_ \mid \In{x}.\Letinelse{y}{\Eq{x}{m}}{0}0 \] is such that $C[P] \reduc Q$, where $Q = \Out{\diff{n}{m}}\mid\Letinelse{y}{\Eq{\diff{m}{n}}{m}}{0}0$ and $\fst{Q} \reduc \Out{n}$; but, there is no biprocess $R$ such that $Q \reduc R$ and $\fst{R} \equiv \Out{n}$, because $\fst{\Eq{\diff{m}{n}}{m}}\Downarrow m$, but there is no term $M_2$ such that $\snd{\Eq{\allowbreak\diff{m}{n}}{m}}\Downarrow M_2$. It follows immediately that $P$ does not satisfy Definition~\ref{def:proverif:strong-uniformity}, that is, it cannot be shown to satisfy observational equivalence using Theorem~\ref{theorem:Bruno}. Similarly, the biprocess $(\Ifthenelse{a}{\diff{a}{c}}{\Out{c}}\nill) \mid (\Ifthenelse{b}{\diff{c}{b}}{\Out{c}}\nill)$ satisfies observational equivalence but does not satisfy strong uniformity. \end{example} Barrier synchronisation~\cite{Brooks86:Barriers, Hensgen88:Barriers, Arenstorf89:Barriers, Lubachevsky89:Barriers} is a concept to coordinate the actions performed by concurrently executing processes. More precisely, the mechanism ensures that a process will block, when a barrier is encountered, until all other processes executing in parallel reach this barrier. Capturing such synchronisation is an important building block for protocol analysis because certain security properties can only be realised if processes synchronise their actions in a specific manner. For example, privacy preserving protocols typically require the existence of at least two honest participants that synchronise prior to performing critical actions. This particular prerequisite can be observed in domains including: electronic voting~\cite{DKR08,Backes08:Voting}, %Direct Anonymous Attestation~\cite{Chen04:RSA-DAA,Chen09:DAA-security} (see also Chapter~\ref{chap:DAA}), vehicular ad-hoc networks~\cite{Delaune10:Vanets}, and anonymity networks~\cite{RR98,Pfitzmann01,Chothia06:Mute}. Resolving the difficulties apparent in Example~\ref{ex:obs} is relatively straightforward: the biprocess $P' = \Out{\diff{m}{m}}\mid\Out{\diff{n}{n}}$ can trivially be shown to satisfy observational equivalence using strong uniformity as a proof technique, and since $\fst{P} \equiv \fst{P'}$ and $\snd{P} \equiv \snd{P'}$, it follows that $P$ satisfies observational equivalence because observational equivalence is closed under structural equivalence. However, this technique cannot be applied to more complicated examples in which barriers occur. \begin{example} \label{ex:newExample} Consider the biprocess $$ P = \Out{m}.\sstage{1}\Out{\diff{m}{n}} \mid \sstage{1}\Out{\diff{n}{m}} $$ in which $\sstage{1}$ represents a barrier synchronisation. Intuitively, there is no structurally equivalent biprocess $P'$ satisfying strong uniformity, but nevertheless, barrier synchronisation ensures indistinguishability between $\fst{P}$ and $\snd{P}$. (This example will be elaborated upon once we formalise barrier synchronisation.) \end{example} This chapter introduces a strictly weaker notion of uniformity which can be used to automatically reason with observational equivalence between processes containing barriers. %\textcolor{red}{\bf They also study a different notion of synchronisation called %\emph{stages}~\cite[\S8]{BlanchetJLAP07}.} \contribution The contribution of this chapter is threefold. Firstly, the process syntax (Section~\ref{sec:obs:proverif}) is extended to capture barriers and it is shown how the semantic behaviour of barriers can be encoded in the standard ProVerif model. Although the formalisation of barriers is only an encoding, it considerably simplifies the modelling process and, moreover, forms the foundation for our automated analysis technique. Secondly, a methodology for automatic analysis of equivalence properties is developed, based upon~\cite{Blanchet04,BlanchetJLAP07}. This approach avoids the limitations of~\cite{Blanchet04,BlanchetJLAP07} by \emph{swapping} data at synchronisation points. For example, in Example~\ref{ex:newExample} swapping data between the two sides of the parallel composition is permitted at synchronisation; in essence, it is therefore sufficient to prove the equivalence of the biprocess $P' = \Out{m}.\sstage{1}.\Out{\diff{m}{m}}\mid\sstage{1}\Out{\diff{n}{n}}$, which is trivially true because $\fst{P'}=\snd{P'}$. Finally, automated support is provided by defining a static compiler which encodes barrier synchronisation and swapping using private channel communication. The compiler is designed to compute an approximation of a process's observable behaviour, and hence, if ProVerif can show observational equivalence between a pair of compiled processes, then the original pair of processes satisfies observational equivalence. The compiler has been implemented as a tool called \emph{ProSwapper}. Furthermore, the analysis of vote privacy in electronic voting protocols and privacy in vehicular ad-hoc networks demonstrate the applicability of this work. \limitations Proving soundness of the proof technique is ongoing work. Although some confidence may be provided by the tool's adoption within the research community (for example, \cite{Backes08:Voting,Delaune10:Vanets}), this is no substitute for a thorough proof. %...... will be discussed in Section~\ref{sec:further:obs}. \structure %\sout{Section~\ref{sec:obs:proverif} recalls the variant of the applied pi calculus introduced by~XX.} Section~\ref{sec:obs:sync} extends the process syntax of Section~\ref{sec:obs:proverif} to capture barrier synchronisation and provides mechanical reasoning techniques for such processes. Section~\ref{sec:obs:auto} defines a methodology for automatic analysis of equivalence properties. In Section~\ref{sec:obs:example} the applicability of this work is demonstrated by presenting an automated analysis of privacy in the electronic voting protocol FOO and in Appendix~\ref{app:obs:src} privacy in vehicular ad-hoc networks is considered; the technique's adoption by the research community will also be discussed. %The applicability of this work is demonstrated in Section~\ref{sec:obs:example} %by presenting the first automated analysis of privacy in the %electronic voting protocol FOO and highlighting the techniques %adoption by the academic community. %In addition, barrier synchronisation %is used in Chapter~\ref{chap:DAA} to ....... %Limitations of the approach %are discussed in Section~\ref{sec:further:obs}. Finally, a summary is presented in Section~\ref{sec:obs:summary}. %The notion of \emph{barrier synchronisation} is formalised with %respect to processes %A methology for capturing barrier synchronisation is introduced. This is a particularly important mechanism for privacy preserving protocols, because %Reasoning with equivalence properties has proven to be %This chapter explicitly focuses on %equivalence properties that can only be realised if participants synchronise %their actions in a specific manner. %Some equivalence properties can only be realised if processes %synchronise their actions in a specific manner. For example, %\input{obs-prelims} \newcommand{\ch}{{\sf c}} \newcommand{\Ch}{{\sf a}} ``` # Processes with barriers A notion of synchronisation, called *stages*, has previously been studied in the applied pi calculus by Blanchet, Abadi & Fournet (**BlanchetJLAP07?**); however, stages are insufficient for our purposes. In the spirit of (**BlanchetEquiv07?**; **DRS08?**)(**BlanchetJLAP07?**), we proceed by allowing processes to be annotated with *barriers*. Barriers are written $t\textnormal{::}\,$ and may appear before a process $P$, where $t\in\mathbb{N}$. Intuitively, $t\textnormal{::}\,P$ blocks $P$ until all processes running in parallel are ready to synchronise at barrier $t$. For example, the process $1\textnormal{::}\,\overline{c}\langle k\rangle.2\textnormal{::}\,\overline{c}\langle m\rangle\mid2\textnormal{::}\,\overline{c}\langle n\rangle$ can only output $n$ after synchronisation at barrier $t=2$. It follows that the process cannot output $n$ without having previously output $k$; this is in direct contrast with (**BlanchetJLAP07?**), which permits the output of $n$ without having previously observed an output of $k$. Formally, the number of barriers which must be reached is computed statically, in advance of execution, and thus branching behaviour may cause blocking. For example, the process $c(x).\textnormal{if } x=k \textnormal{ then } 1\textnormal{::}\,\overline{c}\langle m\rangle \textnormal{ else }\overline{c}\langle n\rangle\mid1\textnormal{::}\,\overline{c}\langle s\rangle$ may evolve to $\overline{c}\langle n\rangle\mid1\textnormal{::}\,\overline{c}\langle s\rangle$ which can never output $s$ because synchronisation at barrier $t=1$ requires two processes to synchronise. Barriers are assumed to be ordered; that is, given $t\textnormal{::}\,P$ the process $P$ also blocks if there are any barriers $t'$ such that $t'[sec:obs:auto]. The *barrier elimination function* (Definition 1) takes processes containing barriers and replaces each barrier with a message output followed by a message input[^2]. By ensuring that the communication channels are fresh private names and through the introduction of a *synchronisation process*, the semantics of SECTION BLAHbarriers can be captured in the standard ProVerif model.
**Definition 1** (Barrier elimination function). *The *barrier elimination function* $\delta$ maps an infinite sequence of channel names ${\Ch}$ and a process $P$ to another process, the function is recursively defined as follows: $$\begin{array}{lcl} \delta(\ch,\;0) &=& 0\\ \delta(\ch,\;!Q) &=& !Q \\ \delta(\ch,\;\nu\,n.Q) &=& \nu\,n.\delta(\ch,\;Q)\\ \delta(\ch,\;M(x).Q) &=& M(x).\delta(\ch,\;Q)\\ \delta(\ch,\;\overline{M}\langle N\rangle.Q) &=& \overline{M}\langle N\rangle.\delta(\ch,\;Q)\\ \delta(\ch,\;t\textnormal{::}\,Q) &=& \overline{a'}\langle a'\rangle.a''(y).\delta(\mathsf{tail}(\mathsf{tail}(\ch)),\;Q)\\ &&\textrm{where $a' = \mathsf{head}(\ch)$, $a'' = \mathsf{head}(\mathsf{tail}(\ch))$ and $y\not\in\textnormal{fv}(Q)$}\\ \delta(\ch,\;\textnormal{let } x=D \textnormal{ in } Q \textnormal{ else }R) &=& \textnormal{let } x=D \textnormal{ in } \delta(\mathsf{odd}(\ch),\;Q) \textnormal{ else }\delta(\mathsf{even}(\ch),\;R)\\ % && \qquad\quad\;\; \Else \compFuncI{\even{\ch}}{R}\\ \delta(\ch,\;Q \mid R) &=& \delta(\mathsf{odd}(\ch),\;Q) \mid \delta(\mathsf{even}(\ch),\;R) \end{array}$$*
Intuitively, processes which synchronise at a particular barrier all output a message on a private channel and these messages are received by the synchronisation process; once all messages have been sent/received, the synchronisation process sends replies to each of the processes and hence processes may proceed. For example, in the case where there are $n$ processes containing a barrier $t$, the synchronisation process will receive precisely $n$ inputs and will then send exactly $n$ responses; prior to the responses being sent, the processes are awaiting input on a private channel and hence block. The application of the barrier elimination function will be demonstrated in Example 1; first, we study how to control the synchronisation. To ensure that the correct pair of channel names are used for synchronisation we first define the function $\omega$ which captures the set of channel names introduced for synchronisation (Definition 2). The functions $\omega$, $\delta$ are logically similar and separation has only been introduced for readability. The function $\omega$ builds a set of triples $(t,a',a'')$, where $t\in\mathbb{N}$ represents a barrier synchronisation and $a'$ (respectively $a''$) are the output (respectively input) channels used by $\delta$ for synchronisation at barrier $t$.
**Definition 2** (Synchronisation channels). *Given a process $P$ and an infinite sequence of channel names ${\Ch}$, the set of *synchronisation channels* is $\omega({\Ch},\;P)$, where: $$\begin{array}{lcl} \omega(\ch,\;0) &=& \emptyset\\ \omega(\ch,\;!Q) &=& \emptyset\\ \omega(\ch,\;\nu\,n.Q) &=& \omega(\ch,\;Q)\\ \omega(\ch,\;M(x).Q) &=& \omega(\ch,\;Q)\\ \omega(\ch,\;\overline{M}\langle N\rangle.Q) &=& \omega(\ch,\;Q)\\ \omega(\ch,\;t\textnormal{::}\,Q) &=& \{(t,a',a'')\} \cup \omega(\mathsf{tail}(\mathsf{tail}(\ch)),\;Q)\\ && \textrm{where $a' = \mathsf{head}(\ch)$ and $a'' = \mathsf{head}(\mathsf{tail}(\ch))$}\\ \omega(\ch,\;\textnormal{let } x=D \textnormal{ in } Q \textnormal{ else }R) &=& \omega(\mathsf{odd}(\ch),\;Q) \cup \omega(\mathsf{even}(\ch),\;R)\\ \omega(\ch,\;Q \mid R) &=& \omega(\mathsf{odd}(\ch),\;Q) \cup \omega(\mathsf{even}(\ch),\;R) \end{array}$$*
We introduce *communication* processes, defined by the grammar $R ::= \epsilon \mid u(x) \mid \overline{u}\langle M\rangle \mid R.R'$, such that $\epsilon.R = R$. We omit $R$ in $u(x).R$ and $\overline{u}\langle M\rangle.R$ when it is $\epsilon$. Given communication processes, synchronisation is controlled by a synchronisation process.
**Definition 3** (Synchronisation process). *Given a process $P$ and an infinite sequence of channel names ${\Ch}$, the *synchronisation process* is $\chi({\Ch},P) = \hat{\chi}(0,\;\epsilon,\;\omega({\Ch},\;P))$, where for all integers $t$, communication processes $R$ and sets of triples $S$, we have: $$\hat{\chi}(t,\;R,\;S) = \left\{\begin{array}{lcl} R.0 &\quad& \textrm{if $S = \emptyset$}\\[1em] a'(x).\hat{\chi}(t,\;R.\overline{a''}\langle x\rangle,\;S\backslash\{(t,a',a'')\}) && \textrm{if $(t,a',a'') \in S$}\\ \;\textrm{where $x$ is a fresh variable}\\[1em] R.\hat{\chi}(t+1,\;\epsilon,\;S) && \textrm{otherwise} \end{array}\right.$$*
Although communication processes are not standard processes (that is, defined by the grammar in Figure [fig:obs:grammar]), the function $\chi$ always returns a standard process; this process is intended to control synchronisation of a process $P$ in which barriers have been eliminated. Accordingly, $\hat\chi$ is parametrised with $S = \omega({\Ch},\;P)$, that is, the set of triples $(t,a',a'')$ defining the input and output channels used by $\delta$ to eliminate barriers. For each barrier $t$, an input $a'(x)$ is appended to the output, and the function is recursively called with $R.\overline{a''}\langle x\rangle$ and $S\backslash\{(t,a',a'')\}$. Once all barriers under a particular barrier $t$ have been exhausted, the process $R$ is appended to the output and the barriers under the next barrier $t+1$ are processed. It follows, for example, given $n$ processes in parallel all containing a barrier $t$ (and no other barriers), that the synchronisation process is $a_1(x_1).\dots.a_n(x_n).\overline{b_1}\langle x_1\rangle.\dots.\overline{b_n}\langle x_n\rangle$ for some channel names $a_1,\dots,a_n,b_1,\dots,b_n$ and variables $x_1,\dots,x_n$. A more complex example will be considered in Example 1. Finally, a process defined in the standard ProVerif language can be derived using our compiler (Definition 4) and ProVerif can then be used to automatically reason with processes containing barriers.
**Definition 4** (Synchrony compiler). *The *synchrony compiler* $\Delta$ maps a process $P$ to another process, as follows: $\Delta(P) = \nu\,\tilde{a}.(\delta({\Ch},\;P) \mid \chi({\Ch},P))$, where ${\Ch}$ is an infinite sequence of distinct channel names such that ${\Ch} \cap (\textnormal{fn}(P)\cup\textnormal{bn}(P)) = \emptyset$ and $\tilde{a} = \textnormal{fn}(\delta({\Ch},\;P)) \mathrel{\cap} {\Ch}$.*
The application of our compiler is demonstrated in Example 1.
**Example 1**. *Consider the process $1\textnormal{::}\,\overline{c}\langle k\rangle.2\textnormal{::}\,\overline{c}\langle m\rangle\mid2\textnormal{::}\,\overline{c}\langle n\rangle\mid3\textnormal{::}\,\overline{c}\langle s\rangle$ and let ${\Ch} = (a_1,a_2,\dots)$. We have:*
*XXXXXxX̄XxX̄X̄ $\delta({\Ch},\;P)$$=$$\delta((a_1,a_3,\dots),\;1\textnormal{::}\,\overline{c}\langle k\rangle.2\textnormal{::}\,\overline{c}\langle m\rangle) \mid \delta((a_2,a_4,\dots),\;2\textnormal{::}\,\overline{c}\langle n\rangle\mid3\textnormal{::}\,\overline{c}\langle s\rangle)$ $=$ $\overline{a_1}\langle a_1\rangle.a_3(x).\delta((a_5,a_7,\dots),\;\overline{c}\langle k\rangle.2\textnormal{::}\,\overline{c}\langle m\rangle) \mid$ $\qquad \delta((a_2,a_6,\dots),\;2\textnormal{::}\,\overline{c}\langle n\rangle) \mid \delta((a_4,a_8,\dots),\;3\textnormal{::}\,\overline{c}\langle s\rangle)$ $=$ $\overline{a_1}\langle a_1\rangle.a_3(x).\overline{c}\langle k\rangle.\delta((a_5,a_7,\dots),\;2\textnormal{::}\,\overline{c}\langle m\rangle) \mid$ $\qquad \overline{a_2}\langle a_2\rangle.a_6(y).\delta((a_{10},a_{14},\dots),\;\overline{c}\langle n\rangle) \mid \overline{a_4}\langle a_4\rangle.a_8(z).\delta((a_{12},a_{16},\dots),\;\overline{c}\langle s\rangle)$ $=$ $\overline{a_1}\langle a_1\rangle.a_3(x).\overline{c}\langle k\rangle.\overline{a_5}\langle a_5\rangle.a_7(x').\delta((a_9,a_{11},\dots),\;\overline{c}\langle m\rangle) \mid$ $\qquad \overline{a_2}\langle a_2\rangle.a_6(y).\overline{c}\langle n\rangle\mid\overline{a_4}\langle a_4\rangle.a_8(z).\overline{c}\langle s\rangle$ $=$ $\overline{a_1}\langle a_1\rangle.a_3(x).\overline{c}\langle k\rangle.\overline{a_5}\langle a_5\rangle.a_7(x').\overline{c}\langle m\rangle\mid \overline{a_2}\langle a_2\rangle.a_6(y).\overline{c}\langle n\rangle\mid\overline{a_4}\langle a_4\rangle.a_8(z).\overline{c}\langle s\rangle$*
*XXXXXxX̄XxX̄X̄ $\omega({\Ch},\;P)$ $=$ $\omega((a_1,a_3,\dots),\;1\textnormal{::}\,\overline{c}\langle k\rangle.2\textnormal{::}\,\overline{c}\langle m\rangle) \cup \omega((a_2,a_4,\dots),\;2\textnormal{::}\,\overline{c}\langle n\rangle\mid3\textnormal{::}\,\overline{c}\langle s\rangle)$ $=$ $\{(1,a_1,a_3)\} \cup \omega((a_5,a_7,\dots),\;\overline{c}\langle k\rangle.2\textnormal{::}\,\overline{c}\langle m\rangle) \mathrel{\cup}$ $\qquad \omega((a_2,a_6,\dots),\;2\textnormal{::}\,\overline{c}\langle n\rangle) \cup \omega((a_4,a_8,\dots),\;3\textnormal{::}\,\overline{c}\langle s\rangle)$ $=$ $\{(1,a_1,a_3),(2,a_2,a_6),(3,a_4,a_8)\} \cup \omega((a_5,a_7,\dots),\;2\textnormal{::}\,\overline{c}\langle m\rangle) \mathrel{\cup}$ $\qquad \omega((a_{10},a_{14},\dots),\;\overline{c}\langle n\rangle) \cup\omega((a_{12},a_{16},\dots),\;\overline{c}\langle s\rangle)$ $=$ $\{(1,a_1,a_3),(2,a_5,a_7),(2,a_2,a_6),(3,a_4,a_8)\} \cup \omega((a_9,a_{11},\dots),\;\overline{c}\langle m\rangle)$ $=$ $\{(1,a_1,a_3),(2,a_5,a_7),(2,a_2,a_6),(3,a_4,a_8)\}$*
*XXXXXxX̄XxX̄X̄ $\chi({\Ch},P)$ $=$$\hat{\chi}(1,\;\epsilon,\;\{(1,a_1,a_3),(2,a_5,a_7),(2,a_2,a_6),(3,a_4,a_8)\})$ $=$ $a_1(x).\hat{\chi}(1,\;\overline{a_3}\langle x\rangle,\;\{(2,a_5,a_7),(2,a_2,a_6),(3,a_4,a_8)\})$ $=$ $a_1(x).\overline{a_3}\langle x\rangle.\hat{\chi}(2,\;\epsilon,\;\{(2,a_5,a_7),(2,a_2,a_6),(3,a_4,a_8)\})$ $=$ $a_1(x).\overline{a_3}\langle x\rangle.a_5(x').\hat{\chi}(2,\;\overline{a_7}\langle x'\rangle,\;\{(2,a_2,a_6),(3,a_4,a_8)\})$ $=$ $a_1(x).\overline{a_3}\langle x\rangle.a_5(x').a_2(y).\hat{\chi}(2,\;\overline{a_7}\langle x'\rangle.\overline{a_6}\langle y\rangle,\;\{(3,a_4,a_8)\})$ $=$ $a_1(x).\overline{a_3}\langle x\rangle.a_5(x').a_2(y).\overline{a_7}\langle x'\rangle.\overline{a_6}\langle y\rangle.\hat{\chi}(3,\;\epsilon,\;\{(3,a_4,a_8)\})$ $=$ $a_1(x).\overline{a_3}\langle x\rangle.a_5(x').a_2(y).\overline{a_7}\langle x'\rangle.\overline{a_6}\langle y\rangle.a_4(z).\hat{\chi}(3,\;\overline{a_8}\langle z\rangle,\;\emptyset)$ $=$ $a_1(x).\overline{a_3}\langle x\rangle.a_5(x').a_2(y).\overline{a_7}\langle x'\rangle.\overline{a_6}\langle y\rangle.a_4(z).\overline{a_8}\langle z\rangle$*
*Observe ${\Ch} \cap (\textnormal{fn}(P)\cup\textnormal{bn}(P)) = \emptyset$, $\tilde{a} = a_1,\dots,a_8$ and hence it follows that $\Delta(P)$ is defined as the process: $$\begin{gathered} \nu\,\tilde{a}.(\overline{a_1}\langle a_1\rangle.a_3(x).\overline{c}\langle k\rangle.\overline{a_5}\langle a_5\rangle.a_7(x').\overline{c}\langle m\rangle\mid \overline{a_2}\langle a_2\rangle.a_6(y).\overline{c}\langle n\rangle\mid\overline{a_4}\langle a_4\rangle.a_8(z).\overline{c}\langle s\rangle \mid \\ a_1(x).\overline{a_3}\langle x\rangle.a_5(x').a_2(y).\overline{a_7}\langle x'\rangle.\overline{a_6}\langle y\rangle.a_4(z).\overline{a_8}\langle z\rangle) \end{gathered}$$ By inspection we can observe that the process enforces the expected behaviour; that is, the name $k$ must be output before $m$, $n$ and $s$. This can be witnessed by annotating the process with events and analysing using ProVerif (see Appendix [app:obs:src2]).*
Since the application of our compiler to a process provides a sound approximation of the process’s observable behaviour, it is a suitable proof technique for reasoning with processes containing barriers.
**Theorem 1**. *Given a process $P$, if $\Delta(P)$ is strongly uniform, then $P$ satisfies synchronous observational equivalence.*
The proof of Theorem 1 follows immediately from Theorem [thm:stageElimSwap]. We will now revisit Example [ex:newExample] to show why uniformity is an insufficient proof technique to prove observational equivalence of certain biprocesses containing barriers.
**Example 2**. *Recall the biprocess $P = \overline{c}\langle m\rangle.1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[m,n]\rangle \mid 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[n,m]\rangle$ from Example [ex:newExample]. The process $\Delta(P)$ is uniform, but $\Delta(P) \xrightarrow{}^* Q$ where $Q = \overline{c}\langle\textnormal{diff}[m,n]\rangle \mid \overline{c}\langle\textnormal{diff}[n,m]\rangle$, and $Q$ is not uniform.*
The next section introduces a new proof techniquemethodology to overcome this limitation of uniformity as a proof technique for observational equivalence.   (1,0)350 **Comments on the recent work in Paris.** - Unfortunately, the results conjectured in Paris do not hold because of the outputs introduced to handle branching. - Note that this also means the condition is sufficient, but not necessary, in the general hand-based reasoning case.
**Lemma 1**. *Given biprocess $P$, we have $\textnormal{fst}(P) \sim_T \textnormal{fst}(\Delta(P))$ and $\textnormal{snd}(P) \sim_T \textnormal{snd}(\Delta(P))$.*
**Theorem 2**. *Given biprocess $P$, we have $P$ satisfies synchronous observational equivalence iff $\Delta(P)$ satisfies observational equivalence.*
(1,0)350 # Automated reasoning for equivalence In this section, the compiler (Section [sec:obs:sync]) is extended to overcome the limitations of strong uniformity as a proof technique. This can be achieved in a static manner by *swapping* data between processes which share the same structure, as will now be demonstrated.
**Example 1**. *Recall the biprocess $P = \overline{c}\langle\textnormal{diff}[m,n]\rangle\mid\overline{c}\langle\textnormal{diff}[n,m]\rangle$ from Example [ex:obs] and observe that $P = R\sigma \mid R\tau$, where $R = \overline{c}\langle x\rangle$, $\sigma = \{\textnormal{\raisebox{2pt}{\footnotesize $\textnormal{diff}[m,n]$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$ and $\tau = \{\textnormal{\raisebox{2pt}{\footnotesize $\textnormal{diff}[n,m]$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x$}}\}$. By extending $\textnormal{diff}$ to substitutions, the process $Q = R\, \textnormal{diff}[\sigma,\tau] \mid R\,\textnormal{diff}[\tau,\sigma]$ is such that $\textnormal{fst}(P) \equiv \textnormal{fst}(Q)$ and $\textnormal{snd}(P) \equiv \textnormal{snd}(Q)$; that is, the biprocess $Q$ preserves the underlying structure of $P$. It follows immediately that $\textnormal{fst}(P) \sim \textnormal{fst}(Q)$ and $\textnormal{snd}(P) \sim \textnormal{snd}(Q)$. Furthermore, $Q$ satisfies strong uniformity and hence $P$ satisfies observational equivalence by transitivity.*
This approach can be generalised to swapping data between sub-processes which share the same structure under the same barrier, since the semantics of barriers provide certain guarantees about dynamic process behaviour.
**Example 2**. *Recall the biprocess $P = \overline{c}\langle m\rangle.1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[m,n]\rangle \mid 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[n,m]\rangle$ from Example [ex:newExample]~~Intuitively, $P$ can only reduce to $R = 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[m,n]\rangle \mid 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[n,m]\rangle$ in one step.~~ and observe that for all biprocesses $R$ such that $P\xrightarrow{}R$, we have $R = 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[m,n]\rangle \mid 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[n,m]\rangle$.. Intuitively, $P$ can only reduce to $R = 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[m,n]\rangle \mid 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[n,m]\rangle$ in one step. Now consider the biprocess $Q = \overline{c}\langle m\rangle.1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[m,m]\rangle \mid 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[n,n]\rangle$ which is obtained from $P$ by swapping the second components of the $\textnormal{diff}$ operator. It follows that $\textnormal{fst}(\Delta(P)) \sim \textnormal{fst}(\Delta(Q))$ and $\textnormal{snd}(\Delta(P)) \sim \textnormal{snd}(\Delta(Q))$. Now since $\Delta(Q)$ trivially satisfies strong uniformity, $\Delta(P)$ satisfies observational equivalence by transitivity. Need to clarify exactly what result we get – we want $P$ satisfies observational equivalence*
These examples intuitively demonstrate the notion of swapping, and, moreover, its application for automatically proving observational equivalence. The remainder of this section will formalise swapping as an extension to our compiler. The revised barrier elimination function permits the possibility of swapping during synchronisation. In particular, at the start of each barrier synchronisation, all free names and variables under that barrier (in our formalism this will include those names and variables bound previously) are output and a possibly distinct set of names and variables are subsequently input. This behaviour is fully captured by renaming the names and variables under that barrier in accordance with the binder used for the aforementioned input (Definition 1). By ensuring that swapping occurs in a suitable manner, a soundan approximation of a process’s observational behaviour can be derived; this will be achieved by the introduction of a *swapping process*. Before presenting the formal definition of our revised barrier elimination function $\delta'$, we provide an intuitive example of how $\delta'$ works without swapping.
**Example 3**. *Recall the process $\Delta(P)$ from Example [ex:compiler], where $P = 1\textnormal{::}\,\overline{c}\langle k\rangle.2\textnormal{::}\,\overline{c}\langle m\rangle\mid2\textnormal{::}\,\overline{c}\langle n\rangle\mid3\textnormal{::}\,\overline{c}\langle s\rangle$. Let ${\Ch} = (a_1,a_2,\dots)$ and consider the process $Q = \nu\,a_1,\dots,a_8.(\delta'({\Ch},P) \mid \chi({\Ch},P))$. We have $\delta'({\Ch},P)$ defined as follows: $$\begin{gathered} \overline{a_1}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c,k,m}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a_3(x).\overline{\pi_{1}(x)}\langle\pi_{2}(x)\rangle.\overline{a_5}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(x),\pi_{3}(x)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a_7(x').\overline{\pi_{1}(x')}\langle\pi_{2}(x')\rangle\mathrel{\mid}\\ \overline{a_2}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c,n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a_6(y).\overline{\pi_{1}(y)}\langle\pi_{2}(y)\rangle\mid\overline{a_4}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c,s}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a_8(z).\overline{\pi_{1}(z)}\langle\pi_{2}(z)\rangle \end{gathered}$$ In this instance, observe $\Delta(P) \sim Q$, which can be witnessed using ProVerif (see Appendix [app:obs:src2]).*
**Definition 1** (Barrier elimination function with swapping). *The *barrier elimination function with swapping* $\delta'$ maps an infinite sequence of channel names ${\Ch}$ and a process $P$ to another process, as follows, $\delta'({\Ch},P) = \hat{\delta'}({\Ch},\;\tau,\;P)$ for the substitution $\tau = \{\}$ (that is, the empty substitution), where: $$\begin{array}{lcl} \hat{\delta'}(\ch,\;\sigma,\;0) &=& 0\\ \hat{\delta'}(\ch,\;\sigma,\;!Q) &=& !Q\sigma \\ \hat{\delta'}(\ch,\;\sigma,\;\nu\,n.Q) &=& \nu\,n.\hat{\delta'}(\ch,\;\{ \textnormal{\raisebox{2pt}{\footnotesize $z$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u$}} \mid \{\textnormal{\raisebox{2pt}{\footnotesize $z$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u$}}\} \in \sigma \textrm{ and } u \not= n\},\;Q)\\ \hat{\delta'}(\ch,\;\sigma,\;M(x).Q) &=& M\sigma(x).\hat{\delta'}(\ch,\;\{ \textnormal{\raisebox{2pt}{\footnotesize $z$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u$}} \mid \{\textnormal{\raisebox{2pt}{\footnotesize $z$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u$}}\} \in \sigma \textrm{ and } u \not= x\},\;Q)\\ \hat{\delta'}(\ch,\;\sigma,\;\overline{M}\langle N\rangle.Q) &=& \overline{M}\langle N\rangle\sigma.\hat{\delta'}(\ch,\;\sigma,\;Q)\\ \hat{\delta'}(\ch,\;\sigma,\;t\textnormal{::}\,Q) &=& \overline{a'}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{u_1,\dots,u_l}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma\rangle.a''(y).\hat{\delta'}(\mathsf{tail}(\mathsf{tail}(\ch)),\;\tau,\;Q)\\ &&\textrm{where $a' = \mathsf{head}(\ch)$, $a'' = \mathsf{head}(\mathsf{tail}(\ch))$ and} \\ && \tau = \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{1}(y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u_1$}},\dots,\textnormal{\raisebox{2pt}{\footnotesize $\pi_{l}(y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u_l$}}\} \textrm{ for some names}\\ && \textrm{and variables $u_1,\dots,u_l$, $y$ such that}\\ && \textnormal{fn}(Q) \cup \textnormal{fv}(Q) = u_1,\dots,u_l \textrm{ and } y\not\in\textnormal{fv}(Q)\\ % % Note in- and else-branches have different substitutions % \hat{\delta'}(\ch,\;\sigma,\;\textnormal{let } x=D \textnormal{ in } Q \textnormal{ else }R) &=& \textnormal{let } x=D\sigma \textnormal{ in }\hat{\delta'}(\mathsf{odd}(\ch),\;\tau,\;Q)\\ && \qquad \qquad \textnormal{ else }\hat{\delta'}(\mathsf{even}(\ch),\;\sigma,\;R)\\ && \textrm{where $\tau = \{ \textnormal{\raisebox{2pt}{\footnotesize $z$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u$}} \mid \{\textnormal{\raisebox{2pt}{\footnotesize $z$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u$}}\} \in \sigma \textrm{ and } u \not= x\}$}\\ \hat{\delta'}(\ch,\;\sigma,\;Q \mid R) &=& \hat{\delta'}(\mathsf{odd}(\ch),\;\sigma,\;Q) \mid \hat{\delta'}(\mathsf{even}(\ch),\;\sigma,\;R) \end{array}$$*
By definition of the barrier elimination function, at the start of each barrier synchronisation a process outputs all of the free names and variables under that barrier. The synchronisation process (Definition [def:syncFunc]) would simply return these values, as demonstrated in Example 3. Intuitively, however, it is possible to swap values between sub-processes which share the same structure under a particular barrier. Since this preserves the underlying structure of the biprocesses, it is useful for proofs of observational equivalence. In order to track which processes may swap data, the function $\omega$ is modified: $$\begin{array}{lcl} \omega(\ch,\;t\textnormal{::}\,Q) &=& \{(t,\;a',\;a'',\;\hat{\delta'}(\hat\ch,\;\sigma,\;Q))\} \cup \omega(\hat\ch,\;Q) \end{array}$$ where $a' = \mathsf{head}(\ch)$, $a'' = \mathsf{head}(\mathsf{tail}(\ch))$, $\hat\ch = \mathsf{tail}(\mathsf{tail}(\ch))$ and $\sigma = \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{1}(y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u_1$}},\dots,\textnormal{\raisebox{2pt}{\footnotesize $\pi_{l}(y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $u_l$}}\}$ for some names and variables $u_1,\dots,u_l,y$ such that $\textnormal{fn}(Q) \cup \textnormal{fv}(Q) = u_1,\dots,u_l$ and $y\not\in\textnormal{fv}(Q)$. For simplicity, this definition, and Definition 1, assume there is exactly one tuple of names and variables $u_1,\dots,u_l,y$ such that $\textnormal{fn}(Q) \cup \textnormal{fv}(Q) = u_1,\dots,u_l$ and $y\not\in\textnormal{fv}(Q)$; that is, the same names and variables are used by the functions $\omega$ and $\delta'$. The *swapping process* (Definition 2) is similar to the synchronisation process, but considers all possible swapping strategies in addition to synchronisation. In particular, the function $\bar{\chi}$ is introduced for this purpose. More precisely, sub-processes under a particular barrier are permitted to swap if they are syntactically equal. The consideration of the bijection $f \in \mathcal{F}$ ensures all swapping strategies are considered.
**Definition 2** (Swapping process). *Given a process $P$ and an infinite sequence of channel names ${\Ch}$, the set of *swapping processes* is $\chi'({\Ch},P) = \hat{\chi}'(1,\;\epsilon,\;\epsilon,\;\omega({\Ch},\;P))$, where for all integers $t$, communication processes $R$, $R'$ and sets $S$, we have: $$\hat{\chi}'(t,\;R,\;R',\;S) = \left\{\begin{array}{lcl} \{R.R'.0\} &\quad& \textrm{if $S = \emptyset$}\\[1em] \bar{\chi}(t,\;R,\;R',\;S,\;Q) && \textrm{if $(t,a,b,Q) \in S$}\\[1em] \hat{\chi}'(t+1,\;R.R',\;\epsilon,\;S) && \textrm{otherwise} \end{array}\right.$$ such that $\bar{\chi}(t,R, R', S,Q)$ is defined as $$\begin{gathered} \bigcup_{f\in\mathcal{F}} \hat{\chi}'(t,\;R.a_1(y_1).\cdots.a_n(y_n),\;R'.\overline{b_1}\langle\textnormal{diff}[y_1,y_{f(1)}]\rangle.\cdots.\overline{b_n}\langle\textnormal{diff}[y_{f(n)},y_n]\rangle,\;\\S\backslash\{(t,a_1,b_1,Q),\dots,(t,a_n,b_n,Q)\}) \end{gathered}$$ where $(t,a_1,b_1,Q),\dots,(t,a_n,b_n,Q)\in S$, $\mathcal{F}$ is the set of bijections on $\{1,\dots,n\}$, and variables $y_1,\dots,y_n$ are fresh.*
Correctness of barrier ordering follows as before, and moreover, the notion of swapping is intuitively sound because it occurs between syntactically equal processes. Finally, a set of processes in the standard ProVerif language, which consider all possible swapping strategies, can be derived.
**Definition 3** (Swapping compiler). *The *swapping compiler* $\Delta'$ maps a process $P$ to a set of process, as follows: $\Delta'(P) = \{\nu\,\tilde{a}.(\delta'({\Ch},P) \mid R) \;\mid\; R\in\chi'({\Ch},P)\}$, where ${\Ch}$ is an infinite sequence of distinct channel names such that ${\Ch} \cap (\textnormal{fn}(P)\cup\textnormal{bn}(P)) = \emptyset$ and $\tilde{a} = \textnormal{fn}(\delta'({\Ch},P)) \cap {\Ch}$.*
Intuitively, if there exists a swapping strategy such that the compiled process satisfies observational equivalence, then the original process satisfies observational equivalence. The application of Definition 3 is demonstrated by Example 4 and has been implemented as a tool called ProSwapper (**Smyth10:ObsA?**).
**Example 4**. *Recall the process $P = \overline{c}\langle m\rangle.1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[m,n]\rangle \mid 1\textnormal{::}\,\overline{c}\langle\textnormal{diff}[n,m]\rangle$ from Example [ex:newExample] and assume ${\Ch} = (a_1,a_2,\dots)$. We have: $$\begin{array}{rcl} \delta'({\Ch},P) &=& \overline{c}\langle m\rangle.\overline{a_1}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c,m,n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$})\rangle.a_3(x).\overline{\pi_{1}(x)}\langle\textnormal{diff}[\pi_{2}(x),\pi_{3}(x)]\rangle \mathrel{\mid}\\ &&\qquad\overline{a_2}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{c,n,m}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.a_4(x).\overline{\pi_{1}(x)}\langle\textnormal{diff}[\pi_{2}(x),\pi_{3}(x)]\rangle\\ \omega({\Ch},\;P) &=& \{(1,a_1,a_3,\overline{\pi_{1}(x)}\langle\textnormal{diff}[\pi_{2}(x),\pi_{3}(x)]\rangle),(1,a_2,a_4,\overline{\pi_{1}(x)}\langle\textnormal{diff}[\pi_{2}(x),\pi_{3}(x)]\rangle)\}\\ \chi'({\Ch},P) &=& \{a_1(y).a_2(z).\overline{a_3}\langle\textnormal{diff}[y,y]\rangle.\overline{a_4}\langle\textnormal{diff}[z,z]\rangle,\\ &&\qquad a_1(y).a_2(z).\overline{a_3}\langle\textnormal{diff}[y,z]\rangle.\overline{a_4}\langle\textnormal{diff}[z,y]\rangle\} \end{array}$$ By Definition 3 we derive the set of processes which represent all possible swapping strategies: $$\begin{gathered} \{ \nu\,a_1,a_2,a_3,a_4.(\delta'({\Ch},P) \mid a_1(y).a_2(z).\overline{a_3}\langle\textnormal{diff}[y,y]\rangle.\overline{a_4}\langle\textnormal{diff}[z,z]\rangle), \\ \nu\,a_1,a_2,a_3,a_4.(\delta'({\Ch},P) \mid a_1(y).a_2(z).\overline{a_3}\langle\textnormal{diff}[y,z]\rangle.\overline{a_4}\langle\textnormal{diff}[z,y]\rangle)\} \end{gathered}$$ and since the latter process satisfies strong uniformity (see Appendix [app:obs:src]), we believe the process $\Delta(P)$ satisfies observational equivalence. (Note that, in order to express results about $P$, rather than $\Delta(P)$, a formal semantics for barriers must be considered; for further discussion, see Section [sec:further-work].)*
# Privacy in electronic voting This section will demonstrate the suitability of the methodology for analysing vote privacy in electronic voting protocols. In particular, an automated analysis of vote privacy in the electronic voting protocol by Fujioka, Okamoto & Ohta (**FOO?**) is presented. Moreover, the generality of our approach has been demonstrated by Backes, Hriţcu & Maffei (**Backes08:Voting?**) who prove a stronger property – namely, coercion resistance – of the protocol by Juels, Catalano & Jakobsson (**JCJ02?**; **JCJ05?**; **JCJ10?**) which has been implemented by Clarkson, Chong & Myers (**CCM08?**; **CCM08b?**) as Civitas. Our technique has also been adopted by Dahl, Delaune & Steel (**Delaune10:Vanets?**) to analyse privacy in vehicular ad-hoc networks. (Note that Dahl, Delaune & Steel use an earlier version (**Smyth08:Obs?**) of this work, and Backes, Hriţcu & Maffei make use of the fundamental principles, possibly based upon preliminary results presented at Dagstul (**Smyth07:Obs:Dagstuhl?**).) In Appendix [app:obs:src], the model of privacy in vehicular ad-hoc networks (**Delaune10:Vanets?**) is revisited and automatically analysed using ProSwapper.) ## Case study: FOO The FOO protocol, by Fujioka, Okamoto & Ohta (**FOO?**), is a seminal work based upon blind signatures. Delaune, Kremer & Ryan (**KR05:vote-privacy?**; **DKR06?**; **DKR08?**; **DKR10?**) have studied the protocol and present a hand-based proof of vote privacy, and Chothia *et al.* (**Chothia06:FOO?**) provide an automated analysis using $\mu$CRL. We will use the results of Section [sec:obs:auto] to present an automated proofanalysis; although this result is not new, it is useful to demonstrate our technique. The protocol description and equational theory were presented in Section [sec:foo] and we proceed immediately to an applied pi model of the voter process. ### Model in applied pi The formal specification of the voter process in FOO (Definition 1) follows immediately from our protocol description (Section [sec:foo]). Observe that phases of the protocol are seperated within the voting process using barriers. We do not assert the secrecy of voters’ keys and, accordingly, they can be modelled as free names. Of course, these keys *are* required to be secret for other properties. It follows that the process $P_{\sf foo}\{\textnormal{\raisebox{2pt}{\footnotesize $s_1$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{vote} }$}},\textnormal{\raisebox{2pt}{\footnotesize $sk_1$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{sk }}$}}\} \mid\dots\mid P_{\sf foo}\{\textnormal{\raisebox{2pt}{\footnotesize $s_n$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{vote} }$}},\textnormal{\raisebox{2pt}{\footnotesize $sk_n$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{sk }}$}}\}$ models an election with $n$ voters casting votes $s_1,\dots,s_n$.
**Definition 1**. *The process $P_{\sf foo}$ modelling a voter in FOO is defined as follows $$\begin{array}{lcl} P_{\sf foo} & = & \nu\,k.\nu\,k'.\\ && \textnormal{let } M=\mathsf{commit}(k,x_{\mathsf{vote} }) \textnormal{ in } \\ && \textnormal{let } \hat{M}=\mathsf{blind}(k',M) \textnormal{ in } \\ && \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(x_{\mathsf{sk }}),\mathsf{sign}(x_{\mathsf{sk }},\hat{M})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.c(y).\\ && \textnormal{if } \mathsf{checksign}(\mathsf{pk}(sk_R),y)=\mathsf{true} \textnormal{ then }\\ && \textnormal{if } \mathsf{getmsg}(y)=\hat{M} \textnormal{ then }\\ && \textnormal{let } M'=\mathsf{unblind}(k',y) \textnormal{ in }\\ && 1\textnormal{::}\, \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{M,M'}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle . 2\textnormal{::}\, c(z).\\ && \textnormal{if } \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(z),\pi_{3}(z)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}=\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{M,M'}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \textnormal{ then } \\ && \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(z),k}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle \end{array}$$ where $x_{\mathsf{sk }}$ is variable referring to the voter’s signing key and $x_{\mathsf{vote} }$ is a variable referring to voter’s vote.*
### Analysis: Vote privacy Consider two voters $\mathcal{A}$, $\mathcal{B}$ and two candidates $s$, $s'$. Based upon (**KR05:vote-privacy?**; **DKR06?**; **DKR08?**; **DKR10?**), we formalise vote privacy for two voters with the assertion that an adversary cannot distinguish between a situation in which voter $\mathcal{A}$ votes for candidate $s$ and voter $\mathcal{B}$ votes for candidate $s'$, from another one in which $\mathcal{A}$ votes $s'$ and $\mathcal{B}$ votes $s$. Formally, this is written as the equivalence: $$\begin{gathered} P_{\sf foo}\{\textnormal{\raisebox{2pt}{\footnotesize $sk_A$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{sk }}$}},\textnormal{\raisebox{2pt}{\footnotesize $s$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{vote} }$}}\} \mid P_{\sf foo}\{\textnormal{\raisebox{2pt}{\footnotesize $sk_B$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{sk }}$}},\textnormal{\raisebox{2pt}{\footnotesize $s'$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{vote} }$}}\} \sim P_{\sf foo}\{\textnormal{\raisebox{2pt}{\footnotesize $sk_A$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{sk }}$}},\textnormal{\raisebox{2pt}{\footnotesize $s'$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{vote} }$}}\} \mid P_{\sf foo}\{\textnormal{\raisebox{2pt}{\footnotesize $sk_B$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{sk }}$}},\textnormal{\raisebox{2pt}{\footnotesize $s$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $x_{\mathsf{vote} }$}}\} \end{gathered}$$ which can be checked using the methodology introduced. To provide further insight into how the swapping compiler works, let us consider how to informally prove this equivalence. Let us call the left hand side $\mbox{{\sc Lhs}}$, and the right hand side $\mbox{{\sc Rhs}}$. By definition of equivalence we must show that the $\mbox{{\sc Lhs}}$ is indistinguishable from the $\mbox{{\sc Rhs}}$. Indeed, as the $\mbox{{\sc Lhs}}$ evolves, the corresponding evolution of the $\mbox{{\sc Rhs}}$ is the one that mimics $\mathcal{A}$ moves on the $\mbox{{\sc Lhs}}$ with $\mathcal{A}$ moves on the $\mbox{{\sc Rhs}}$, and $\mathcal{B}$ moves on the $\mbox{{\sc Lhs}}$ with $\mathcal{B}$ moves on the $\mbox{{\sc Rhs}}$, up to the first barrier. After the first synchronisation, $\mathcal{A}$ moves on the $\mbox{{\sc Lhs}}$ are mimicked by $\mathcal{B}$ moves on the $\mbox{{\sc Rhs}}$, and $\mathcal{B}$ moves on the $\mbox{{\sc Lhs}}$ are mimicked by $\mathcal{A}$ moves on the $\mbox{{\sc Rhs}}$. The reason for the ‘swap’ in mimicking is to ensure that no context can distinguish the actions performed. Before the synchronisation, the output data produced by $\mathcal{A}$ on both the $\mbox{{\sc Lhs}}$ and the $\mbox{{\sc Rhs}}$ are indistinguishable (and similarly for $\mathcal{B}$); observe that on the $\mbox{{\sc Lhs}}$ the output by $\mathcal{A}$ reveals $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(sk_A),\;\mathsf{sign}(sk_A,\mathsf{blind}(k'_a,\mathsf{commit}(k_a,s))),\;\mathsf{blind}(k'_a,\mathsf{commit}(k_a,s))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$$ which can be matched on the $\mbox{{\sc Rhs}}$ by $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(sk_A),\;\mathsf{sign}(sk_A,\mathsf{blind}(k'_a,\mathsf{commit}(k_a,s'))),\;\mathsf{blind}(k'_a,\mathsf{commit}(k_a,s'))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$$ where names $k_a,k'_a$ are under restriction in both the $\mbox{{\sc Lhs}}$ and the $\mbox{{\sc Rhs}}$. (Note that indistinguishability between the $\mbox{{\sc Lhs}}$ and the $\mbox{{\sc Rhs}}$ is due to the properties of blinding.) After the first and second synchronisation, $\mathcal{A}$ will reveal $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{sign}(sk_R,\mathsf{commit}(k_a,s)),\;\mathsf{commit}(k_a,s)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\quad \textrm{ and } \quad \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\ell,\;k_a}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$$ on the $\mbox{{\sc Lhs}}$ and $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{sign}(sk_R,\mathsf{commit}(k_a,s')),\;\mathsf{commit}(k_a,s')}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\quad \textrm{ and } \quad \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\ell,\;k_a}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$$ on the $\mbox{{\sc Rhs}}$, where $\ell$ is chosen by the adversarial environment; that is, $\mathcal{A}$ reveals her vote $s$ on the $\mbox{{\sc Lhs}}$ and her vote $s'$ on the $\mbox{{\sc Rhs}}$ (similarly, $\mathcal{B}$ will reveal $s'$ on the $\mbox{{\sc Lhs}}$ and $s$ on the $\mbox{{\sc Rhs}}$). Hence, after the first synchronisation the actions mimicked are swapped. The compiler manages the swapping, and hence ProSwapper can be used to automatically analyse privacy in FOO (see Appendix [app:obs:src]). # Summary This chapter extends the process syntax of ProVerif to include barriers, for the purpose of synchronisation, and defines an automated methodology for proving equivalence. The result has been implemented as ProSwapper and the suitability of the tool is demonstrated by analysing vote privacy in the FOO electronic voting protocol. Furthermore, the fundamental principles of our methodology have been adopted by the wider research community: Dahl, Delaune & Steel (**Delaune10:Vanets?**) use an preliminary version of this chapter (formally presented in (**Smyth08:Obs?**)) to analyse privacy in vehicular ad-hoc networks, and Backes, Hriţcu & Maffei (**Backes08:Voting?**) use the basic concept (presumably based upon (**Smyth07:Obs:Dagstuhl?**)) to show coercion resistance in electronic voting. **Evaluation** # Further work and conclusion In this thesis, we advance the capabilities of the formal verification community by *defining symbolic definitions* of security properties (Part II) and *developing procedures for evaluation* of security properties (Part III). The key contributions are: - A definition of election verifiability for electronic voting protocols. - A definition of user-controlled anonymity for Direct Anonymous Attestation schemes. - An automated analysis technique for observational equivalence. This final chapter presents future work and a further appraisal of results. # Further work We begin by discussing possible future research directions arising from Chapters [chap:ev]–[chap:obs] and identifying open questions that have emerged from this thesis. ## Election verifiability in electronic voting The definition of election verifiability includes three aspects: individual, universal and eligibility verifiability. The conditions which these properties must satisfy are believed to be necessary, but may not be sufficient. Ultimately, a verifiable election should convince the most sceptic of voters and/or election observers that votes have been recorded, tallied and declared correctly. Establishing whether voting protocols which satisfy our definition, are also considered to achieve this objective, remains an open research problem. The definition of election verifiability is based upon earlier work (**Smyth10:ElectionVerifiabilityA?**) in which automated reasoning was considered. Extending Chapter 3 to include an automated procedure for evaluating election verifiability would appear to be a logical step; however, this has been precluded by the lack of efficient tools for evaluating our definition in the general case. In particular, the tests must be embedded within processes (cf. (**Smyth10:ElectionVerifiabilityA?**)) and parametrised by an arbitrary number of voters, but such parametrisation is not currently supported by ProVerif. Providing automated tool support for processes which require parametrisation is further work and, moreover, such a tool would be useful for analysing security properties in a variety of cryptographic protocols. The study of election verifiability identified eligibility verifiability – a property that has been largely neglected by the literature and is only satisfied by a few protocols – as a mechanism to detect ballot stuffing. As an alternative to eligibility verifiability, some electronic voting protocols provide a weaker notion of eligibility – which cannot be checked by voters or observers – under various trust assumptions. For example, such an eligibility property may assert that if the election officials follow the protocol, then each ballot published on the bulletin board was cast by a registered voter and at most one ballot is tallied per voter. Indeed, this assumption was thought to be reasonable in the presidential election at the Catholic University of Louvain which used Helios. However, similar assumptions must not be made about national elections. Accordingly, the study of electronic voting protocols which simultaneously satisfy election verifiability and other desirable properties, such as privacy and usability, remains an open problem. ## Anonymity in Direct Anonymous Attestation Direct Anonymous Attestation is a relatively new concept and its properties merit further study. In particular, user-controlled traceability and correctness have received limited attention. Furthermore, new properties (for example, *non-frameability* (**Chen10:DAA-security-non-frameability-eprint?**; **Chen09:DAA-security-non-frameability?**)) are emerging. Extending this work to include a complete definition of DAA properties would be an interesting direction for future research. Moreover, establishing a unified definition which includes all properties (that is, correctness, non-frameability, user-controlled anonymity and user-controlled traceability) would be of interest to reduce the verification workload. As a starting point, this could be achieved by suitably developing the notion of a Direct Anonymous Attestation process specification to distinguish between operations performed by the host and those performed by the TPM. This distinction is not necessary for our definition of user-controlled anonymity because this property can only be achieved if both the host and TPM are trusted. By contrast, a corrupt host – even in collaboration with a corrupt TPM (where the TPM is known to be rogue) – should not be able to violate traceability properties and therefore an alternative process specification, which distinguishes between actions performed by the host and TPM, would be required. For user-controlled anonymity it is necessary to ensure a distinct basename is used during phase 2 (when $bsn \not= \perp$). Since the applied pi calculus does not record state, this is achieved by an abstraction. Proving that this abstraction does not lose generality is an open problem. In addition, a stateful variant of the applied pi calculus would be useful. The study of user-controlled anonymity in Direct Anonymous Attestation schemes is particular interesting due to the real-world deployment of the TPM. However, verification of cryptographic protocols does not ensure their secure deployment because vulnerabilities may be introduced during implementation (**Larrecq05:Verifing-C-Implementations?**; **Bhargavan06?**; **Bhargavan08c?**; **Paterson09:SSH-attack?**). Automatically deriving models from implementations and verifying security properties using ProVerif has been considered (**Bhargavan06?**; **Bhargavan08c?**; **Bhargavan08?**) and verified reference implementations have been introduced to aid the development of secure systems (**Bhargavan06b?**; **Bhargavan08b?**; **Mukhamedov09:TPM-reference?**). In the context of DAA, automatically verifying implementations (for example, (**Smyth06:MEng?**; **Strasser08?**; **Sterckx09:DAAImpl?**; **Chen10:ECC-DAA-assymmetric-optimised?**)) and developing a secure reference implementation remains as future work. ## Observational equivalence and barriers Evaluating whether the synchronous compiler (Definition [def:syncProcess]) enforces the informally discussed semantic behaviour of barrier synchronisation is difficult to establish due to the complexity of definition. In this instance, it would be more suitable to formally define the semantics in the calculus of ProVerif and prove that the synchronous compiler encodes an approximation of the desired observational behaviour. Moreover, by extending the definition of observational equivalence to consider barriers, stronger results could be stated; that is, results could be stated about $P$ rather than $\Delta(P)$ (see, for example, Examples [ex:::] & [ex:swappingSet] and Section [sec:obs:FOO]). Proving soundness of the proof technique is ongoing work. At a high level it would be sufficient to show that for all biprocesses $P$, if there exists $Q\in\Delta'(P)$ such that $Q$ satisfies strong uniformity, then $\Delta(P)$ satisfies observational equivalence. Accordingly, it would be sufficient to prove that for all biprocesses $P$, we have for all $Q\in \Delta'(P)$, that $\textnormal{fst}(\Delta(P)) \sim \textnormal{fst}(Q)$ and $\textnormal{snd}(\Delta(P)) \sim \textnormal{snd}(Q)$. (As previously stated, the formal semantics of barriers are not defined and thus we cannot state observational equivalence results involving processes with barriers; that is, we must rely upon the synchronous compiler.) The definition of labelled bisimilarity (**AppliedPi?**), which complements observational equivalence (Definition [def:obs]), has proven to be useful for handwritten proofs of equivalence. A similar notion to complement Definition [def:proverif:obs] may be useful to prove observational equivalence in cases where automated reasoning is not possible. Furthermore, general procedures which consider arbitrary processes (rather than biprocesses) could be sought. ## Emerging directions The formalisation of user-controlled anonymity in Direct Anonymous Attestation (Chapter [chap:DAA]) is similar, but distinct, from the formalisation of privacy in electronic voting (Section [sec:obs:example]) and vehicular ad-hoc networks (Appendix [app:obs:src:VANETS]). In electronic voting, vote privacy for two voters $\mathcal{A}$, $\mathcal{B}$ is formalised as the indistinguishability between a situation in which voter $\mathcal{A}$ votes for candidate $s$ and voter $\mathcal{B}$ votes for candidate $s'$, from another in which $\mathcal{A}$ votes $s'$ and $\mathcal{B}$ votes $s$. Using terminology from our formalisation of user-controlled anonymity, this essentially corresponds to two voters participating in the *challenge* phase. By comparison, in DAA we consider a single signer during the challenge phase. It is necessary to consider two voters for vote privacy because the election outcome will be made public and this would represent an observable distinction if only a single voter participated in the challenge, that is, we can distinguish between an election outcome of $s$ and $s'$. Establishing a generic class of definitions suitable for analysing privacy in a variety of settings would be desirable to obviate the need for numerous protocol dependent privacy definitions (for example, (**KR05:vote-privacy?**; **Chothia06:Mute?**; **Backes08:Voting?**; **DKR08?**; **ArapinisCSF10:RFID-privacy?**; **ChatzikokolakisCSF10:RFID-privacy?**; **Delaune10:Vanets?**)). Moreover, such a framework would allow the relative degrees of privacy to be studied. # Conclusion This thesis will aid the secure design of cryptographic protocols and facilitate the evaluation of existing schemes by advancing formal method verification techniques. Our definition of election verifiability has been shown to be suitable for the analysis of a wide range of electronic voting protocols and its future application will allow the thorough analysis of schemes prior to deployment, thereby helping ensure integral elections. The study of user-controlled anonymity in RSA-based Direct Anonymous Attestation discovered a vulnerability and established a fix which potentially avoided violations of privacy for TPM users. Our definition of user-controlled anonymity will also facilitate the analysis of future DAA schemes, helping prevent privacy invasions. Finally, the adoption of our reasoning technique for observational equivalence, by the research community, gives us confidence that the methodology is of value and, moreover, can be used to evaluate numerous security properties including vote privacy and coercion resistance in electronic voting, and privacy in vehicular ad-hoc networks. **Appendices** # Election verifiability results This appendix contains proofs supporting Chapter [chap:ev]. # Election verifiability in raising hands This appendix presents a proof of election verifiability in raising hands (Example [ex:raising-hands-spec]). The proof illustrates an interesting aspect of our definition: we do not require a voter to identify her credential, it is sufficient for a voter to identify a credential. If desired, a stronger definition of election verifiability can be constructed with the additional soundness condition $\Phi^{IV}_i \sigma \wedge \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\hat w'$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\hat w$}}\} \sigma \Rightarrow \pi_{i}(\hat w)\sigma \simeq \pi_{i}(\hat w')\sigma$. ## Proof of Proposition [prop:handsEV]
*Proof.* Suppose $m\in\mathbb{N}$ and tests $\Phi^{IV}$, $\Phi^{UV}_m$, $\Phi^{EV}_m$ are given as follows: $$\begin{array}{lcl} \Phi^{IV}& \widehat = & y =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(r),\mathsf{sign}(r,v)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} %\textrm{\sout{$\wedge \Getmsg{w} =_\EE \Pk{r}$}} \wedge \mathsf{checksign}(x_{pk},w) =_E\mathsf{true}\\ \Phi^{UV}_m & \widehat = & \hat v =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{getmsg}(\pi_{2}(\pi_{1}(\hat y))),\dots,\mathsf{getmsg}(\pi_{2}(\pi_{m}(\hat y)))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \\ \Phi^{EV}_m &\widehat= & \bigwedge_{1\leq i \leq m} \big( \mathsf{checksign}(x_{pk},\pi_{i}(\hat w)) =_E\mathsf{true}\wedge \pi_{1}(\pi_{i}(\hat y)) =_E\mathsf{getmsg}(\pi_{i}(\hat w)) \\ &&\quad \quad\mathrel{\wedge} \mathsf{checksign}(\pi_{1}(\pi_{i}(\hat y)),\pi_{2}(\pi_{i}(\hat y))) =_E\mathsf{true}\\ &&\quad \quad\quad \quad \mathrel\wedge {\mathsf{snd}(\mathsf{snd}(\mathsf{snd}(\pi_{i}(\hat y)))) \mathrel{=_E} {\varnothing}} \big) \mathrel\wedge {\mathsf{snd}^m(\hat w) \mathrel{=_E} {\varnothing}} \mathrel\wedge {\mathsf{snd}^m(\hat y) \mathrel{=_E} {\varnothing}} \end{array}$$ where $r = \textnormal{rv}(\Phi^{IV})$. We will now show for all names $s_1,\dots,s_n$ that the conditions of Definition [def:ev2] hold. 1. Suppose $C$ is a context, $B$ is a process, $\sigma$ is a substitution, $\tilde n$ is a tuple of names and $i,j$ are integers where $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)] \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B) \equiv \nu \tilde n.\sigma$, $\Phi^{IV}\{\textnormal{\raisebox{2pt}{\footnotesize $s_i$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $v$}},\textnormal{\raisebox{2pt}{\footnotesize $r_i$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $r$}}, \textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat w)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $w$}}\}\sigma$ and $\Phi^{IV}\{\textnormal{\raisebox{2pt}{\footnotesize $s_j$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $v$}},\textnormal{\raisebox{2pt}{\footnotesize $r_j$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $r$}}, \textnormal{\raisebox{2pt}{\footnotesize $\pi_{j}(\hat w)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $w$}}\}\sigma$. It follows that $\pi_{1}(y)\sigma =_E\mathsf{pk}(r_i)\sigma =_E\mathsf{pk}(r_j)\sigma$. Since the record variables $r_i$, $r_j$ are handles for fresh nonces generated by name restriction in the process $A_{\sf ex}$ and sent to $V_{{\sf ex}, i}$, $V_{{\sf ex},j}$ using a private channel, it follows that $i=j$. 2. We prove a stronger result: namely, the condition holds for all substitutions $\sigma$. Suppose $\sigma$ is an arbitrary substitution such that $\Phi^{UV}_m \sigma$ and $\Phi^{UV}_m \{^{\hat v'}/_{\hat v} \} \sigma$ hold. We have $$\hat v \sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{getmsg}(\pi_{2}(\pi_{1}(\hat y))),\dots,\mathsf{getmsg}(\pi_{2}(\pi_{m}(\hat y)))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma =_E\hat v' \sigma$$ and immediately derive $\hat v\sigma \simeq \hat v'\sigma$. 3. Again, we will show that the condition holds for all substitutions $\sigma$. Suppose $\sigma$ is an arbitrary substitution such that $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat{y})$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma$ and $\Phi^{UV}_m \sigma$ hold, where $n = m$. By $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i \{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat{y})$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma$ it must be the case for all $1\leq i \leq n$ that $\pi_{i}(\hat y)\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(r_i),\mathsf{sign}(r_i,s_i)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$ and hence $\mathsf{getmsg}(\pi_{2}(\pi_{i}(\hat y)))\sigma =_Es_i$. Moreover, since $n = m$ and $\Phi^{UV}_m \sigma$, we have $$\hat v\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{getmsg}(\pi_{2}(\pi_{1}(\hat y))),\dots,\mathsf{getmsg}(\pi_{2}(\pi_{m}(\hat y)))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$$ The result $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \simeq \hat v\sigma$ follows. - We prove a stronger result: namely, for any substitution $\sigma$ the condition holds. Suppose $\sigma$ is an arbitrary substitution such that $\Phi^{EV}_m \sigma$ and $\Phi^{EV}_m \{^{x'} / _x \mid x\in X \backslash\hat y\} \sigma$ hold. For all $1\leq i\leq m$, we have $$\begin{gathered} \mathsf{getmsg}(\pi_{i}(\hat w))\sigma =_E\pi_{1}(\pi_{i}(\hat y))\sigma \wedge \pi_{1}(\pi_{i}(\hat y))\sigma =_E\mathsf{getmsg}(\pi_{i}(\hat w'))\sigma\\ \mathrel{\wedge} \mathsf{checksign}(\pi_{i}(\hat w),x_{pk})\sigma =_E\mathsf{true}\wedge \mathsf{checksign}(\pi_{i}(\hat w'),x_{pk})\sigma =_E\mathsf{true} \end{gathered}$$ and, by inspection of the equational theory, it must be the case that $\pi_{i}(\hat w)\sigma = \pi_{i}(\hat w')\sigma = \mathsf{sign}(K_i,\pi_{1}(\pi_{i}(\hat y)))\sigma$, where $x_{pk}\sigma = \mathsf{pk}(K_i)$. By $\Phi^{EV}_m \sigma$ and $\Phi^{EV}_m \{^{x'} / _x \mid x\in X \backslash\hat y\} \sigma$ we also have $\mathsf{snd}^m(\hat w) \mathrel{=_E} \mathsf{snd}^m(\hat w') \mathrel{=_E} {\varnothing}$. It must be the case that $\hat w \sigma = \hat w'\sigma = \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{sign}(K_1,\pi_{1}(\pi_{1}(\hat y))),\dots,\allowbreak\mathsf{sign}(K_m,\pi_{1}(\pi_{m}(\hat y)))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$ and hence $\hat w \sigma \simeq \hat w'\sigma$. - Suppose $C$ is a context and $B$ is a process such that $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)] \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B)\equiv\nu\tilde n.\sigma$, and $\Phi^{EV}_m \sigma \wedge \Phi^{EV}_m \{^{x'} / _x \mid x\in X\backslash\hat w\} \sigma$. For all $1\leq i \leq m$, we have $\mathsf{checksign}(x_{pk},\pi_{i}(\hat w))\sigma =_E\mathsf{true}$, where $x_{pk}\sigma = \mathsf{pk}(sk_A)$ and $sk_A \in \tilde n$. By inspection of the equational theory it is the case that $\pi_{i}(\hat w)\sigma =_E\mathsf{sign}(sk_A,M_i)$ for some term $M_i$. Since the signing key is under restriction and, by inspection of the voting process, it follows that for all $1 \leq i \leq m$ we have $M_i =_E\mathsf{pk}(sk_{V_i})$, where $sk_{V_i} \in \tilde n$. By $\Phi^{EV}_m \sigma$ and $\Phi^{EV}_m \{^{x'} / _x \mid x\in X\backslash\hat w\} \sigma$ we also have $\pi_{1}(\pi_{i}(\hat y)) \sigma =_E\mathsf{getmsg}(\pi_{i}(\hat w) )\sigma =_E\pi_{1}(\pi_{i}(\hat y') )\sigma$, that is, $$\pi_{1}(\pi_{i}(\hat y))\sigma =_E\mathsf{pk}(sk_{V_i}) =_E\pi_{1}(\pi_{i}(\hat y') )\sigma.$$ Moreover, $\mathsf{checksign}(\pi_{1}(\pi_{i}(\hat y)),\pi_{2}(\pi_{i}(\hat y))) \sigma=_E\mathsf{true}\wedge \mathsf{checksign}(\pi_{1}(\pi_{i}(\hat y')),\pi_{2}(\pi_{i}(\hat y')))\sigma =_E\mathsf{true}$. Since the signing keys $sk_{V_1},\dots,sk_{V_m}$ are under restriction it follows for all $1\leq i\leq m$ that $$\pi_{2}(\pi_{i}(\hat y))\sigma =_E\mathsf{sign}(sk_{V_i},s_i) =_E\pi_{2}(\pi_{i}(\hat y'))\sigma$$ Furthermore, for all $1\leq i\leq m$, we have $\mathsf{snd}(\mathsf{snd}(\mathsf{snd}(\pi_{i}(\hat y)))) \mathrel{=_E} \mathsf{snd}(\mathsf{snd}(\mathsf{snd}(\pi_{i}(\hat y')))) \mathrel{=_E} {\varnothing}$ and hence $$\pi_{i}(\hat y)\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(sk_{V_i}), \mathsf{sign}(sk_{V_i},s_i)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} =_E \pi_{i}(\hat y')\sigma$$ Since $\mathsf{snd}^m(\hat y)\sigma \mathrel{=_E} \mathsf{snd}^m(\hat y')\sigma \mathrel{=_E}{\varnothing}$, we have $\hat y\sigma = _E\hat y'\sigma$ and hence $\hat y \sigma \simeq \hat y'\sigma$. - Suppose $C$ is a context and $B$ is a process such that $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)] \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B)\equiv\nu\tilde n.\sigma$, and $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i\{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}} \} \sigma \wedge \Phi^{EV}_n\{^{\hat w'}/_{\hat w} \} \sigma \wedge \mathsf{snd}^n(\hat w)\sigma =_E{\varnothing}$ holds. For all $1\leq i \leq n$, we have $\mathsf{checksign}(x_{pk},\pi_{i}(\hat w))\sigma =_E\mathsf{true}$, where $x_{pk}\sigma = \mathsf{pk}(sk_A)$ and $sk_A \in \tilde n$. By inspection of the equational theory it is the case that $\pi_{i}(\hat w)\sigma =_E\mathsf{sign}(sk_A,M_i)$ for some term $M_i$. Since the signing key is under restriction and, by inspection of the voting process, it follows for all $1 \leq i \leq n$ that $M_i =_E\mathsf{pk}(sk_{V_i})$, where $sk_{V_i} \in \tilde n$. Moreover, $\mathsf{snd}^n(\hat w)\sigma =_E{\varnothing}$ and hence $$\hat w\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{sign}(sk_A,\mathsf{pk}(sk_{V_1})),\dots,\mathsf{sign}(sk_A,\mathsf{pk}(sk_{V_n}))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$$ Similarly, we have $1\leq i \leq n$ that $\mathsf{checksign}(x_{pk},\pi_{i}(\hat w'))\sigma =_E\mathsf{true}$, where $x_{pk}\sigma = \mathsf{pk}(sk_A)$ and $sk_A \in \tilde n$. As before, $\pi_{i}(\hat w')\sigma =_E\mathsf{sign}(sk_A,N_i)$ by inspection of the equational theory. Since the signing key is under restriction and, by inspection of the voting process (in particular, observe that $A_{\sf ex}$ outputs exactly $n$ messages of the form $\mathsf{sign}(sk_A,N_i)$), there exists a permutation $\chi$ defined over $\{1,\dots,n\}$ such that for all $1 \leq i \leq n$ we have $N_i =_E\mathsf{pk}(sk_{V_{\chi(i)}})$. Moreover, by $\Phi^{EV}_n\{^{\hat w'}/_{\hat w} \} \sigma$ we have $\mathsf{snd}^n(\hat w') \mathrel{=_E} {\varnothing}$ and hence $$\hat w'\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{sign}(sk_A,\mathsf{pk}(sk_{V_{\chi(1)}})),\dots,\mathsf{sign}(sk_A,\mathsf{pk}(sk_{V_{\chi(n)}}))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$$ The result $\hat w\sigma \simeq \hat w'\sigma$ follows. - Suppose $s_1,\dots,s_n$ are names and consider the context $$\begin{array}{lcl} C &\mathrel{\hat =}& c(w_1).\dots.c(w_n).\overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{w_1,\dots,w_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.\\ &&c(y_1).\dots.c(y_n).\overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{y_1,\dots,y_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.\\ &&\overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{getmsg}(\pi_{2}(y_1)),\dots,\mathsf{getmsg}(\pi_{2}(y_n))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle \end{array}$$ We have $C[{\sf VP}_n^+(s_1,\dots,s_n)]\allowbreak \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$ such that $\varphi(B) \equiv \nu sk_A, sk_{V_1}, \ldots, sk_{V_n}.\sigma$, where $$\begin{gathered} \sigma = \{ ^{sk_{V_1}}/_{r_{1}},\dots,^{sk_{V_n}}/_{r_{n}}, \textnormal{\raisebox{2pt}{\footnotesize $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\hat v$}}, \textnormal{\raisebox{2pt}{\footnotesize $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{sign}(sk_A,\mathsf{pk}(sk_{V_1})),\dots,\mathsf{sign}(sk_A,\mathsf{pk}(sk_{V_n}))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\hat w$}},\\ ^{\mathsf{pk}(sk_A)} / _{x_{pk}}, \textnormal{\raisebox{2pt}{\footnotesize $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}({sk_{V_1}}), \mathsf{sign}(sk_{V_1},s_1)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\dots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}({sk_{V_n}}), \mathsf{sign}(sk_{V_n},s_n)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\hat y$}} \} \end{gathered}$$ It can trivially be seen that $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i\{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma \wedge \Phi^{UV}_m \sigma \wedge \Phi^{EV}_m \sigma$.  ◻
# Election verifiability in Civitas This appendix presents a proof of election verifiability in Civitas. The following lemmata are introduced to demonstrate useful properties of our equational theory (pp). We make use of the notation $\hat M \stackrel{\bullet}{\simeq} \hat{M}'$ to denote that the ciphertext tuples $\hat M$, $\hat{M}'$ are defined over the same plaintexts for some public key $K$, that is, $\hat M =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\mathsf{penc}(K,R_1,N_1), \ldots, \allowbreak\mathsf{penc}(\allowbreak K, \allowbreak R_n,\allowbreak N_n)\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$, $\hat M' =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{penc}(K,R'_1,N'_1), \ldots \mathsf{penc}(K,R'_n,N'_n)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$ for some terms $N_1, N'_1, R_1, R_1,\allowbreak\dots,\allowbreak N_n, N'_n, R_n, R_n$ and integer $n\in\mathbb{N}$ such that there exists a permutation $\chi$ defined over $\{1, \ldots ,n\}$, where for all $1 \leq i \leq n$ we have $N_i =_EN'_{\chi(i)}$. The relation $\stackrel{\bullet}{\simeq}$ is trivially seen to be an equivalence relation. Moreover, if $\hat M \stackrel{\bullet}{\simeq} \hat N$ and $\hat M \simeq \hat M'$, then $\hat M' \stackrel{\bullet}{\simeq} \hat N$.
**Lemma 1**. *Given terms $L,M,N$, if $\mathsf{pet}(L,M,N) =_E\mathsf{true}$, then $M \stackrel{\bullet}{\simeq} N$.*
**Lemma 2**. *Given terms $L,\hat{M},\hat{N}$, if $\mathsf{checkMix}(L,\hat M,\hat N) =_E\mathsf{true}$, then $\hat M \stackrel{\bullet}{\simeq} \hat N$.*
**Lemma 3**. *Given terms $L,\hat{M},\hat{N}$, if $\mathsf{checkMixPair}(L,\hat M,\hat N) \allowbreak =_E\mathsf{true}$, then $\allowbreak\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\pi_{i}(M_1),\allowbreak\dots,\allowbreak\pi_{i}(M_{|\tilde M|})\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{i}(N_1),\dots,\pi_{i}(N_{|\hat N|})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$, where $i\in\{1,2\}$.*
## Proof of Theorem [thm:jcj]
*Proof.* Suppose $m\in\mathbb{N}$ and the tests $\Phi^{IV},\Phi^{UV}_m,\Phi^{EV}_m$ are given above. We will now show for all names $s_1,\dots,s_n$ that the conditions of Definition [def:ev2] hold. 1. Suppose $C$ is a context, $B$ is a process and $i,j$ are integers such that $C[{\sf VP^+_n}(\allowbreak s_1,\allowbreak\dots,\allowbreak s_n)]\allowbreak \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B)\equiv\nu\tilde n.\sigma$ and $\Phi^{IV}\{^{s_i} /_v, \textnormal{\raisebox{2pt}{\footnotesize $\tilde r_{i}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde r$}}, \textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat w)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $w$}}\}\sigma \wedge \Phi^{IV}\{^{s_j} /_v,\allowbreak \textnormal{\raisebox{2pt}{\footnotesize $\tilde r_{j}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde r$}}, \textnormal{\raisebox{2pt}{\footnotesize $\pi_{j}(\hat w)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $w$}}\}\sigma$. It follows that $\pi_{1}(y)\sigma =_E\mathsf{penc}(x_{\mathsf{pk_T}},r_{m,i},s_i)\sigma =_E\mathsf{penc}(x_{\mathsf{pk_T}},r_{m,j},\allowbreak s_j) \sigma$ and, by inspection of the equational theory, it is the case that $r_{m,i}\sigma = r_{m,j}\sigma$. Since the record variables $r_{m,i}$, $r_{m,j}$ are handles for fresh nonces created by name restriction in the voter process, it follows immediately from $r_{m,i}\sigma = r_{m,j}\sigma$ that $i=j$. 2. We prove a stronger result: namely, for any substitution $\sigma$ the condition holds. Suppose $\Phi^{UV}_m \sigma \wedge \Phi^{UV}_m \{^{\hat v'}/_{\hat v} \} \sigma$ and hence $$\hat v\sigma =_E\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{dec}(z_{\mathsf{partial},1},\pi_{1}(z_{\mathsf{bal},1})),\dots,\mathsf{dec}(z_{\mathsf{partial},m},\pi_{1}(z_{\mathsf{bal},m}))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma =_E\hat v'\sigma$$ It follows immediately that $\hat v\sigma \simeq \hat v'\sigma$. 3. Again, we will show that the condition holds for all substitutions $\sigma$. Suppose $\Phi^{IV}\{^{s_i} /_v,\allowbreak \textnormal{\raisebox{2pt}{\footnotesize $\tilde r_{i}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\tilde r$}},\allowbreak \textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat w)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $w$}},\allowbreak \textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat y)$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $y$}}\} \sigma$ holds for $1 \leq i \leq n$ and hence $$\bigwedge_{1 \leq i \leq n} \pi_{1}(\pi_{i}(\hat y))\sigma =_E\mathsf{penc}(x_{\mathsf{pk_T}},r_{m,i},s_i)\sigma.$$ Moreover, suppose $\Phi^{UV}_m \sigma$ holds and $n = m$, therefore $$\begin{gathered} \mathsf{checkMixPair}({z_{\mathsf{mixPairPf}}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{1}(\hat y)),\pi_{2}(\pi_{1}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\\\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{m}(\hat y)),\pi_{2}(\pi_{m}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},z_{\mathsf{bal},1},\ldots,z_{\mathsf{bal},m})\sigma =_E\mathsf{true} \end{gathered}$$ holds. By inspection of the equational theory we have $$\pi_{1}(z_{\mathsf{bal},i})\sigma =_E\mathsf{penc}(x_{\mathsf{pk_T}},r_{m,\chi(i)} \circ R_i,s_{\chi(i)})\sigma$$ where $1\leq i \leq n$ for some permutation $\chi$ defined over $\{1,\dots,n\}$ and terms $R_1,\dots,R_n$ (note $R_1,\dots,R_n$ appear in ${z_{\mathsf{mixPairPf}}}\sigma$). By our hypothesis, for all $1 \leq i \leq n$, we have $${\mathsf{checkPartialPf}}(x_{\mathsf{pk_T}},\pi_{1}(z_{\mathsf{bal},i}),z_{\mathsf{partial},i},z_{\mathsf{partialPf},i})\sigma =_E\mathsf{true}$$ and hence $z_{\mathsf{partial},i}\sigma$ is a partial decryption for $\pi_{1}(z_{\mathsf{bal},i})\sigma$. It follows, for all $1 \leq i \leq n$, that $$\mathsf{dec}(z_{\mathsf{partial},i},\pi_{1}(z_{\mathsf{bal},i}))\sigma =_Es_{\chi(i)}$$ Finally, by hypothesis, we also have $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{dec}(z_{\mathsf{partial},1},\pi_{1}(z_{\mathsf{bal},1})),\dots,\mathsf{dec}(z_{\mathsf{partial},m},\pi_{1}(z_{\mathsf{bal},m}))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma =_E\hat v\sigma$$ and hence it follows that $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{s_1,\dots,s_n}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$} \simeq \hat v\sigma$. 4. Suppose $C$ is a context and $B$ is a process such that $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)] \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B)\equiv\nu\tilde n.\sigma$, and $\Phi^{EV}_m \sigma \wedge \Phi^{EV}_m \{^{x'} / _x \mid x\in X\backslash\hat y\} \sigma$. For all $1\leq i \leq m$, we have $\mathsf{checkBallot}(\pi_{3}(\pi_{i}(\hat y)),\pi_{1}(\pi_{i}(\hat y)),\pi_{2}(\pi_{i}(\hat y)))\sigma =_E\mathsf{true}$ and it follows by inspection of the equational theory that $$\pi_{2}(\pi_{i}(\hat y))\sigma =_E\mathsf{penc}(K_i,S_i,M_i)$$ for some terms $K_i, S_i, M_i$. Since $\mathsf{checkMixPair}({z_{\mathsf{mixPairPf}}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{1}(\hat y)),\pi_{2}(\pi_{1}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\linebreak\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\pi_{1}(\pi_{m}(\hat y)),\pi_{2}(\pi_{m}(\hat y))\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},z_{\mathsf{bal},1},\ldots,z_{\mathsf{bal},m})\sigma =_E\mathsf{true}$ and $\mathsf{checkMixPair}({z_{\mathsf{mixPairPf}}}',\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\pi_{1}(\pi_{1}(\hat y)),\allowbreak\pi_{2}(\pi_{1}(\hat y))\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{m}(\hat y)),\pi_{2}(\pi_{m}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},z_{\mathsf{bal},1}',\ldots,z_{\mathsf{bal},m}')\sigma =_E\mathsf{true}$; it follows by Lemma 3 and transitivity of $\stackrel{\bullet}{\simeq}$ that $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(z_{\mathsf{bal},1}),\ldots,\pi_{2}(z_{\mathsf{bal},m})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(z_{\mathsf{bal},1}'),\ldots,\pi_{2}(z_{\mathsf{bal},m}')}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma.$$ Moreover, for all $1\leq i \leq m$, we have $\mathsf{pet}(z_{\mathsf{petPf},i},\pi_{2}(z_{\mathsf{bal},i}),{\bar{z}}_{\mathsf{cred},i})\sigma =_E\mathsf{true}$ and $\mathsf{pet}(z_{\mathsf{petPf},i}',\allowbreak\pi_{2}(z_{\mathsf{bal},i}'),{\bar{z}}_{\mathsf{cred},i}')\sigma =_E\mathsf{true}$; by Lemma 1 it follows that $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{{\bar{z}}_{\mathsf{cred},1},\ldots,{\bar{z}}_{\mathsf{cred},m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{{\bar{z}}_{\mathsf{cred},1}',\ldots,{\bar{z}}_{\mathsf{cred},m}'}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma.$$ We have $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_{\mathsf{cred},1},\ldots,z_{\mathsf{cred},m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma\simeq\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{{\bar{z}}_{\mathsf{cred},1},\ldots,{\bar{z}}_{\mathsf{cred},m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$, $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_{\mathsf{cred},1}',\ldots,z_{\mathsf{cred},m}'}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\allowbreak\sigma\simeq\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\bar{z}}_{\mathsf{cred},1}',\ldots,\allowbreak{\bar{z}}_{\mathsf{cred},m}'\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$ and hence we trivially derive $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_{\mathsf{cred},1},\ldots,z_{\mathsf{cred},m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_{\mathsf{cred},1}',\ldots,z_{\mathsf{cred},m}'}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma.$$ Since $\mathsf{checkMix}({z_{\mathsf{mixPf}}},\mathsf{getmsg}(\pi_{1}(\hat w)),\ldots,\mathsf{getmsg}(\pi_{m}(\hat w)),z_{\mathsf{cred},1},\ldots,z_{\mathsf{cred},m})\sigma =_E\mathsf{true}$ and $\mathsf{checkMix}({z_{\mathsf{mixPf}}}',\mathsf{getmsg}(\pi_{1}(\hat w')),\ldots,\mathsf{getmsg}(\pi_{m}(\hat w')),z_{\mathsf{cred},1}',\ldots,z_{\mathsf{cred},m}')\sigma=_E\mathsf{true}$; it follows by Lemma 2 that $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{getmsg}(\pi_{1}(\hat w)),\ldots,\mathsf{getmsg}(\pi_{m}(\hat w))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{getmsg}(\pi_{1}(\hat w')),\ldots,\mathsf{getmsg}(\pi_{m}(\hat w'))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma.$$ For all $1\leq i \leq m$, we have $\mathsf{checksign}(x_{spk_R},\pi_{i}(\hat w))\sigma =_E\mathsf{true}$ and $\mathsf{checksign}(\allowbreak x_{spk_R},\pi_{i}(\hat w'))\sigma \allowbreak=_E\mathsf{true}$, where $x_{spk_R}\sigma = \mathsf{pk}(ssk_R)$ and $ssk_R \in \tilde{n}$. By inspection of the equational theory it is the case that $\pi_{i}(\hat w)\sigma =_E\mathsf{sign}(ssk_R,M_i)\sigma$ and $\pi_{i}(\hat w')\sigma =_E\mathsf{sign}(ssk_R,M'_i)\sigma$ for some terms $M_i,M'_i$. Furthermore, since, for all $1\leq i \leq m$, we have $\mathsf{getmsg}(\pi_{i}(\hat w))\sigma =_EM_i$, $\mathsf{getmsg}(\pi_{i}(\hat w'))\sigma =_EM'_i$ and because $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{getmsg}(\pi_{1}(\hat w)),\ldots,\mathsf{getmsg}(\pi_{m}(\hat w))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq}\break\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\mathsf{getmsg}(\pi_{1}(\hat w')),\ldots,\mathsf{getmsg}(\pi_{m}(\hat w'))\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$, it follows that $\tilde M \stackrel{\bullet}{\simeq} \tilde M'$. Now, since the signing key is under restriction and, by inspection of the voting process and its possible outputs, it follows for all $1\leq i \leq m$ that $$\begin{array}{lcl} \mathsf{getmsg}(\pi_{i}(\hat w)) \sigma =_E\mathsf{penc}(\mathsf{pk}(sk_R),m''_{\chi(i)},d_{\chi(i)}) \\ \mathsf{getmsg}(\pi_{i}(\hat w'))\sigma =_E\mathsf{penc}(\mathsf{pk}(sk_R),m''_{\chi'(i)},d_{\chi'(i)}) \end{array}$$ where $d_i,m''_i$ are names under restriction in the registrar process $R$, $x_{pk_R}\sigma \allowbreak=_E\mathsf{pk}(sk_R)$ and $\chi, \chi'$ are permutations defined over $\{1,\dots,n\}$. Finally, we have $\mathsf{snd}^m(\hat w) =_E\mathsf{snd}^m(\hat w') =_E{\varnothing}$ and hence conclude $\hat w \sigma \simeq \hat w' \sigma$. 5. Suppose $C$ is a context and $B$ is a process such that $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)] \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B)\equiv\nu\tilde n.\sigma$, and $\Phi^{EV}_m \sigma \wedge \Phi^{EV}_m \{^{x'} / _x \mid x\in X\backslash\hat w\} \sigma$. For all $1\leq i \leq m$, we have $\mathsf{checksign}(x_{spk_R},\pi_{i}(\hat w))\sigma =_E\mathsf{true}$, where $x_{spk_R}\sigma = \mathsf{pk}(ssk_R)$ and $ssk_R \in \tilde{n}$. By inspection of the equational theory it is the case that $$\pi_{i}(\hat w)\sigma =_E\mathsf{sign}(ssk_R,M_i)\sigma$$ for some term $M_i$. Since the signing key is under restriction and, by inspection of the voting process, it follows that for all $1\leq i \leq m$ we have $$M_i =_E\mathsf{penc}(\mathsf{pk}(sk_R),m''_i,d_i)$$ where $d_i,m''_i$ are names under restriction in the registrar process $R$ and $x_{pk_R}\sigma =_E\mathsf{pk}(sk_R)$. Since $\mathsf{checkMix}({z_{\mathsf{mixPf}}},\mathsf{getmsg}(\pi_{1}(\hat w)),\ldots,\mathsf{getmsg}(\pi_{m}(\hat w)),z_{\mathsf{cred},1},\allowbreak\ldots,z_{\mathsf{cred},m})\sigma =_E\mathsf{true}$, $\mathsf{checkMix}({z_{\mathsf{mixPf}}}',\mathsf{getmsg}(\pi_{1}(\hat w)),\ldots,\mathsf{getmsg}(\pi_{m}(\hat w)),\allowbreak z_{\mathsf{cred},1}',\ldots,z_{\mathsf{cred},m}')\sigma =_E\mathsf{true}$ and for all $1 \leq i \leq m$ we have $\mathsf{getmsg}(\pi_{i}(\hat w))\sigma =_EM_i$; it follows that $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_{\mathsf{cred},1},\ldots,z_{\mathsf{cred},m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_{\mathsf{cred},1}',\ldots,z_{\mathsf{cred},m}'}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$$ by Lemma 2. We have $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{z_{\mathsf{cred},1},\ldots,z_{\mathsf{cred},m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma\simeq\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\bar{z}}_{\mathsf{cred},1},\ldots,\allowbreak{\bar{z}}_{\mathsf{cred},m}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$ and $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}z_{\mathsf{cred},1}',\allowbreak\ldots,\allowbreak z_{\mathsf{cred},m}'\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma\simeq\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\bar{z}}_{\mathsf{cred},1}',\ldots,\allowbreak{\bar{z}}_{\mathsf{cred},m}'\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma$; it trivially follows that $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{{\bar{z}}_{\mathsf{cred},1},\ldots,{\bar{z}}_{\mathsf{cred},m}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{{\bar{z}}_{\mathsf{cred},1}',\ldots,{\bar{z}}_{\mathsf{cred},m}'}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma.$$ Moreover, for all $1\leq i \leq m$, we have $\mathsf{pet}(z_{\mathsf{petPf},i},\pi_{2}(z_{\mathsf{bal},i}),{\bar{z}}_{\mathsf{cred},i})\sigma =_E\mathsf{true}$ and $\mathsf{pet}(z_{\mathsf{petPf},i}',\allowbreak\pi_{2}(z_{\mathsf{bal},i}'),{\bar{z}}_{\mathsf{cred},i}')\sigma =_E\mathsf{true}$; hence by Lemma 1 it follows that $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(z_{\mathsf{bal},1}),\ldots,\pi_{2}(z_{\mathsf{bal},m})}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(z_{\mathsf{bal},1}'),\ldots,\pi_{2}(z_{\mathsf{bal},m}')}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma.$$ By $\mathsf{checkMixPair}({z_{\mathsf{mixPairPf}}},\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{1}(\hat y)),\pi_{2}(\pi_{1}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{m}(\hat y)),\pi_{2}(\pi_{m}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},z_{\mathsf{bal},1},\ldots,\linebreak z_{\mathsf{bal},m})\sigma =_E\mathsf{true}$, $\mathsf{checkMixPair}({z_{\mathsf{mixPairPf}}}',\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{1}(\pi_{1}(\hat y')),\pi_{2}(\pi_{1}(\hat y'))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},\ldots,\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}\pi_{1}(\pi_{m}(\hat y')),\linebreak\pi_{2}(\pi_{m}(\hat y'))\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$},z_{\mathsf{bal},1}',\ldots,z_{\mathsf{bal},m}')\sigma =_E\mathsf{true}$ and Lemma 3 we have $$\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(\pi_{1}(\hat y)),\ldots,\pi_{2}(\pi_{m}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(\pi_{1}(\hat y')),\ldots,\pi_{2}(\pi_{m}(\hat y'))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma.$$ For all $1\leq i \leq m$, we have $\mathsf{checkBallot}(\pi_{3}(\pi_{i}(\hat y)),\pi_{1}(\pi_{i}(\hat y)),\pi_{2}(\pi_{i}(\hat y)))\sigma =_E\mathsf{true}$ and $\mathsf{checkBallot}(\pi_{3}(\pi_{i}(\hat y')),\pi_{1}(\pi_{i}(\hat y')),\pi_{2}(\pi_{i}(\hat y')))\sigma =_E\mathsf{true}$. By inspection of the equational theory and because $\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(\pi_{1}(\hat y)),\ldots,\pi_{2}(\pi_{m}(\hat y))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\pi_{2}(\pi_{1}(\hat y')),\ldots,\allowbreak\pi_{2}(\pi_{m}(\hat y'))}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\sigma \stackrel{\bullet}{\simeq} \linebreak\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{penc}(\mathsf{pk}(sk_R),m''_1,d_1),\dots,\mathsf{penc}(\mathsf{pk}(sk_R),m''_n,d_n)}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}$ it is the case that $$\begin{array}{lcl} \pi_{3}(\pi_{i}(\hat y))\sigma &=_E& \mathsf{ballotPf}(PK_{T_i},R_i,N_i,\mathsf{pk}(sk_R),S_i,d_{\chi(i)}) \\ \pi_{3}(\pi_{i}(\hat y'))\sigma &=_E& \mathsf{ballotPf}(PK'_{T_i},R'_i,N'_i,\mathsf{pk}(sk_R),S'_i,d_{\chi'(i)}) \end{array}$$ for some terms $PK_{T_i}, R_i, N_i, S_i, PK'_{T_i},R'_i,N'_i,S'_i$ and permutations $\chi,\chi'$ defined over $\{1,\allowbreak\dots,n\}$. Since for all $1\leq i \leq m$ the name $d_i$ is under restriction in the voting process specification, it follows that $$\begin{array}{lcl} \pi_{3}(\pi_{i}(\hat y))\sigma &=_E& \mathsf{ballotPf}(\mathsf{pk}(sk_T),m_{\chi(i)},s_{\chi(i)},\mathsf{pk}(sk_R),m'_{\chi(i)},d_{\chi(i)}) \\ \pi_{3}(\pi_{i}(\hat y'))\sigma &=_E& \mathsf{ballotPf}(\mathsf{pk}(sk_T),m_{\chi'(i)},s_{\chi'(i)},\mathsf{pk}(sk_R),m'_{\chi'(i)},d_{\chi'(i)}) \end{array}$$ (that is, $\pi_{3}(\pi_{i}(\hat y))\sigma$ and $\pi_{3}(\pi_{i}(\hat y'))\sigma$ are the signature proofs of knowledge output by the voters) and, moreover, by the validity of the proof, we have $$\begin{array}{lcl} \pi_{1}(\pi_{i}(\hat y))\sigma &=_E& \mathsf{penc}(\mathsf{pk}(sk_T),m_{\chi(i)},s_{\chi(i)})\\ \pi_{1}(\pi_{i}(\hat y'))\sigma &=_E& \mathsf{penc}(\mathsf{pk}(sk_T),m_{\chi'(i)},s_{\chi'(i)}) \end{array}$$ $$\begin{array}{lcl} \pi_{2}(\pi_{i}(\hat y))\sigma &=_E& \mathsf{penc}(\mathsf{pk}(sk_R),m'_{\chi(i)},d_{\chi(i)})\\ \pi_{2}(\pi_{i}(\hat y'))\sigma &=_E& \mathsf{penc}(\mathsf{pk}(sk_R),m'_{\chi'(i)},d_{\chi'(i)}) \end{array}$$ Since $\bigwedge_{i=1}^{m} \pi_{4}(\hat y) =_E{\varnothing}$ and $\bigwedge_{i=1}^{m} \pi_{4}(\hat y') =_E{\varnothing}$, it follows for all $1\leq i \leq m$ that $\pi_{i}(\hat y) =_E\pi_{i}(\hat y)$. Finally, $\mathsf{snd}^m(\hat y) =_E\mathsf{snd}^m(\hat y') =_E{\varnothing}$ and hence we conclude $\hat y \sigma\simeq \hat y'\sigma$. 6. Suppose $C$ is a context and $B$ is a process such that $C[{\sf VP^+_n}(s_1,\dots,\allowbreak s_n)] \mathrel{(\to^* \xrightarrow{\alpha} \to^*)^*} B$, $\varphi(B)\equiv\nu\tilde n.\sigma$, and $\bigwedge_{1 \leq i \leq n} \Phi^{IV}_i\{\textnormal{\raisebox{2pt}{\footnotesize $\pi_{i}(\hat y){y}$}}/\textnormal{\raisebox{-1.5pt}{\footnotesize $\}$}} \sigma \wedge \Phi^{EV}_n\{^{\hat w'}/_{\hat w} \} \sigma \mathrel\wedge \mathsf{snd}^n(\hat w)\sigma =_E{\varnothing}$ holds. For all $1 \leq i \leq n$, we have $\pi_{i}(\hat w)\sigma = \pi_{2}(r_{cred_i})\sigma$. Since $\mathsf{snd}^n(\hat w)\sigma =_E{\varnothing}$ and, by inspection of the voting process, we have $$\hat w\sigma =_E(\mathsf{sign}(ssk_R,\mathsf{penc}(\mathsf{pk}(sk_R),m''_1,d_1)),\dots,\mathsf{sign}(ssk_R,\mathsf{penc}(\mathsf{pk}(sk_R),m''_n,d_n)))$$ In addition, we have $\pi_{2}(\pi_{i}(\hat y))\sigma =_E\mathsf{penc}(\mathsf{pk}(sk_R),m'_i,d_i)$ for all $1 \leq i \leq n$ and by similar reasoning to the above (see Condition [evCond1]) we derive $\hat w\sigma \simeq \hat w'\sigma$. 7. This can be witnessed by modelling the complete JCJ-Civitas protocol as the context $C[\_]$.  ◻
# Violating anonymity in the RSA-based DAA specification This appendix recalls the mathematical description of the RSA-based Direct Anonymous Attestation protocol (**Chen04:RSA-DAA?**) and demonstrates that the specification does not satisfy privacy. # Primitives and building blocks This section recalls the mathematical primitives which form the building blocks of RSA-based DAA. First we introduce some notation. #### Notation. The binary string of length $l$ is denoted $\{0,1\}^l$. Concatenation of binary strings $\alpha$ and $\beta$ is written $\alpha\|\beta$. The $u$ least significant bits of the binary string $\alpha$ are $LSB_u(\alpha) = \alpha - 2^u \lfloor\frac{\alpha}{2^u}\rfloor$ and the $u$ most significant bits of the binary string $\alpha$ are $MSB_u(\alpha) = \lfloor\frac{\alpha}{2^u}\rfloor$. It should be noted that $\alpha = MSB_u(\alpha) \| LSB_u(\alpha) = 2^u MSB_u(\alpha) + LSB_u(\alpha)$. ## Protocols to prove knowledge This section summarises the proofs of knowledge used by RSA-based DAA; the concrete algorithms can be found in the original papers. Since the RSA-based DAA protocol applies proofs of knowledge to the group of quadratic residues modulo a safe prime product, the prover must demonstrate that elements are indeed quadratic residues, because the verifier is unable to do so. The prover is therefore required to show that the square root of the element exists; this can be achieved by executing $PK\{(\alpha) : y^2 = (g^2)^\alpha\}$ or $PK\{(\alpha) : y = \pm g^\alpha\}$ instead of $PK\{(\alpha) : y = g^\alpha\}$, such that $\alpha = \log_{g^2} y^2$, which is equivalent to $\alpha = \log_g y$ in the case where $y \in QR_n$ (**Chen04:RSA-DAA?**). #### Demonstrating possession of a discrete logarithm. A proof of knowledge of an element $y \in G$ with respect to base $g \in G$ is denoted $PK\{(\alpha) : y = g^{\alpha}\}$ (**Chaum87?**; **Chaum86?**). Furthermore, it can be generalised to prove knowledge of $y \in G$ with respect to several bases $g_0,\ldots,g_v \in G$, as denoted by $PK\{(\alpha_0,\ldots,\alpha_v) : y = g_0^{\alpha_0} \cdots g_v^{\alpha_v}\}$. A proof of knowledge of a discreet logarithm $y \in G$ with respect to bases $g \in G$ such that $\alpha \in \pm \{0,1\}^l$ is denoted $PK\{(\alpha) : y = g^\alpha \wedge (-2^l < \alpha < 2^l)$} (**Camenisch98?**; **Camenisch98b?**; **Camenisch99?**; **Brickell88?**). To enable the prover to successfully complete the protocol, it is necessary to use a tighter bound $\alpha \in \pm \{0,1\}^{(l-2)/l_\phi}$, where $l_\phi$ controls the statistical zero-knowledge property. Since the protocol uses bit challenges, it is not very efficient. Boudot presents an enhanced solution (**Boudot00?**) and Camenisch & Michels (**Camenisch98?**; **Camenisch98b?**) provide a modification which allows a proof that $(b-2^l < \alpha < b + 2^l)$ for a fixed offset $b$. #### Proving equality of discrete logarithms. A proof of equality of discreet logarithms of group elements $y_0,y_1 \in G$ with respect to bases $g \in G$ and $h \in G$ (that is, the prover knows $\alpha$ such that $\log_g y_0 \equiv \log_h y_1$) is denoted $PK\{(\alpha) : y_0 = g^\alpha \wedge y_0 = h^\alpha\}$ (**Cramer93?**; **Pedersen92?**; **Chaum90?**). Generalisations to prove equalities among $y_0,\ldots,y_v \in G$ to bases $g_0,\ldots,g_v \in G$ are trivial (**Camenisch97?**). #### Proving equality of discrete logarithms in different groups. A proof of equality of discrete logarithms $y_0, y_1 \in G_0$ to the bases $g_0 \in G_0$ and $g_1 \in G_1$, where $G_0$ and $G_1$ are *different* groups can be constructed as follows. Let the orders of the groups be $q_0$, respectively $q_1$, and let $l$ be an integer such that $2^{l+1} < \min(q_0,q_1)$. The prover can convince the verifier that $\log_{g_0} y_0 \equiv \log_{g_1} y_1$ if $\alpha$ is an element in the tighter range $\{0,1\}^{(l-2)/l_\phi}$ by executing $PK\{(\alpha) : y_0 \stackrel{G_0}{=} g_0^\alpha \wedge y_1 \stackrel{G_1}{=} g_1^\alpha \wedge (-2^l < \alpha < 2^l)\}$. The prover and verifier engage in an initial setup during which the prover commits to $\tilde{y} = g^\beta h^\alpha \pmod{n}$, where $G = \langle g \rangle = \langle h \rangle$ – the order of which is unknown (to the verifier) – and $\beta \in_R G$. The prover then carries out $PK\{(\alpha,\beta) : y_0 \stackrel{G_0}{=} g_0^\alpha \wedge y_1 \stackrel{G_1}{=} g_1^\alpha \wedge \tilde{y} \stackrel{G}{=} g^\alpha h^\beta \wedge (-2^l < \alpha < 2^l)\}$ in collaboration with the verifier (**Camenisch99?**). ## Camenisch-Lysyanskaya signature scheme RSA-based DAA is based upon the Camenisch-Lysyanskaya (CL) signature scheme (**CamenischLysyanskaya03?**; **Lysyanskaya02?**) which is secure under the strong RSA assumption. A summary of the scheme for signing blocks of $L$ messages $m_0,\ldots,m_{L-1}$, and a variant for signatures on committed values, are presented below. #### Key generation. On input length $l_n$ of the special RSA modulus, choose safe primes $p$ and $q$ of length $\lceil\frac{l_n}{2}\rceil$. Let $n = pq$ and select $R_0,\ldots,R_{L-1},S,Z \in_R QR_n$. #### Message space. The message space is the set $\{(m_0,\ldots,m_{L-1}) : m_i \in \pm\{0,1\}^{l_m}\}$, where $l_m$ is a parameter and $L$ is the number of blocks. #### Signature scheme for blocks. On input message blocks $m_0,\ldots,m_{L-1}$, choose a random prime $e$ of length $l_e \ge l_m + 1$ and select a random number $v$ of length $l_v > l_n + l_m + l_r$, where $l_r$ is a security parameter. Compute $A$ such that $Z \equiv R_0^{m_0} \cdots R_{L-1}^{m_{L-1}} S^v A^e \pmod{n}$. The signature on blocks $(m_0,\ldots,m_{L-1})$ is defined as $(A,e,v)$. #### Signature scheme for committed values. On input message blocks $m_0,\ldots,m_{L-1}$, select $v' \in_R \{0,1\}^{l_n+l_\phi}$ and compute the commitment $U = R_0^{m_0} \cdots R_{L-1}^{m_{L-1}} S^{v'} \pmod{n}$, where $l_\phi$ is a security parameter. Send the $U$ to the signer. On receipt of $U$ the signer chooses a random prime $e$ of length $l_e \ge l_m + 1$, selects $v'' \in_R [2^{l_v-1}, 2^{l_v}-1]$ and computes $A$ such that $Z \equiv U S^{v''} A^e \pmod{n}$. The signature $(A,e,v'')$ on the commitment $U$ is returned. The signature on the block of messages $m_0,\ldots,m_{L-1}$ is $(A,e,v= v' + v'')$. In order to keep $m_0,\ldots,m_{L-1}$ secret, $v$ must remain secret, while $A$ and $e$ can be public. #### Verification algorithm. To verify that the tuple $(A,e,v)$ is indeed a signature on the block of messages $m_0,\ldots,m_{L-1}$, check that $Z \equiv R_0^{m_0} \cdots R_{L-1}^{m_{L-1}} S^v A^e \pmod{n}$ and ensure $2^{l_e} > e > 2^{l_e-1}$. # Protocol description RSA-based DAA (**Chen04:RSA-DAA?**) was the first concrete Direct Anonymous Attestation scheme, and is of particular significance because support is mandated in the TPM specification version 1.2 which has been implemented and deployed in over 300 million computers. This section presents a detailed protocol description. ## Security parameters The security parameters $l_n, l_f, l_v, l_e, l'_e, l_\phi, l_r, l_H, l_\Gamma, l_\rho$ are defined. The purpose of each will now be discussed. The number in parentheses represents the proposed values of these parameters, which have been adopted from the original schema (**Chen04:RSA-DAA?**). The parameter $l_n$ (2048) is the size of the RSA modulus and $l_f$ (104) is the size of the TPM’s secret $\texttt{tsk}= (f_0,f_1)$ values. The size of the random $v$ part of the certificate is specified by $l_v$ (2536); the size of prime $e$ is $l_e$ (368); and $l'_e$ (120) is the size of the interval from which the $e$’s are selected. $l_\phi$ (80) controls the statistical zero-knowledge property, $l_r$ (80) is needed for the reduction in the proof of security and $l_H$ (160) is the length of the output from the hash function used for the Fiat-Shamir heuristic. The parameter $l_\Gamma$ is the size of the modulus $\Gamma$ and finally, $l_\rho$ is the size of the order $\rho$ of the subgroup of $\mathbb{Z}_\Gamma^*$ that is used for rogue tagging. The scheme requires that: $l_e > l_\phi + l_H + max(l_f+4, l'_e+2)$, $l_v > l_n + l_\phi + l_H + max(l_f+l_r+3, l_\phi+2)$ and $l_\rho = 2l_f$. Finally, let $H(\cdot)$ and $H_\Gamma(\cdot)$ be two collision resistant hash functions such that $H(\cdot) : \{0,1\}^* \rightarrow \{0,1\}^{l_H}$ and $H_\Gamma(\cdot) : \{0,1\}^* \rightarrow \{0,1\}^{l_\Gamma+l_\phi}$. It should be noted that collision resistant hash functions exist under the strong RSA assumption. ## Setup algorithm The description of how an issuer creates a key pair, and a non-interactive proof that the key values are correctly formed, are shown below (adapted from (**Chen04:RSA-DAA?**)). The latter provides an assurance to the host that privacy requirements will be preserved. 1. Choose a special RSA modulus $n=pq$ with $p=2p'+1$ and $q=2q'+1$, where $p,p',q,q'$ are all primes and $n$ has $l_n$ bits. 2. Select a random generator $g'$ of $QR_n$. 3. Choose $x_g,x_h,x_s,x_z,x_0,x_1 \in_R [1,\phi(n)]$ and compute: $$\begin{aligned} g &= g'^{x_g} \bmod{n}& h &= g'^{x_h} \bmod{n}& S &= h^{x_s} \bmod{n} \\ Z &= h^{x_z} \bmod{n}& R_0 &= S^{x_0} \bmod{n}& R_1 &= S^{x_1} \bmod{n} \end{aligned}$$ 4. Generate a group of prime order. Pick random primes $\rho$ and $\Gamma$ such that $\Gamma = r\rho + 1$ for some $r$ with $\rho \nmid r$, $2^{l_\Gamma - 1} < \Gamma < 2^{l_\Gamma}$ and $2^{l_\rho - 1} < \rho < 2^{l_\rho}$. Select $\gamma \in_R \mathbb{Z}_\Gamma^*$, where $\gamma^{(\Gamma - 1)/\rho} \not\equiv 1 \pmod{\Gamma}$. 5. Produce a non-interactive *proof* that $g,h,S,Z,R_0,R_1$ are computed correctly, that is, $g,h \in \langle g' \rangle$, $S,Z \in \langle h \rangle$ and $R_0,R_1 \in \langle S \rangle$. 1. Choose randoms $$\begin{aligned} \tilde{x}_{(g,1)},\ldots,\tilde{x}_{(g,l_H)} &\in_R [1,\phi(n)] & \tilde{x}_{(h,1)},\ldots,\tilde{x}_{(h,l_H)} &\in_R [1,\phi(n)] \\ \tilde{x}_{(s,1)},\ldots,\tilde{x}_{(s,l_H)} &\in_R [1,\phi(n)] & \tilde{x}_{(z,1)},\ldots,\tilde{x}_{(z,l_H)} &\in_R [1,\phi(n)] \\ \tilde{x}_{(0,1)},\ldots,\tilde{x}_{(0,l_H)} &\in_R [1,\phi(n)] & \tilde{x}_{(1,1)},\ldots,\tilde{x}_{(1,l_H)} &\in_R [1,\phi(n)] \end{aligned}$$ 2. Compute *for $i=1$ to $l_H$* $$\begin{aligned} \tilde{g}_{(g,i)} &= g'^{\tilde{x}_{(g,i)}} \bmod{n} & \tilde{h}_{(h,i)} &= g'^{\tilde{x}_{(h,i)}} \bmod{n} \\ \tilde{S}_{(s,i)} &= h^{\tilde{x}_{(s,i)}} \bmod{n} & \tilde{Z}_{(z,i)} &= h^{\tilde{x}_{(z,i)}} \bmod{n} \\ \tilde{R}_{(0,i)} &= S^{\tilde{x}_{(0,i)}} \bmod{n} & \tilde{R}_{(1,i)} &= S^{\tilde{x}_{(1,i)}} \bmod{n} \end{aligned}$$ 3. Compute $$\begin{gathered} c = H(n\|g'\|g\|h\|S\|Z\|R_0\|R_1\|\tilde{g}_{(g,1)}\|\ldots\|\tilde{g}_{(g,l_H)}\| \\ \tilde{h}_{(h,1)}\|\ldots\|\tilde{h}_{(h,l_H)}\| \tilde{S}_{(s,1)}\|\ldots\|\tilde{S}_{(s,l_H)}\| \tilde{Z}_{(z,1)}\|\ldots\|\tilde{Z}_{(z,l_H)}\| \\ \tilde{R}_{(0,1)}\|\ldots\|\tilde{R}_{(0,l_H)}\| \tilde{R}_{(1,1)}\|\ldots\|\tilde{R}_{(1,l_H)}) \end{gathered}$$ 4. Compute *for $i=1$ to $l_H$*, where $c_i$ is the $i$th bit of $c$ $$\begin{aligned} \hat{x}_{(g,i)} &= \tilde{x}_{(g,i)} - c_i x_g \bmod{\phi(n)} & \hat{x}_{(h,i)} &= \tilde{x}_{(h,i)} - c_i x_h \bmod{\phi(n)} \\ \hat{x}_{(s,i)} &= \tilde{x}_{(s,i)} - c_i x_s \bmod{\phi(n)} & \hat{x}_{(z,i)} &= \tilde{x}_{(z,i)} - c_i x_z \bmod{\phi(n)} \\ \hat{x}_{(0,i)} &= \tilde{x}_{(0,i)} - c_i x_0 \bmod{\phi(n)} & \hat{x}_{(1,i)} &= \tilde{x}_{(1,i)} - c_i x_1 \bmod{\phi(n)} \end{aligned}$$ 5. Let $$\begin{gathered} \texttt{proof}= (c,\hat{x}_{(g,1)},\ldots,\hat{x}_{(g,l_H)}, \hat{x}_{(h,1)},\ldots,\hat{x}_{(h,l_H)}, \hat{x}_{(s,1)},\ldots,\hat{x}_{(s,l_H)},\\ \hat{x}_{(z,1)},\ldots,\hat{x}_{(z,l_H)}, \hat{x}_{(0,1)},\ldots,\hat{x}_{(0,l_H)}, \hat{x}_{(1,1)},\ldots,\hat{x}_{(1,l_H)}) \end{gathered}$$ 6. Finally, the public key $(n,g',g,h,S,Z,R_0,R_1,\gamma,\Gamma,\rho)$ and $\texttt{proof}$ are published. The private key values $p',q'$ are stored by the issuer. ### Verification of the Issuer’s public key A valid public key is essential to ensure the privacy of the host. Incorrectly formed $g,h,S,Z,R_0,R_1$ values could potentially break this property. Furthermore, if $\gamma$ does not generate the subgroup $\mathbb{Z}_\Gamma^*$ the issuer can link transactions (signatures presented to the verifier). The requirement that $n$ is a special RSA modulus ensures that Step [stepDesIssZK] of the join algorithm is zero-knowledge. This is of concern to the issuer and is not important to the security of the host. Verification of an issuer’s public key is shown below (adapted from (**Chen04:RSA-DAA?**)). Note that this verification need only be performed once and not necessarily by every user of a system (that is, in a multi-user environment, it is sufficient for a single user to perform the verification). 1. Verify the $\texttt{proof}$, that is check $g,h \in \langle g' \rangle$, $S,Z \in \langle h \rangle$ and $R_0,R_1 \in \langle S \rangle$. On input: $$\begin{gathered} \texttt{proof}= (c,\hat{x}_{(g,1)},\ldots,\hat{x}_{(g,l_H)}, \hat{x}_{(h,1)},\ldots,\hat{x}_{(h,l_H)}, \hat{x}_{(s,1)},\ldots,\hat{x}_{(s,l_H)},\\ \hat{x}_{(z,1)},\ldots,\hat{x}_{(z,l_H)}, \hat{x}_{(0,1)},\ldots,\hat{x}_{(0,l_H)}, \hat{x}_{(1,1)},\ldots,\hat{x}_{(1,l_H)}) \end{gathered}$$ 1. Compute *for $i=1$ to $l_H$*, where $c_i$ is the $i$th bit of $c$ $$\begin{aligned} \hat{g}_{(g,i)} &= g^{c_i} g'^{\hat{x}_{(g,i)}} \bmod{n} & \hat{h}_{(h,i)} &= h^{c_i} g'^{\hat{x}_{(h,i)}} \bmod{n} \\ \hat{S}_{(s,i)} &= S^{c_i} h^{\hat{x}_{(s,i)}} \bmod{n} & \hat{Z}_{(z,i)} &= Z^{c_i} h^{\hat{x}_{(z,i)}} \bmod{n} \\ \hat{R}_{(0,i)} &= R_0^{c_i} S^{\hat{x}_{(0,i)}} \bmod{n} & \hat{R}_{(1,i)} &= R_1^{c_i} S^{\hat{x}_{(1,i)}} \bmod{n} \end{aligned}$$ 2. Verify $$\begin{gathered} c \stackrel{?}{=} H(n\|g'\|g\|h\|S\|Z\|R_0\|R_1\|\hat{g}_{(g,1)}\|\ldots\|\hat{g}_{(g,l_H)}\| \\ \hat{h}_{(h,1)}\|\ldots\|\hat{h}_{(h,l_H)}\| \hat{S}_{(s,1)}\|\ldots\|\hat{S}_{(s,l_H)}\| \hat{Z}_{(z,1)}\|\ldots\|\hat{Z}_{(z,l_H)}\| \\ \hat{R}_{(0,1)}\|\ldots\|\hat{R}_{(0,l_H)}\| \hat{R}_{(1,1)}\|\ldots\|\hat{R}_{(1,l_H)}) \end{gathered}$$ 2. Check that $\Gamma$ and $\rho$ are primes. Ensure $\rho \mid (\Gamma - 1)$, $\rho \nmid \frac{\Gamma-1}{\rho}$ and $\gamma^\rho \equiv 1 \pmod{\Gamma}$. 3. Check that all public key values have the required length. ## Join algorithm The purpose of the join algorithm is to enable a host/TPM to acquire a CL-signature on a secret $\texttt{tsk}$ value which can later be used as an anonymous attestation identity credential. Let $PK_I = (n, g', g, h, S, Z, R_0, R_1, \gamma, \Gamma, \rho)$ be the public key of the issuer and $PK'_I$ the long term public key of the issuer used to authenticate $PK_I$. The value $\texttt{bsn}_I$ is a unique basename assigned to each issuer and $\texttt{cnt}$ is an internal counter stored within the TPM. The counter records the number of times the TPM has executed the join algorithm. Prior to executing the join algorithm, the host is assumed to verify that $PK_I$ is authenticated by $PK'_I$. The TPM computes $\texttt{tsk}$ using the issuer’s public key, its secret seed $\texttt{DAASeed}$ and counter value $\texttt{cnt}$. Computing $\texttt{tsk}$ from the secret seed $\texttt{DAASeed}$ – as opposed to a random nonce – reduces the computational and storage requirements of the TPM. The counter value allows the TPM to obtain different DAA keys using the same $\texttt{DAASeed}$; alternatively, the TPM is allowed to re-run the join algorithm using the same $\texttt{cnt}$ value. The TPM splits the $\texttt{tsk}$ value into two $l_f$ bit messages; the pair $(f_0,f_1)$ allows computation of smaller exponentials and permits the use of a smaller prime $e$. The TPM commits to the message pair ($f_0,f_1$), that is, the TPM derives $U = R_0^{f_0} R_1^{f_1} S^{v'} \pmod{n}$, where $v'$ is a random commitment factor. The TPM also computes $N_I = \zeta_I^{f_0+f_1 2^{l_f}} \pmod{\Gamma}$ for rogue tagging purposes. The TPM forwards $U,N_I$ to the host who sends them to the issuer. The TPM and issuer establish a one-way authenticated channel to assure the issuer of the origin of $U$. The issuer checks whether $\texttt{tsk}$ stems from a rogue TPM or if $N_I$ has been used too many times previously, in which case it aborts. The platform convinces the issuer that $U,N_I$ are correctly formed, and that the $f_i$’s are of the appropriate lengths. To grant a certificate, the issuer executes the CL-signature protocol and sends the platform $(A,e,v'')$. The issuer also provides a signature proof of knowledge (Step [stepDesIssSPK]) that $A \in \langle h \rangle$. The host verifies the proof and is assured that $A$ can be statistically hidden in $\langle h \rangle$, preventing an adversarial issuer from violating privacy. Note that an adversarial issuer could compute $A = b \left( \frac{Z}{U S^{v''}} \right)^{1/e} \pmod{n}$, where $b^e = 1$ and $b \not \in \langle h \rangle$. Since the sign algorithm contains $T = AS^w$ for some random $w$, the adversarial would be able to link $T$ to $A$ (by testing $T \in \langle h \rangle$) and thus violate privacy (**Chen04:RSA-DAA?**). The pair $(A,e)$ is stored by the host and can be publicly known. The host forwards $v''$ to the TPM; the TPM recovers $v = v' + v''$, that is, a signature on the TPM’s secret $\texttt{tsk}= (f_0,f_1)$. The explicit details of the join algorithm are provided below (adapted from (**Chen04:RSA-DAA?**)). 1. The host computes $\zeta_I = (H_\Gamma(0\|\texttt{bsn}_I))^{(\Gamma - 1)/\rho} \pmod{\Gamma}$ and sends $\zeta_I$ to the TPM. 2. The TPM checks whether $\zeta_I^\rho \stackrel{?}{\equiv} 1 \pmod{\Gamma}$. Let $i = \lfloor \frac{l_\rho + l_\phi}{l_H} \rfloor$ ($i=1$ for the parameters specified in Section 1.1). The TPM computes: $$\begin{gathered} \texttt{tsk}= H\Bigl(H\bigl(\texttt{DAASeed}\|H(PK'_I)\bigr)\|\texttt{cnt}\|0\Bigl)\| \\ \ldots\|H\Bigl(H\bigl(\texttt{DAASeed}\|H(PK'_I)\bigr)\|\texttt{cnt}\|i\Bigr) \pmod{\rho}, \end{gathered}$$ $$\begin{gathered} f_0 = LSB_{l_f}(\texttt{tsk}), \quad f_1 = MSB_{l_f}(\texttt{tsk}), \quad v' \in_R \{0,1\}^{l_n+l_\phi}, \\ U = R_0^{f_0} R_1^{f_1}S^{v'} \pmod{n}, \quad N_I = \zeta_I^{f_0 + f_1 2^{l_f}} \pmod{\Gamma} \end{gathered}$$ The TPM forwards $U$ and $N_I$ to the host who sends them to the issuer. 3. The issuer checks that the $U$ value stems from the TPM that owns a given public endorsement key ($PK_{ek}$): 1. The issuer chooses $n_e \in_R \{0,1\}^{l_\phi}$, encrypts $n_e$ with $PK_{ek}$ and sends the encryption to the TPM. 2. The TPM decrypts the value, revealing $n_e$, computes $a_U = H(U\|n_e)$ and returns $a_U$ to the issuer. 3. The issuer checks $a_U \stackrel{?}{=} H(U\|n_e)$. 4. The issuer ensures for all ($\tilde{f}_0,\tilde{f}_1$) on the rogue list $N_I \stackrel{?}{\not\equiv} \zeta_I^{\tilde{f}_0+\tilde{f}_1 2^{l_f}} \pmod{\Gamma}$. The issuer also checks that the $N_I$ has not been used too many times. If the issuer finds the platform to be rogue, it aborts. 5. The platform proves knowledge of $f_0,f_1$ and $v'$. It executes: $$\begin{gathered} SPK\{(f_0,f_1,v') : \quad U \equiv R_0^{f_0} R_1^{f_1} S^{v'} \pmod{n} \quad \wedge \quad N_I \equiv \zeta_I^{f_0 + f_1 2^{l_f}} \pmod{\Gamma} \\ \mathrel \wedge f_0,f_1 \in \{0,1\}^{l_f+l_\phi+l_H+2} \quad \wedge \quad v' \in \{0,1\}^{l_n+l_\phi+l_h+2} \}(n_t\|n_i) \end{gathered}$$ 1. The TPM chooses $r_{f_0},r_{f_1} \in_R \{0,1\}^{l_f+l_\phi+l_H}$ and $r_{v'} \in_R \{0,1\}^{l_n+l_\phi+l_H+2}$. It computes $\tilde{U} = R_0^{r_{f_0}} R_1^{r_{f_1}} S^{r_{v'}} \pmod{n}$, $\tilde{N}_I = \zeta_I^{r_{f_0}+r_{f_1}+2^{l_f}} \pmod{\Gamma}$ and sends $\tilde{U},\tilde{N}_I$ to the host. 2. The issuer selects $n_i \in_R \{0,1\}^{l_H}$ and sends it to the host. 3. The host computes $c_h = H(n\|R_0 \|R_1 \|S\|U\|N_I\|\tilde{U}\|\tilde{N}_I\|n_i)$ and sends $c_h$ to the TPM. 4. The TPM picks $n_t \in_R \{0,1\}^{l_\phi}$, computes $c=H(c_h\|n_t)$, and calculates $s_{f_0} = r_{f_0} + c \cdot f_0$, $s_{f_1} = r_{f_1} + c \cdot f_1$ and $s_{v'} = r_{v'} + c \cdot v'$. The TPM sends $(c,n_t,s_{f_0},s_{f_1},s_{v'})$ to the host, who forwards to the issuer. 5. The issuer computes: $$\hat{U} = \pm U^{-c} R_0^{s_{f_0}} R_1^{s_{f_1}} S^{s_{v'}} \pmod{n} \textrm{ and } \hat{N_I} = N_I^{-c} \zeta_I^{s_{f_0} + s_{f_1} 2^{l_f}} \pmod{\Gamma}$$ and verifies the proof by checking: $$\begin{gathered} c \stackrel{?}{=} H\bigl(H(n\|R_0 \|R_1 \|S\|U\|N_I\|\tilde{U}\|\tilde{N}_I\|n_i)\|n_t\bigr), \\ s_{f_0},s_{f_1} \stackrel{?}{\in} \{0,1\}^{l_f+l_\phi+l_H+1} \quad \textrm{ and } \quad s_{v'} \stackrel{?}{\in} \{0,1\}^{l_n+2l_\phi+l_H+1} \end{gathered}$$ 6. The issuer chooses $v'' \in_R [2^{l_v},2^{l_v}-1]$, a prime $e \in_R [2^{l_e - 1}, 2^{l_e - 1} + 2^{l'_e - 1}]$ and computes $Z = U S^{v''} A^e \pmod{n}$. That is, the issuer produces a CL-signature on U. 7. To convince the host that $A$ was correctly formed, the issuer runs the protocol: $$SPK\{(d) : A \equiv \pm \left( \frac{Z}{U S^{v''}} \right)^d \pmod{n} \}(n_h)$$ 1. The host selects $n_h \in_R \{0,1\}^{l_\phi}$ and sends $n_h$ to the issuer. 2. The issuer chooses $r_e \in_R [0,\phi(n)]$ and computes: $$\begin{gathered} \tilde{A} = \left( \frac{Z}{U S^{v''}} \right)^{r_e} \pmod{n}, \\ \quad c' = H(n\|Z\|S\|U\|v''\|A\|\tilde{A}\|n_h), \quad s_e = r_e - c' / e \mod{\phi(n)} \end{gathered}$$ and sends $c',s_e$ and $(A,e,v'')$ to the host. 3. The host verifies that $e$ is prime and $e \in [2^{l_e - 1}, 2^{l_e - 1} + 2^{l'_e - 1}]$, computes: $$\hat{A} = A^{c'} \left( \frac{Z}{U S^{v''}} \right)^{s_e} \pmod{n}$$ and checks that: $$c' \stackrel{?}{=} H(n\|Z\|S\|U\|v''\|A\|\hat{A}\|n_h)$$ 4. The host forwards $v''$ to the TPM, which in turn stores $v = v'' + v'$. ## Sign algorithm The sign algorithm enables the host to generate a signature proof of knowledge of attestation on a message $m$. Intuitively, if a verifier is presented with such a proof, it is convinced that it is communicating with a trusted platform and the message is genuine. In addition, the host must convince the verifier that it is not rogue. The message $m$ may be either a public part of an Attestation Identity Key (AIK) produced by the TPM or an arbitrary message. If $m$ is an AIK, the key can later be used to sign PCR data or to certify a non-migratable key. Where $m$ is an arbitrary message its purpose is application dependent. It may, for example, be a session key. To distinguish between these two modes of operation, a variable $b$ is defined. When $b = 0$, the message was generated by the TPM and when $b = 1$, the message was input to the TPM. Let $n_v \in \{0,1\}^{l_H}$ be a nonce generated by the verifier and $\texttt{bsn}$ the verifier’s basename. The algorithm is described below (adapted from (**Chen04:RSA-DAA?**; **Chen04:DAA-in-context?**)), as a result of which the signature $\sigma = (\zeta,T,N_V,c,n_t,s_{\bar{v}},s_{f_0},s_{f_1},s_e)$ will be produced. Many of the secrets involved in the process are actually known to the host. In fact only $f_0,f_1,v$ need to remain secret to the TPM. 1. 1. Depending on whether linkability is desirable, the host computes $\zeta$ as follows: $$\zeta \in_R \langle \gamma \rangle \quad \text{or} \quad \zeta = (H_\Gamma(0\|\texttt{bsn}))^{(\Gamma - 1)/\rho} \pmod{\Gamma}$$ and sends $\zeta$ to the TPM. 2. The TPM checks $\zeta \stackrel{?}{\in} \langle \gamma \rangle$; that is, it verifies $\zeta^\rho \stackrel{?}{\equiv} 1 \pmod{\Gamma}$. 2. 1. The host picks $w \in_R \{0,1\}^{l_n + l_\phi}$ and computes $T = AS^w \pmod{n}$. 2. The TPM computes $N_V = \zeta^{f_0+f_1 2^{l_f}} \pmod{\Gamma}$ and sends $N_V$ to the host. 3. The platform produces a signature of knowledge that $T$ commits to an attestation certificate and $N_V$ was computed using the same secret value $f_0,f_1$: $$\begin{gathered} SPK\{(f_0,f_1,\bar{v},e) : Z \equiv \pm T^e R_0^{f_0} R_1^{f_1} S^{\bar{v}} \pmod{n} \quad \wedge \quad N_V \equiv \pm \zeta^{f_0 + f_1 2^{l_f}} \pmod{\Gamma} \\ \wedge \quad f_0,f_1 \in \{0,1\}^{l_f + l_\phi + l_H + 2} \quad \wedge \quad (e - 2^{l_e}) \in \{0,1\}^{l'_e + l_\phi + l_H + 1} \}(n_t\|n_v\|b\|m) \end{gathered}$$ 1. 1. The TPM chooses random integers $r_v \in_R \{0,1\}^{l_v + l_\phi + l_H}$ and $r_{f_0},r_{f_1} \in_R \{0,1\}^{l_f + l_\phi + l_H}$ and computes: $$\begin{gathered} \tilde{T}_{1t} = R_0^{r_{f_0}} R_1^{r_{f_1}} S^{r_v} \pmod{n} \\ \tilde{r}_f = r_{f_0} + r_{f_1} 2^{l_f} \pmod{\rho} \quad \tilde{N}_V = \zeta^{\tilde{r}_f} \pmod{\Gamma} \end{gathered}$$ The TPM sends $\tilde{T}_{1t}$ and $\tilde{N}_V$ to the host[^3]. 2. The host selects random integers: $$\begin{aligned} r_e &\in_R \{0,1\}^{l'_e+l_\phi+l_H} & r_{\bar{v}} &\in_R \{0,1\}^{l_e+l_n+2l_\phi+l_H+1} \end{aligned}$$ and computes $\tilde{T} = \tilde{T}_t T^{r_e} S^{r_{\bar{v}}} \pmod{n}$. 2. 1. The host computes: $$c_h = H(n\|g\|g'\|h\|R_0\|R_1\|S\|Z\|\gamma\|\Gamma\|\rho\|\zeta\|T\|N_V\|\tilde{T}\|\tilde{N}_V\|n_v)$$ and sends $c_h$ to the TPM. 2. The TPM picks $n_t \in_R \{0,1\}^{l_\phi}$, computes $c = H\bigl(H(c_h\|n_t)\|b\|m\bigr)$ and sends $c,n_t$ to the host. 3. 1. The TPM computes $$s_v = r_v + c \cdot v \qquad s_{f_0} = r_{f_0} + c \cdot f_0 \qquad s_{f_1} = r_{f_1} + c \cdot f_1$$ and sends $s_v,s_{f_0},s_{f_1}$ to the host. 2. The host computes: $$\begin{aligned} s_e &= r_e + c \cdot (e - 2^{l_e-1}) & s_{\bar{v}} &= s_{v} + r_{v} - c \cdot w \cdot e \end{aligned}$$ 4. The host outputs the signature $\sigma = (\zeta,T,N_V,c,n_t,s_{\bar{v}},s_{f_0},s_{f_1},s_e)$. The main difference between the DAA signing algorithm and the signature generation of prior schemes (**Camenisch01?**; **Lysyanskaya02?**; **CamenischLysyanskaya03?**) is that DAA distributes the computation between the TPM and the host. The TPM only produces a signature proof of knowledge $SPK\{(f_0,f_1,v): (Z/A^e) \equiv R_0^{f_0} R_1^{f_1} S^v \pmod{n} \wedge N_V \equiv \zeta^{f_0 + f_1 2^{l_f}} \pmod{\Gamma}\}(n_t\|n_v\|b\|m)$, which the host extends to a full DAA signature. Note that the signature produced by the TPM is not anonymous, as the value $(Z/A^e)$ would fully identify the host. ## Verification algorithm The verification algorithm defines the method by which a verifier checks a signature $\sigma$ on message $m$ with respect to the issuer’s public key $(n, g', g, h, S, Z, R_0,$$R_1, \gamma, \Gamma, \rho)$. The algorithm is described below (adapted from (**Chen04:RSA-DAA?**; **Chen04:DAA-in-context?**)). 1. The verifier computes: $$\begin{aligned} \hat{T} &= Z^{-c} T^{s_e + c 2^{l_e - 1}} R_0^{s_{f_0}} R_1^{s_{f_1}} S^{s_{\bar{v}}} \pmod{n} & \hat{N}_V &= N_V^{-c} \zeta^{s_{f_0}+s_{f_1}} \pmod{\Gamma} \end{aligned}$$ 2. The verifier checks: $$\begin{gathered} c \stackrel{?}{=} H\Bigl(H\bigl(H(n\|g\|g'\|h\|R_0\|R_1\|S\|Z\|\gamma\|\Gamma\|\rho\|\zeta\|T\|N_V\|\hat{T}\|\hat{N}_V\|n_v)\|n_t\bigl)\|b\|m\Bigl), \\ N_V, \zeta \stackrel{?}{\in} \langle \gamma \rangle, \qquad s_{f_0}, s_{f_1} \stackrel{?}{\in} \{0,1\}^{l_f+l_\phi+l_H+1} \quad \text{ and } \quad s_e \stackrel{?}{\in} \{0,1\}^{l'_e+l_\phi+l_H+1} \end{gathered}$$ Note that the check $N_V, \zeta \stackrel{?}{\in} \langle \gamma \rangle$ can be done by raising $N_V$ and $\zeta$ to the order of $\gamma$ (which is $\rho$) and verifying the result is one; that is, checking that $N_V^\rho \stackrel{?}{\equiv} 1 \pmod{\Gamma}$ and $\zeta^\rho \stackrel{?}{\equiv} 1 \pmod{\Gamma}$. 3. If $\zeta$ was derived from the verifier’s basename, check that $\zeta \stackrel{?}{\equiv} (H_\Gamma(0\|\texttt{bsn}_I))^{(\Gamma - 1)/\rho} \pmod{\Gamma}$. 4. The verifier checks for all ($\tilde{f}_0,\tilde{f}_1$) on the rogue list that $N_I \stackrel{?}{\not\equiv} \zeta_I^{\tilde{f}_0+\tilde{f}_1 2^{l_f}} \pmod{\Gamma}$. # Specification analysis: Violating anonymity Suppose a trusted platform, with a public endorsement key $PK_{ek}$, executes the join and sign algorithm using the same basename $\texttt{bsn}$ (such that $\texttt{bsn}\not= \perp$). Further assume that the issuer has a public key $(n,g',g,h,S,Z,R_0,R_1,\gamma,\Gamma,\rho)$, which the trusted platform has verified, and the security parameter $l_f$ is used. During Step 2 of the join algorithm, the platform computes $N_I = \zeta_I^{f_0 + f_1 2^{l_f}} \pmod{\Gamma}$, where $\zeta_I = (H_\Gamma(0\|\texttt{bsn}))^{(\Gamma - 1)/\rho} \pmod{\Gamma}$, $f_0 = LSB_{l_f}(\texttt{tsk})$ and $f_1 = MSB_{l_f}(\texttt{tsk})$. The value $N_I$ is sent to the issuer. The platform then authenticates using the identity $PK_{ek}$. During Step 2 of the sign algorithm, the platform computes $N_V = \zeta^{f_0+f_1 2^{l_f}} \pmod{\Gamma}$, where $\zeta = (H_\Gamma(0\|\texttt{bsn}))^{(\Gamma - 1)/\rho} \pmod{\Gamma}$, $f_0 = LSB_{l_f}(\texttt{tsk})$ and $f_1 = MSB_{l_f}(\texttt{tsk})$. The value $N_V$ is sent to the verifier. It follows immediately that $N_I = N_V$ and, moreover, $N_I$ can be linked to the identity $PK_{ek}$; that is, the privacy of the trusted platform is violated. # Specification solution: Restoring anonymity The protocol can be fixed by refining Step 1 of the sign algorithm to use $$\zeta = (H_\Gamma(1\|\texttt{bsn}))^{(\Gamma - 1)/\rho} \pmod{\Gamma}$$ when linkability is required. To maintain correctness of the protocol, Step 3 of the verification algorithm must check $\zeta \stackrel{?}{\equiv} (H_\Gamma(1\|\texttt{bsn}_I))^{(\Gamma - 1)/\rho} \pmod{\Gamma}$. Appendix [app-daa-thm] shows that the revised protocol satisfies user-controlled anonymity in the formal model. # RSA-based DAA with user-controlled anonymity Section [sec:daa:RSA:analysis] presents an analysis of user-controlled anonymity in the RSA-based DAA protocol and discovers a vulnerability. The proof of this result appears in Section [app-daa-counter]. A security fix was presented in Section [sec:daa:RSA:solution], and we prove that the solution satisfies user-controlled anonymity in Section [app-daa-thm]. # Proof of Theorem [thm:daa:anon]
*Proof.* Let ${\sf DAA_{RSA}}$ be the augmented Direct Anonymous Attestation biprocess derived from the specification $\langle \sf{Join}_{RSA}, \sf{Sign}_{RSA} \rangle$. Let us consider the evaluation context $$\begin{array}{lcl} C[\_] &=& \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\mathsf{pk}(sk_I),\texttt{bsn}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.\\ && c(w).c(x).\overline{c}\langle\mathsf{penc}(w,n,n_e)\rangle.c(z_a).\textnormal{if } z_a=\mathsf{hash}(n_e,\pi_{2}(x)) \textnormal{ then }\\ && \overline{c}\langle n_i\rangle.c(z_s).\overline{c}\langle\mathsf{clsign}(sk_I,e,v'',\pi_{2}(x))\rangle.\\ && c(w').c(x').\overline{c}\langle\mathsf{penc}(w',n,n_e)\rangle.c(z'_a).\textnormal{if } z'_a=\mathsf{hash}(n_e,\pi_{2}(x')) \textnormal{ then }\\ && \overline{c}\langle n_i\rangle.c(z'_s).\overline{c}\langle\mathsf{clsign}(sk_I,e,v'',\pi_{2}(x'))\rangle.\\ && \overline{c}\langle\mbox{$(\mkern-2.8mu\rule[-.47ex]{.08ex}{2.10ex}\mkern 3mu$}{\texttt{bsn},{\sf msg}}\mbox{$\mkern 3mu\rule[-.47ex]{.08ex}{2.1ex}\mkern-2.5mu)$}\rangle.\overline{c}\langle n_v\rangle.c(y). \textnormal{if } \pi_{1}(x)=\pi_{3}(y) \textnormal{ then } \overline{b}\langle{\sf fail}\rangle \textnormal{ else }0\mid\_ \end{array}$$ We have $$\textnormal{fst}(C[{\sf DAA_{RSA}}]) \xrightarrow{}^* C'[\textnormal{if } \mathsf{commit}(\texttt{tsk},\zeta_I)=\mathsf{commit}(\texttt{tsk},\zeta) \textnormal{ then } \overline{b}\langle{\sf fail}\rangle \textnormal{ else }0]$$ and $$\textnormal{snd}(C[{\sf DAA_{RSA}}]) \xrightarrow{}^* C'[\textnormal{if } \mathsf{commit}(\texttt{tsk},\zeta_I)=\mathsf{commit}(\texttt{tsk}',\zeta) \textnormal{ then } \overline{b}\langle{\sf fail}\rangle \textnormal{ else }0]$$ where $$\begin{array}{lcl} \texttt{tsk}&=& \mathsf{hash}(\mathsf{hash}(\texttt{DAASeed},\mathsf{hash}(\mathsf{pk}(sk_I))),\texttt{cnt},\mathsf{0})\\ \texttt{tsk}'&=& \mathsf{hash}(\mathsf{hash}(\texttt{DAASeed}',\mathsf{hash}(\mathsf{pk}(sk_I))),\texttt{cnt}',\mathsf{0})\\ \zeta_I &=& \mathsf{hash}(\mathsf{0},\texttt{bsn})\\ \zeta &=& \mathsf{hash}(\mathsf{0},\texttt{bsn}) \end{array}$$ It follows that $\textnormal{fst}(C[{\sf DAA_{RSA}}]) \not\sim \textnormal{snd}(C[{\sf DAA_{RSA}}])$ because $\textnormal{fst}(C[{\sf DAA_{RSA}}])$ can output on channel $b$, but $\textnormal{snd}(C[{\sf DAA_{RSA}}])$ cannot; and therefore ${\sf DAA_{RSA}}$ does not satisfy user-controlled anonymity. ◻
# Analysis: Restoring user-controlled anonymity This section provides the scripts used to automatically verify that the revised RSA-based DAA protocol (Section [sec:daa:RSA:solution]) satisfies user-controlled anonymity. The free name declarations, function definitions and equations for the RSA-based DAA process specification appear in Listing [lst:app:example:daa:eq]; the join algorithm $\sf{Join}_{RSA'}$ is presented in Listing [lst:app:example:daa:join], and the sign algorithm $\sf{Sign}_{RSA'}$ appears in Listing [lst:app:example:daa:sign]. Finally, the augmented Direct Anonymous Attestation biprocess ${\sf DAA_{RSA'}}$ is presented in Listing [lst:app:example:daa:anon]. (The nonce `XXTERMINATION` is introduced to avoid an over-approximation issue.) ProVerif can be used to automatically verify observational equivalence of Listing [lst:app:example:daa:anon] and hence the revised RSA-based DAA protocol satisfies user-controlled anonymity. ``` fun accept/0. fun zero/0. fun one/0. fun FJoin/0. fun FSign/0. fun clgetnonce/1. fun clgetprime/1. fun hash/1. fun pk/1. fun commit/2. fun circ/2. fun dec/2. fun open/2. fun checkclsign/3. fun checkspk/3. fun clcommit/3. fun clopen/3. fun penc/3. fun spk/3. fun clsign/4. equation dec(k,penc(pk(k),r,m)) = m. equation clgetprime(clsign(xsk,xprime,xrand,xmsg)) = xprime. equation clgetnonce(clsign(xsk,xprime,xrand,xmsg)) = xrand. equation checkclsign(pk(xsk),xmsg,clsign(xsk,xprime,xrand,xmsg)) = accept. equation open(xrand,commit(xrand,xplain)) = xplain. equation clopen(x,xrand,clcommit(x,xrand,xplain)) = xplain. equation clopen(pk(xsk),xrand,clsign(xsk,yprime,yrand, clcommit(pk(xsk),xrand,xmsg))) = clsign(xsk,yprime,xrand,xmsg). equation checkspk(FJoin,(xzeta,xpk,commit(xtsk,xzeta), clcommit(xpk,xv,xtsk),xmsg), spk(FJoin,(xtsk,xv),(xzeta,xpk,commit(xtsk,xzeta), clcommit(xpk,xv,xtsk),xmsg))) = accept. equation checkspk(FSign,(xzeta,pk(xsk),commit(xtsk,xzeta), clcommit(pk(xsk),xw,clsign(xsk,xe,xv,xtsk)),xmsg), spk(FSign,(xtsk,xw),(xzeta,pk(xsk),commit(xtsk,xzeta), clcommit(pk(xsk),xw,clsign(xsk,xe,xv,xtsk)),xmsg))) = accept. ``` ``` let join = in(aj,((pkI,bsnI),DAASeed,cnt,skM)); new v'; let zetaI = hash((zero,bsnI)) in let tsk = hash((hash((DAASeed,hash(pkI))),cnt,zero)) in let NI = commit(tsk,zetaI) in let U = clcommit(pkI,v',tsk) in out(c,(NI,U)); in(c,encNe); let ne = dec(skM,encNe) in out(c,hash((U,ne))); in(c,ni); new nt; out(c,(nt,spk(FJoin,(tsk,v'),(zetaI,pkI,NI,U,(nt,ni))))); in(c,sig); let cre = clopen(pkI,v',sig) in if checkclsign(pkI,tsk,cre) = accept then out(aj',(cre,tsk)). ``` ``` let sign = in(as,((pkI,bsnI),bsnV,m,cre,tsk,xxTERMINATION)); in(c,nv); new nt;new w; if bsnV = bottom then ( new zeta; let creHat = clcommit(pkI,w,cre) in let NV = commit(tsk,zeta) in out(as',(zeta,pkI,NV,creHat,nt, spk(FSign,(tsk,w),(zeta,pkI,NV,creHat,(nt,nv,m))))) ) else ( let zeta = hash((one,bsnV)) in let creHat = clcommit(pkI,w,cre) in let NV = commit(tsk,zeta) in out(as',(zeta,pkI,NV,creHat,nt, spk(FSign,(tsk,w),(zeta,pkI,NV,creHat,(nt,nv,m))))) ). ``` ``` free c. free chlP. free chlM. fun bottom/0. let SignerP = new aj;new aj';new as;new as';( !join )|( !sign )|( new cnt;new DAASeed;new skM;out(c,pk(skM)); ! out(aj,(wparams,DAASeed,cnt,skM)); in(aj',(cre,tsk)); (! in(c,(xmsg,=bottom));new XXTERMINATION; out(as,(wparams,bottom,xmsg,cre,tsk,XXTERMINATION)); in(as',z);out(c,z) )|(! in(c,(xmsg,xbsn));new XXTERMINATION; out(as,(wparams,(chlP,xbsn),xmsg,cre,tsk,XXTERMINATION)); in(as',z);out(c,z) )|( out(wb,(cre,tsk)) ) ). let Challenge = new as;new as';( sign ) | ( in(bA,(creA,tskA)); in(bB,(creB,tskB)); let cre = choice[creA,creB] in let tsk = choice[tskA,tskB] in ( in(c,(xmsg,=bottom));new XXTERMINATION; out(as,(wparams,bottom,xmsg,cre,tsk,XXTERMINATION)); in(as',x);out(c,x) )|( in(c,(xmsg,xbsn));new XXTERMINATION; out(as,(wparams,(chlM,xbsn),xmsg,cre,tsk,XXTERMINATION)); in(as',x);out(c,x) ) ). process in(c,wparams);new bA;new bB; (let wb = bA in SignerP)| (let wb = bB in SignerP)| (Challenge) ``` #### Optimised analysis. The ProVerif script in Listing [lst:app:example:daa:anon] has an execution time of 6 minutes 43 seconds By removing the name restrictions on the secret part of the endorsement key for each signer, the execution time is reduced to 92 seconds. This optimised script is presented in Listing [lst:app:example:daa:anon-opt]. ``` free c. free chlP. free chlM. free skA,skB. fun bottom/0. let SignerP = new aj;new aj';new as;new as';( !join )|( !sign )|( new cnt;new DAASeed; ! out(aj,(wparams,DAASeed,cnt,skM)); in(aj',(cre,tsk)); (! in(c,(xmsg,=bottom));new XXTERMINATION; out(as,(wparams,bottom,xmsg,cre,tsk,XXTERMINATION)); in(as',z);out(c,z) )|(! in(c,(xmsg,xbsn));new XXTERMINATION; out(as,(wparams,(chlP,xbsn),xmsg,cre,tsk,XXTERMINATION)); in(as',z);out(c,z) )|( out(wb,(cre,tsk)) ) ). let Challenge = new as;new as';( sign ) | ( in(bA,(creA,tskA)); in(bB,(creB,tskB)); let cre = choice[creA,creB] in let tsk = choice[tskA,tskB] in ( in(c,(xmsg,=bottom));new XXTERMINATION; out(as,(wparams,bottom,xmsg,cre,tsk,XXTERMINATION)); in(as',x);out(c,x) )|( in(c,(xmsg,xbsn));new XXTERMINATION; out(as,(wparams,(chlM,xbsn),xmsg,cre,tsk,XXTERMINATION)); in(as',x);out(c,x) ) ). process in(c,wparams);new bA;new bB; (let (wb,skM) = (bA,skA) in SignerP)| (let (wb,skM) = (bB,skB) in SignerP)| (Challenge) ``` # ProVerif scripts supporting Chapter [chap:obs] The proof of claims made in Example [ex:compiler] can be automatically verified using Listing [lst:app:example] as input to ProVerif, and Example [ex:compilerS] can be checked using Listing [lst:app:examplee]. ``` free c,k,m,n,s. query ev:eventM() ==> ev:eventK(). query ev:eventN() ==> ev:eventK(). query ev:eventS() ==> ev:eventK(). process new a1;new a2;new a3;new a4;new a5;new a6;new a7;new a8; ( out(a1,a1);in(a3,x); (* sync 1 *) event eventK(); out(c,k); out(a5,a5);in(a7,x'); (* sync 2 *) event eventM(); out(c,m) )|( out(a2,a2);in(a6,y); (* sync 2 *) event eventN(); out(c,n) )|( out(a4,a2);in(a8,y); (* sync 3 *) event eventS(); out(c,s) )|( in(a1,x);out(a3,x); (* sync 1 *) in(a5,x');in(a2,y); out(a7,x');out(a6,y); (* sync 2 *) in(a4,z);out(a8,z) (* sync 3 *) ) ``` ``` free c,k,m,n,s. fun bot/0. fun pair/2. reduc fst(pair(x,y)) = x. reduc snd(pair(x,y)) = y. process new a1;new a2;new a3;new a4;new a5;new a6;new a7;new a8; ( (* start sync 1 *) out(a1,choice[a1,pair(c,pair(k,pair(m,bot)))]); in(a3,x); (* end sync 1 *) out(choice[c,fst(x)],choice[k,fst(snd(x))]); (* start sync 2 *) out(a5,choice[a5,pair(fst(x),pair(fst(snd(snd(x))),bot))]); in(a7,x'); (* end sync 2 *) out(choice[c,fst(x')],choice[m,fst(snd(x'))]) )|( (* start sync 2 *) out(a2,choice[a2,pair(c,pair(n,bot))]); in(a6,y); (* end sync 2 *) out(choice[c,fst(y)],choice[n,fst(snd(y))]) )|( (* start sync 3 *) out(a4,choice[a4,pair(c,pair(s,bot))]); in(a8,z); (* end sync 3 *) out(choice[c,fst(z)],choice[s,fst(snd(z))]) )|( in(a1,x);out(a3,x); (* sync 1 *) in(a5,x');in(a2,y);out(a7,x');out(a6,y); (* sync 2 *) in(a4,z);out(a8,z) (* sync 3 *) ) ``` # Privacy results using ProSwapper Chapter [chap:obs] introduces a methodology to automatically analyse equivalence properties between processes which use barrier synchronisation. This technique has been implemented as a tool called ProSwapper which is available online: . More precisely, ProSwapper implements the compiler specified by Definition [def:stageElimWithSwap]. It takes processes with barriers as input and outputs a process, defined over the standard ProVerif syntax, with the possible swapping processes defined by process macros. If ProVerif can prove equivalence for a particular swapping process, then the input script should satisfy observational equivalence. The ProSwapper output included in this appendix was produced by ProSwapper version 0.2 alpha. Several of the examples in Chapter [chap:obs] have been automatically verified using ProSwapper. Listing [lst:app:example-3-7] models Example [ex:swappingSet] (pp) which can be compiled using ProSwapper to produce Listing [lst:app:example-3-7a], and automatically analysed using ProVerif. (For readability, the swapping process used to prove observational equivalence is included and the alternative swapping processes are omitted.) The remainder of this appendix considers vote privacy in the FOO electronic voting protocol (Section [app:obs:src:FOO]) and privacy in vehicular ad-hoc network (Section [app:obs:src:VANETS]) ``` free c,m,n. process ( out(c,m); sync 1; out(c,choice[m,n]) )|( sync 1; out(c,choice[n,m]) ) ``` ``` free c,m,n. process new aaa'1;new aaa'2;new aaa'3;new aaa'4; ( out(c,m); out(aaa'1,(n,m,c)); in(aaa'2,(xxx'1,xxx'2,xxx'3)); out(xxx'3,choice[xxx'2,xxx'1]) )|( out(aaa'3,(m,n,c)); in(aaa'4,(xxx'1,xxx'2,xxx'3)); out(xxx'3,choice[xxx'2,xxx'1]) )|( in(aaa'3,y1);in(aaa'1,y2); out(aaa'4,choice[y1,y2]);out(aaa'2,choice[y2,y1]) ) ``` # Privacy in electronic voting Section [sec:obs:FOO] presents an analysis of privacy in the FOO electronic voting protocol. This section provides the scripts used to automatically perform this analysis. The free name declarations, function definitions and equations appear in Listing [lst:app:example:foo:eq]. The encoding (Listing [lst:app:example:foo:proc]) of vote privacy follows immediately from pp and this script can be provided as input to ProSwapper to produce Listing [lst:app:example:foo:procA]. This listing can be automatically analysed with ProVerif. ``` free c. free skR,skA,skB. fun s/0. fun s'/0. fun true/0. fun blind/2. fun unblind/2. fun open/2. fun commit/2. fun pk/1. fun getmsg/1. fun sign/2. fun checksign/2. equation unblind(x,sign(y,blind(x,z))) = sign(y,z). equation unblind(x,blind(x,y)) = y. equation open(x,commit(x,y)) = y. equation checksign(pk(x),sign(x,y)) = true. equation getmsg(sign(x,y)) = y. ``` ``` let foo = new k;new k'; let M = commit(k,Xvote) in let MM = blind(k',M) in out(c,(pk(Xsk),sign(Xsk,MM))); in(c,y); if checksign(pk(skR),y) = true then if getmsg(y) = MM then let M' = unblind(k',y) in sync 1; out(c,(M,M')); sync 2; in(c,(z,=M,=M')); out(c,(z,k)). process (let (Xsk,Xvote) = (skA,choice[s,s']) in foo) | (let (Xsk,Xvote) = (skB,choice[s',s]) in foo) ``` ``` process new aaa'1;new aaa'2;new aaa'3;new aaa'4; new aaa'5;new aaa'6;new aaa'7;new aaa'8; ( let (Xsk,Xvote) = (skA,choice[s(),s'()]) in new k;new k'; let M = commit(k,Xvote) in let MM = blind(k',M) in out(c, (pk(Xsk),sign(Xsk,MM))); in(c, y); if checksign(pk(skR),y) = true() then if getmsg(y) = MM then let M' = unblind(k',y) in out(aaa'1, (k,M',M,c)); in(aaa'2, (xxx'1,xxx'2,xxx'3,xxx'4)); out(xxx'4, (xxx'3,xxx'2)); out(aaa'3, (xxx'1,xxx'4,xxx'2,xxx'3)); in(aaa'4, (xxx'1,xxx'2,xxx'3,xxx'4)); in(xxx'2, (z,=xxx'4,=xxx'3)); out(xxx'2, (z,xxx'1)) )|( let (Xsk,Xvote) = (skB,choice[s'(),s()]) in new k;new k'; let M = commit(k,Xvote) in let MM = blind(k',M) in out(c, (pk(Xsk),sign(Xsk,MM))); in(c, y); if checksign(pk(skR),y) = true() then if getmsg(y) = MM then let M' = unblind(k',y) in out(aaa'5, (k,M',M,c)); in(aaa'6, (xxx'1,xxx'2,xxx'3,xxx'4)); out(xxx'4, (xxx'3,xxx'2)); out(aaa'7, (xxx'1,xxx'4,xxx'2,xxx'3)); in(aaa'8, (xxx'1,xxx'2,xxx'3,xxx'4)); in(xxx'2, (z,=xxx'4,=xxx'3)); out(xxx'2, (z,xxx'1)) )|( in(aaa'5, y1);in(aaa'1, y2); out(aaa'6,choice[y1,y2]);out(aaa'2,choice[y2,y1]); in(aaa'7, y3);in(aaa'3, y4); out(aaa'8,choice[y3,y3]);out(aaa'4,choice[y4,y4]) ) ``` # Privacy in vehicular ad-hoc networks Dahl, Delaune & Steel (**Delaune10:Vanets?**) adopt the notion of swapping defined in (**Smyth08:Obs?**) to analyse privacy in the CMIX vehicular ad-hoc networking protocol (**Freudiger07:CMIX-vanet-protocol?**). In this section, (**Delaune10:Vanets?**) will be revisited to show that ProSwapper can be used to automatically prove privacy. First, we recall the model used by Dahl, Delaune & Steel. Listing [lst:app:example:vanets:eq] contains the free name declarations, function definitions and equations as specified by (**Delaune10:Vanets?**); and Listings [lst:app:example:vanets:proc] & [lst:app:example:vanets:procA] present the ProVerif script manually derived using (**Smyth08:Obs?**) (see (**Delaune10:Vanets?**) for the original encoding without swapping). Listing [lst:app:example:vanets:procB] presents a variant of Listings [lst:app:example:vanets:proc] & [lst:app:example:vanets:procA] written by Dahl, suitable for input to ProSwapper; the relative complexity of the encodings should illustrate the benefits of our abstraction. The ProSwapper input script can be compiled to produce Listing [lst:app:example:vanets:procC], which can be automatically analysed using ProVerif. The execution times are comparable: ProVerif takes 44ms to analyse Listings [lst:app:example:vanets:proc]/[lst:app:example:vanets:procA], and 30ms to analyse Listing [lst:app:example:vanets:procC] (the associated compile time is negligible). ``` free c,ack,request. free enterLeft,enterRight,zone,exitLeft,exitRight. private free sk. private free prsu,krsu,kc. private free pva1,kva1,pva2,kva2,pvb1,kvb1,pvb2,kvb2. fun pk/1. fun sign/2. fun enc/2. fun senc/3. reduc getmess(sign(x,y)) = x. reduc checksign(sign(x,y),pk(y)) = x. reduc decrypt(enc(x,pk(y)),y) = x. reduc sdecrypt(senc(x,y,r),y) = x. ``` ``` let rsu = in(c,X); let (SignaturePart,CertificatePart) = X in let (Pv,PkKv) = checksign(CertificatePart,pk(kc)) in let (=request,Ts,=Pv) = checksign(SignaturePart,PkKv) in out(c,(enc(sign((Pv,sk,Ts),krsu),PkKv),sign((prsu,pk(krsu)),kc))). let carBefore = out(enter,pv1); new ts; out(enter,(sign((request,ts,pv1),kv1),sign((pv1,pk(kv1)),kc))); in(enter,X); let (encedPart,CertificatePart) = X in let (Prsu,PkKrsu) = checksign(CertificatePart,pk(kc)) in let SignaturePart = decrypt(encedPart,kv1) in let (=pv1,sk,=ts) = checksign(SignaturePart,PkKrsu) in new r; out(zone,senc(pv1,sk,r)); out(pcPv1,pv1); out(pcKv1,kv1); out(pcPv2,pv2); out(pcKv2,kv2); out(pcSk,sk); out(pcExit,exit). let carAfter = new r;new r'; out(exit,senc(pv1,sk,r)); out(exit,senc(pv2,sk,r')); out(exit,pv2). ``` ``` process out(c,pk(kc));out(c,pk(krsu)); ( !rsu )|( new pcaExit;new pcaKv1;new pcaKv2;new pcaPv1;new pcaPv2;new pcaSk; new pcbExit;new pcbKv1;new pcbKv2;new pcbPv1;new pcbPv2;new pcbSk; ( let (kv1,kv2,pv1,pv2) = (kva1,kva2,pva1,pva2) in let (pcKv1,pcKv2,pcPv1,pcPv2) = (pcaKv1,pcaKv2,pcaPv1,pcaPv2) in let enter = enterLeft in let exit = choice[exitLeft,exitRight] in let pcExit = pcaExit in let pcSk = pcaSk in carBefore )|( let (kv1,kv2,pv1,pv2) = (kvb1,kvb2,pvb1,pvb2) in let (pcKv1,pcKv2,pcPv1,pcPv2) = (pcbKv1,pcbKv2,pcbPv1,pcbPv2) in let enter = enterRight in let exit = choice[exitRight,exitLeft] in let pcExit = pcbExit in let pcSk = pcbSk in carBefore )|( in(pcaPv1,aPv1);in(pcaKv1,aKv1);in(pcaPv2,aPv2); in(pcaKv2,aKv2);in(pcaSk,aSk);in(pcaExit,aExit); in(pcbPv1,bPv1);in(pcbKv1,bKv1);in(pcbPv2,bPv2); in(pcbKv2,bKv2);in(pcbSk,bSk);in(pcbExit,bExit); ( let pv1 = choice[aPv1,bPv1] in let kv1 = choice[aKv1,bKv1] in let pv2 = choice[aPv2,bPv2] in let kv2 = choice[aKv2,bKv2] in let sk = choice[aSk,bSk] in let exit = choice[aExit,bExit] in carAfter )|( let pv1 = choice[bPv1,aPv1] in let kv1 = choice[bKv1,aKv1] in let pv2 = choice[bPv2,aPv2] in let kv2 = choice[bKv2,aKv2] in let sk = choice[bSk,aSk] in let exit = choice[bExit,aExit] in carAfter ) ) ) ``` ``` let rsu = in(c,X); let(SignaturePart,CertificatePart) = X in let(Pv,PkKv) = checksign(CertificatePart,pk(kc)) in let(=request,Ts,=Pv) = checksign(SignaturePart,PkKv) in out(c,(enc(sign((Pv,sk,Ts),krsu),PkKv),sign((prsu,pk(krsu)),kc))). let car = out(enter,pv1); new ts; out(enter,(sign((request,ts,pv1),kv1),sign((pv1,pk(kv1)),kc))); in(enter,X); let(encedPart,CertificatePart) = X in let(Prsu,PkKrsu) = checksign(CertificatePart,pk(kc)) in let SignaturePart = dec(encedPart,kv1) in let(=pv1,sk,=ts) = checksign(SignaturePart,PkKrsu) in new r; out(zone,senc(pv1,sk,r)); sync 1; new r; new r'; out(exit,senc(pv1,sk,r)); out(exit,senc(pv2,sk,r')); out(exit,pv2). process out(c,pk(kc)); out(c,pk(krsu)); ( !rsu )|( let (kv1,kv2,pv1,pv2) = (kva1,kva2,pva1,pva2) in let enter = enterLeft in let exit = choice[exitLeft,exitRight] in car )|( let (kv1,kv2,pv1,pv2) = (kvb1,kvb2,pvb1,pvb2) in let enter = enterRight in let exit = choice[exitRight,exitLeft] in car ) ``` ``` process new aaa'1;new aaa'2;new aaa'3;new aaa'4; out(c,pk(kc));out(c,pk(krsu)); (! in(c,X); let (SignaturePart,CertificatePart) = X in let (Pv,PkKv) = checksign(CertificatePart,pk(kc)) in let (=request,Ts,=Pv) = checksign(SignaturePart,PkKv) in out(c,(enc(sign((Pv,sk,Ts),krsu),PkKv),sign((prsu,pk(krsu)),kc))) )|( let (kv1,kv2,pv1,pv2) = (kva1,kva2,pva1,pva2) in let enter = enterLeft in let exit = choice[exitLeft,exitRight] in out(enter,pv1);new ts; out(enter,(sign((request,ts,pv1),kv1),sign((pv1,pk(kv1)),kc))); in(enter,X); let (encedPart,CertificatePart) = X in let (Prsu,PkKrsu) = checksign(CertificatePart,pk(kc)) in let SignaturePart = dec(encedPart,kv1) in let (=pv1,sk,=ts) = checksign(SignaturePart,PkKrsu) in new r;out(zone,senc(pv1,sk,r)); out(aaa'1,(pv2,sk,pv1,exit)); in(aaa'2,(xxx'1,xxx'2,xxx'3,xxx'4)); new r;new r'; out(xxx'4,senc(xxx'3,xxx'2,r));out(xxx'4,senc(xxx'1,xxx'2,r')); out(xxx'4,xxx'1) )|( let (kv1,kv2,pv1,pv2) = (kvb1,kvb2,pvb1,pvb2) in let enter = enterRight in let exit = choice[exitRight,exitLeft] in out(enter,pv1);new ts; out(enter,(sign((request,ts,pv1),kv1),sign((pv1,pk(kv1)),kc))); in(enter,X); let (encedPart,CertificatePart) = X in let (Prsu,PkKrsu) = checksign(CertificatePart,pk(kc)) in let SignaturePart = dec(encedPart,kv1) in let (=pv1,sk,=ts) = checksign(SignaturePart,PkKrsu) in new r;out(zone,senc(pv1,sk,r)); out(aaa'3,(pv2,sk,pv1,exit)); in(aaa'4,(xxx'1,xxx'2,xxx'3,xxx'4)); new r;new r'; out(xxx'4,senc(xxx'3,xxx'2,r));out(xxx'4,senc(xxx'1,xxx'2,r')); out(xxx'4,xxx'1) )|( in(aaa'3,y1);in(aaa'1,y2); out(aaa'4,choice[y1,y2]);out(aaa'2,choice[y2,y1]) ) ``` [^1]: The RSA-based DAA protocol (**Chen04:RSA-DAA?**) does not explicitly specify how the issuer learns a trusted platform’s public endorsement key during an execution of the join algorithm. However, it seems reasonable to assume that the public key would be sent as plaintext. By contrast, Cesena *et al.* (**Sadeghi10:TLS-DAA?**; **Cesena10?**) define an extension of RSA-based DAA which uses TLS to hide the affiliation between groups and trusted platforms; this variant would thwart a passive adversary, but not corrupt administrators. [^2]: The use of two distinct channel names for the input and output channels is not strictly necessary; however, it aids automation. In particular, it helps avoid a ProVerif incompleteness issue that arises because there is no distinction between messages input and messages output on a particular channel. [^3]: Note that $\zeta^{\tilde{r}_f} \equiv \zeta^{f_0 + f_1 2^{l_f}} \pmod{\Gamma}$ and the order of $\rho < \Gamma$ the calculation $\zeta^{\tilde{r}_f} \pmod{\Gamma}$ will involve a smaller exponential thus providing a performance gain.