Projects:2018s1-164 Private but Public on the Blockchain
- Alexander Manariotis
- Jason Lu
- Dr Matthew Sorell
- Associate Professor Nickolas Falkner
Blockchain technology utilises cryptography to sign transactions, with the public ledger consisting of cryptographically linked blocks . Each block represents a transaction and collectively these blocks form a blockchain, i.e an untamperable record of transactions.
The implications of this technology are immense, as the need for a trusted third party to act as an intermediary is removed and ensures that only valid transactions are upheld (via public consensus) . Ethereum extends the functionality of the blockchain beyond cryptocurrencies via smart contracts and decentralised applications, the former being an unalterable agreement that executes when a particular set of conditions have been fulfilled (all without the interference of a intermediary party)  and the latter being applications that utilise the Ethereum blockchain.
Despite the power of the blockchain and smart contracts, the present form of these technologies lacks transactional privacy . Transactions propagate across the network, which publicly displays the addresses of the recipient and sender, the transaction amount and the smart contract data. This is not a feasible solution for private transactions and private data transmission as confidential data can be exploited. However, there are private cryptocurrencies like Zcash which facilitate private transactions via zero knowledge proofs . Therefore as shown in Figure 1.0, there is gap in blockchain and privatisation technologies centred around Ethereum’s decentralised applications (otherwise known as Dapps).
Developers have been utilising external servers to achieve privacy, but this introduces a central entity which voids the key decentralisation of blockchain technology. “Permissioned” blockchains have also been utilised (where users are whitelisted), however the information is still available to all whitelisted users , making this unsuitable for business applications (as all employees would have to be trusted).
Therefore, through this research we hope to uncover the untapped potential of privatised blockchain technology and further the understanding of how this can be used in real-world applications.
Research Questions and Motivation
Using the initial literature based research and findings, we are evaluating privatisation technologies and techniques for the use in Ethereum based decentralised applications. This results in three key research questions:
- What are the possible implementation(s) of privatisation technologies and techniques for Ethereum based applications?
- What is the feasibility of each implementation and technique?
- What are the possible use cases for privatisation technologies and techniques for real world applications?
The underlying problem is that up-to-date and accurate information is sparse, inconsistent or does not exist. This makes it difficult for an individual, team or company to understand privatisation technologies or even consider the potential use of this technology in real world blockchain applications. This project aims to solve this issue via the production of a comprehensive piece of literature.
The key objective of this research project is to produce a piece of literature that accurately details the following aspects of privatisation technologies within Ethereum applications.
- An explanation of the underlying privatisation technologies and how they function and compare.
- The feasibility and limitations of privatisation technologies on Ethereum and other blockchains.
- How these privatisation technologies can be used in real world applications.
- Specific examples of its potential use in industry.
- Demonstrate the potential implementation of privatisation technologies and how blockchain can be utilised in real-world applications.
Key Literature Research
The Zcash cryptocurrency, a hard fork of Bitcoin which introduces a variant of “zero knowledge proofs” called zk-SNARKS, masks the address of both parties and the transaction amount but still upholds the security of the blockchain . By definition, a zero knowledge proof is a method by which one party (the contract user Alice) can prove to another party (the observer Bob) that she knows a value ‘x’, without conveying any information apart from the fact that she knows the value ‘x’ . This definition follows closely to the following implementations.
The Ethereum and Zcash teams are currently developing an implementation of zero knowledge proofs that utilises both Zcash and Ethereum. This is known as Zcash on Ethereum  but this implementation is not publicly available as of writing. Jacob Eberhardt instead suggests a direct integration of zero knowledge proofs into Ethereum, which can be enabled via an Ethereum based toolkit called ZoKrates that is publicly available . This toolkit helps developers to implement zero knowledge proofs into Ethereum decentralised applications , which can then be verified on chain.
Results and Expected Outcomes
Using the ZoKrates toolkit we have verified a zero knowledge proof on the Ethereum test network, which publicly proves that correct values have been submitted to a smart contract without those values being publicly known.
The ZoKrates setup starts with a program that takes a public (x) and two private inputs (s1 and s2) which will output true if the inputs sum to 15. In this implementation, the program is as follows:
This was then compiled into an Ethereum smart contract that is deployed to the Ethereum blockchain, where users can submit proofs by sending a transaction to this contract. A public value (x = 5) and two private values (s1 = 4 and s2 = 6) satisfy the program by submitting these values to the ZoKrates toolkit, which generates a proof that can be verified on chain.
By submitting this proof to the deployed contract via a transaction, the Ethereum blockchain can verify if this proof is correct. In this case because the input values sum to 15, the “Transaction successfully verified.” message appears in the event logs (Figure 1). This publicly proves to observers that the transaction to this smart contract contains values that are correct, without the observers actually knowing the values.
Whilst this proof of concept is valid, there are various problems associated with zero knowledge proofs and Ethereum that threaten privatisation technologies and therefore the usability of the intended outcome. Of main concern is the problem with zk-SNARKS where a “trusted setup” is needed , which includes the creation of an “observer” key that be used to create fake proofs and thus completely exploit the system . Furthermore, the price of Ethereum’s gas (due to the price of Ether) is rapidly reaching a point where the smart contract aspect of Ethereum may become too expensive , in conjunction with Ethereum’s scaling problems . Nevertheless, the potential of zero knowledge proofs, especially in the application of hiding transaction addresses and autonomous verification is an ever expanding space that this research team continues to explore.
 N. M. Rosario, “The Emerging Blockchain Patent Landscape”, 2017. [Online]. Available: https://www.lexology.com/library/detail.aspx?g=cf0c71c5-055a-4d57-92f8-c75d1e282414
 V. Buterin, “A Next-Generation Smart Contract and Decentralized Application Platform”, 2015. [Online]. Available: https://github.com/ethereum/wiki/wiki/White-Paper
 A. Kosba and A. Miller and E. Shi and Z. Wen and C. Papamanthou, “Hawk: The Blockchain Model of Cryptography and Privacy-Preserving Smart Contracts”, 2016. [Online]. Available: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7546538
 E. Ben-Sasson, A. Chiesa, C. Garman, M. Green, I. Miers, E. Tromer, M. Virza, “Zerocash: Decentralized Anonymous Payments from Bitcoin”, 2014. [Online]. Available: http://zerocash-project.org/media/pdf/zerocash-extended-20140518.pdf
 J. Eberhardt, “ZoKrates”, 2017. [Online]. Available: https://github.com/JacobEberhardt/ZoKrates
 R. O’Leary, “ZoKrates Seeks to Bring Best of Zcash to Ethereum with Devcon Debut”, 2017. [Online]. Available: https://www.coindesk.com/zokrates-seeks-bring-best-zcash-ethereum-devcon-debut/
 Masaryk University, “Zero-knowledge proof protocols”, [Online]. Available: https://www.fi.muni.cz/usr/gruska/crypto04/CHAPTER%2012%20-%20Zero-knowledge%20proof%20protocols.ppt
 C. Reitwiessner, “An Update on Integrating Zcash on Ethereum (ZoE)”, 2017. [Online]. Available: https://blog.ethereum.org/2017/01/19/update-integrating-zcash-ethereum/
 Zerocoin Electric Coin Company, “Parameter Generation”, 2017. [Online]. Available: https://z.cash/technology/paramgen.html
 M. Peck, “The Crazy Security Behind the Birth of Zcash, the Inside Story”, 2016. [Online]. Avaliable: https://spectrum.ieee.org/tech-talk/computing/networks/the-crazy-security-behind-the-birth-of-zcash
 D. Ryan, “Costs of a Real World Ethereum Contract”, 2017. [Online]. Avaliable: https://hackernoon.com/costs-of-a-real-world-ethereum-contract-2033511b3214
 A. Hertig, “How Will Ethereum Scale?”, 2017. [Online]. Avaliable: https://www.coindesk.com/information/will-ethereum-scale/
 V. Buterin, Ethereum Dev Roundup: Q”, 2017. [Online]. Avaliable: https://blog.ethereum.org/2017/04/07/ethereum-dev-roundup-q1-boring-edition/