# PVPBC: Privacy and Verifiability Preserving E-Voting Based on Permissioned Blockchain
## 6 PVPBC Protocol: Cryptographic Considerations
### Pre-Election Technical Setup  
The pre-election setup phase consists of two main processes, a registration process and an election-key generation process. We describe voter authentication and the voter's cryptographic primitives in this context. **Registration:** The voter-registration process is performed by the TTP by making use of a permissioned DLT and smart contract. Anyone with an ID number, for example, a national ID number, which is on the TTP's whitelist of IDs has permission to register for the election. When the ID field on the registration page is completed by the voter, as illustrated in Figure 7, the regApp.js application makes eth.calls to the registrar contract to check that the ID provided is on the whitelist of IDs, and if the associated voter has registered previously. When the outcome of the check is positive, the regApp.js communicates with the registrar contract to store the new voter information. This information consists of the voter's ID, Quorum DL address, and e-mail address. The purpose of this step is to link the user's Quorum DLT address and e-mail address so that they cannot register twice. Once registered, the registrar contract generates an access token for the voter and encrypts it with the private key of the TTP. The voter uses the access token for authentication on the blockchain. The voter is given a VID which is a parameter included in the access token generated by the smart contract (see Section 3.3 to obtain further information on this process). **Voter authentication:** The voter interacts with the front-end system, providing their unique virtual identity (VID) to obtain entry to the voting platform, and then casts their ballot. Once voter authentication is complete, the voter should complete the unique virtual-identity (VID) field in the authentication page on the front-end system. After that, the authentication request and the voter's VID is forwarded to an election service provider. This process is illustrated in Figure 4. The election service provider first fetches the capability token from the smart contract by using the voter's VID, and then makes the decision whether or not to grant access to the ballot. The TTP changes the flag field of the voter's  
Figure 6: Voter experience during the post-election phase and tracking-number retrieval phase. profile tuple to \"voted\" after successful authentication and updates the hashes of the blockchain. This prevents voters from voting more than once. Once voter access has been granted, the voter is directed to the voting page on the front-end system. **Voter's cryptographic primitives:** When the voter has been authenticated, their voter-keys management (VKM) component, which is part of the front-end system, generates cryptographic primitives for the corresponding authenticated voter. Cryptographic primitives include the voter's signing keys, and the voters' trapdoor keys. An ElGamal signing key pair, \((sign_{i},vk_{i})\), where \(sign_{i}\) is the voter's signature key and \(vk_{i}\) is the public verifier key, is generated by the VKM component. The voter, \(V_{i}\), generates signatures that can be verified via \(vk_{i}\). It is assumed that a secret key, \(sk_{i}\), and a public key (voter's trapdoor key), \(PK_{i}\), can be generated by the VKM componentfor each voter, \(V_{i}\), where \(PK_{i}=g^{sk_{i}}\). We move on to consider the creation of an encrypted tracking number for each authenticated voter. Voters obtain encrypted tracking numbers using the following procedure:  
1. The tracking number, \(n_{i}\), for the registered voter is extracted from the retrieved token. 2. The term, \(g^{n_{i}}\), is calculated for the imported tracking number, \(n_{i}\), in order to make sure that the tracking number falls in the appropriate subgroup. 3. Tracking numbers, \(g^{n_{i}}\), are encrypted using the encryption key, \(PK_{T}\). 4. The Sako-Kilian protocol [30] is used to re-encrypt and shuffle the set of encrypted tracking numbers, \((g^{n_{i}})_{pk_{T}}\).