Zcash Protocol Speci Cation

Total Page:16

File Type:pdf, Size:1020Kb

Zcash Protocol Speci Cation Zcash Protocol Specication Version 2018.0-beta-14 Daira Hopwood† Sean Bowe† — Taylor Hornby† — Nathan Wilcox† March 11, 2018 Abstract. Zcash is an implementation of the Decentralized Anonymous Payment scheme Zerocash, with security xes and adjustments to terminology, functionality and performance. It bridges the exist- ing transparent payment scheme used by Bitcoin with a shielded payment scheme secured by zero- knowledge succinct non-interactive arguments of knowledge (zk-SNARKs). It attempts to address the problem of mining centralization by use of the Equihash memory-hard proof-of-work algorithm. This specication denes the Zcash consensus protocol and explains its differences from Zerocash and Bitcoin. Keywords: anonymity, applications, cryptographic protocols, electronic commerce and payment, nancial privacy, proof of work, zero knowledge. Contents 1 1 Introduction 5 1.1 Caution . .5 1.2 High-level Overview . .5 2 Notation 7 3 Concepts 8 3.1 Payment Addresses and Keys . .8 3.2 Notes...........................................................9 3.2.1 Note Plaintexts and Memo Fields . .9 3.3 The Block Chain . 10 3.4 Transactions and Treestates . 10 3.5 JoinSplit Transfers and Descriptions . 11 3.6 Note Commitment Trees . 11 3.7 Nullier Sets . 12 3.8 Block Subsidy and Founders’ Reward . 12 3.9 Coinbase Transactions . 12 † Zerocoin Electric Coin Company 1 4 Abstract Protocol 12 4.1 Abstract Cryptographic Schemes . 12 4.1.1 Hash Functions . 12 4.1.2 Pseudo Random Functions . 13 4.1.3 Authenticated One-Time Symmetric Encryption . 13 4.1.4 Key Agreement . 13 4.1.5 Key Derivation . 14 4.1.6 Signature . 15 4.1.6.1 Signature with Re-Randomizable Keys . 15 4.1.7 Commitment . 17 4.1.8 Represented Group . 17 4.1.9 Represented Pairing . 18 4.1.10 Zero-Knowledge Proving System . 18 4.2 Key Components . 19 4.3 JoinSplit Descriptions . 19 4.4 Sending Notes . 20 4.4.1 Dummy Notes . 21 4.5 Merkle path validity . 21 4.6 Non-malleability . 22 4.7 Balance . 22 4.8 Note Commitments and Nulliers . 22 4.9 Zk-SNARK Statements . 23 4.9.1 JoinSplit Statement . 23 4.10 In-band secret distribution . 24 4.10.1 Encryption . 24 4.10.2 Decryption by a Recipient . 25 5 Concrete Protocol 25 5.1 Caution . 25 5.2 Integers, Bit Sequences, and Endianness . 26 5.3 Constants . 26 5.4 Concrete Cryptographic Schemes . 27 5.4.1 Hash Functions . 27 5.4.1.1 SHA-256 and SHA256Compress Hash Functions . 27 5.4.1.2 BLAKE2 Hash Function . 27 5.4.1.3 Merkle Tree Hash Function . 28 5.4.1.4 hSig Hash Function . 28 5.4.1.5 Equihash Generator . 28 5.4.2 Pseudo Random Functions . 29 2 5.4.3 Authenticated One-Time Symmetric Encryption . 29 5.4.4 Key Agreement and Derivation . 30 5.4.4.1 Key Agreement . 30 5.4.4.2 Key Derivation . 30 5.4.5 JoinSplit Signature . 30 5.4.6 Commitment schemes . 31 5.4.6.1 Note Commitments . 31 5.4.7 Represented Groups and Pairings . 31 5.4.7.1 BN-254 . 31 5.4.8 Zero-Knowledge Proving Systems . 32 5.4.8.1 PHGR13 . 32 5.5 Note Plaintexts and Memo Fields . 33 5.6 Encodings of Addresses and Keys . 34 5.6.1 Transparent Addresses . 34 5.6.2 Transparent Private Keys . 35 5.6.3 Shielded Payment Addresses . 35 5.6.4 Incoming Viewing Keys . 35 5.6.5 Spending Keys . 36 5.7 zk-SNARK Parameters . 36 6 Consensus Changes from Bitcoin 37 6.1 Encoding of Transactions . 37 6.2 Encoding of JoinSplit Descriptions . 39 6.3 Block Header . 40 6.4 Proof of Work . 41 6.4.1 Equihash . ..
Recommended publications
  • Characterizing Ethereum's Mining Power Decentralization at a Deeper
    Characterizing Ethereum’s Mining Power Decentralization at a Deeper Level Liyi Zeng∗§, Yang Chen†§, Shuo Chen†, Xian Zhang†, Zhongxin Guo†, Wei Xu∗, Thomas Moscibroda‡ ∗Institute for Interdisciplinary Information Sciences, Tsinghua University †Microsoft Research ‡Microsoft Azure §Contacts: [email protected], [email protected] Abstract—For proof-of-work blockchains such as Ethereum, than 50% of the total power has grown from several the mining power decentralization is an important discussion hundred to several thousand. Overall, the power is more point in the community. Previous studies mostly focus on the decentralized at the participant level than 4 years ago. aggregated power of the mining pools, neglecting the pool participants who are the source of the pools’ power. In this paper, However, we also find that this number varied signif- we present the first large-scale study of the pool participants icantly over time, which means it requires continuous in Ethereum’s mining pools. Pool participants are not directly tracking. Additionally, as our current data and method- observable because they communicate with their pools via private ology cannot de-anonymize the participants, it’s possible channels. However, they leave “footprints” on chain as they that some participants split themselves into many smaller use Ethereum accounts to anonymously receive rewards from mining pools. For this study, we combine several data sources ones for various reasons, which could make our estima- to identify 62,358,646 pool reward transactions sent by 47 tion inaccurate if not completely off the target. Further pools to their participants over Ethereum’s entire near 5-year study to improve the estimation accuracy is important.
    [Show full text]
  • Crypto Research Report ‒ April 2019 Edition
    April 2019 Edition VI. “When the Tide Goes Out…” Investments: Gold and Bitcoin, Stronger Together Technical Analysis: Spring Awakening? Cryptocurrency Mining in Theory and Practice Demelza Kelso Hays Mark J. Valek We would like to express our profound gratitude to our premium partners for supporting the Crypto Research Report: www.cryptofunds.li Contents Editorial ............................................................................................................................................... 4 In Case You Were Sleeping: When the Tide Goes Out…............................................................... 5 Back to the Roots ............................................................................................................................................. 6 How Long Will This Bear Market Last .............................................................................................................. 7 A Tragic Story Traverses the World ................................................................................................................. 9 When the tide goes out… ............................................................................................................................... 10 A State Cryptocurrency? ................................................................................................................................ 12 Support is Increasing ..................................................................................................................................... 14
    [Show full text]
  • Asymmetric Proof-Of-Work Based on the Generalized Birthday Problem
    Equihash: Asymmetric Proof-of-Work Based on the Generalized Birthday Problem Alex Biryukov Dmitry Khovratovich University of Luxembourg University of Luxembourg [email protected] [email protected] Abstract—The proof-of-work is a central concept in modern Long before the rise of Bitcoin it was realized [20] that cryptocurrencies and denial-of-service protection tools, but the the dedicated hardware can produce a proof-of-work much requirement for fast verification so far made it an easy prey for faster and cheaper than a regular desktop or laptop. Thus the GPU-, ASIC-, and botnet-equipped users. The attempts to rely on users equipped with such hardware have an advantage over memory-intensive computations in order to remedy the disparity others, which eventually led the Bitcoin mining to concentrate between architectures have resulted in slow or broken schemes. in a few hardware farms of enormous size and high electricity In this paper we solve this open problem and show how to consumption. An advantage of the same order of magnitude construct an asymmetric proof-of-work (PoW) based on a compu- is given to “owners” of large botnets, which nowadays often tationally hard problem, which requires a lot of memory to gen- accommodate hundreds of thousands of machines. For prac- erate a proof (called ”memory-hardness” feature) but is instant tical DoS protection, this means that the early TLS puzzle to verify. Our primary proposal Equihash is a PoW based on the schemes [8], [17] are no longer effective against the most generalized birthday problem and enhanced Wagner’s algorithm powerful adversaries.
    [Show full text]
  • Understanding the Motivations, Challenges and Needs of Blockchain Software Developers: a Survey
    Empirical Software Engineering manuscript No. (will be inserted by the editor) Understanding the Motivations, Challenges and Needs of Blockchain Software Developers: A Survey Amiangshu Bosu · Anindya Iqbal · Rifat Shahriyar · Partha Chakroborty Received: November 6, 2018 / Accepted: March 19, 2019 Abstract The blockchain technology has potential applications in various areas such as smart-contracts, Internet of Things (IoT), land registry, supply chain man- agement, storing medical data, and identity management. Although the Github currently hosts more than six thousand active Blockchain software (BCS) projects, few software engineering research has investigated these projects and its' contrib- utors. Although the number of BCS projects is growing rapidly, the motivations, challenges, and needs of BCS developers remain a puzzle. Therefore, the primary objective of this study is to understand the motivations, challenges, and needs of BCS developers and analyze the differences between BCS and non-BCS development. On this goal, we sent an online survey to 1,604 active BCS developers identified via mining the Github repositories of 145 popular BCS projects. The survey received 156 responses that met our criteria for analysis. The results suggest that the majority of the BCS developers are experienced in non-BCS development and are primarily motivated by the ideology of creating a decentralized financial system. Although most of the BCS projects are Open Source Software (OSS) projects by nature, more than 93% of our respondents found BCS development somewhat different from a non-BCS development as BCS projects have higher emphasis on security and reliability than most of the non- BCS projects. Other differences include: higher costs of defects, decentralized and hostile environment, technological complexity, and difficulty in upgrading the soft- ware after release.
    [Show full text]
  • Coinbase Explores Crypto ETF (9/6) Coinbase Spoke to Asset Manager Blackrock About Creating a Crypto ETF, Business Insider Reports
    Crypto Week in Review (9/1-9/7) Goldman Sachs CFO Denies Crypto Strategy Shift (9/6) GS CFO Marty Chavez addressed claims from an unsubstantiated report earlier this week that the firm may be delaying previous plans to open a crypto trading desk, calling the report “fake news”. Coinbase Explores Crypto ETF (9/6) Coinbase spoke to asset manager BlackRock about creating a crypto ETF, Business Insider reports. While the current status of the discussions is unclear, BlackRock is said to have “no interest in being a crypto fund issuer,” and SEC approval in the near term remains uncertain. Looking ahead, the Wednesday confirmation of Trump nominee Elad Roisman has the potential to tip the scales towards a more favorable cryptoasset approach. Twitter CEO Comments on Blockchain (9/5) Twitter CEO Jack Dorsey, speaking in a congressional hearing, indicated that blockchain technology could prove useful for “distributed trust and distributed enforcement.” The platform, given its struggles with how best to address fraud, harassment, and other misuse, could be a prime testing ground for decentralized identity solutions. Ripio Facilitates Peer-to-Peer Loans (9/5) Ripio began to facilitate blockchain powered peer-to-peer loans, available to wallet users in Argentina, Mexico, and Brazil. The loans, which utilize the Ripple Credit Network (RCN) token, are funded in RCN and dispensed to users in fiat through a network of local partners. Since all details of the loan and payments are recorded on the Ethereum blockchain, the solution could contribute to wider access to credit for the unbanked. IBM’s Payment Protocol Out of Beta (9/4) Blockchain World Wire, a global blockchain based payments network by IBM, is out of beta, CoinDesk reports.
    [Show full text]
  • La Criptomoneda
    LA CRIPTOMONEDA LA CRIPTOMONEDA 1 LA CRIPTOMONEDA CONTENIDO 1. ¿Cuál es la criptomoneda más rentable para invertir? …………… Pág.6 2. NEO (NEO; antes AntShares) …………………………………………Pág.7 3. NEM (XEM) ……………………………………………………………….Pág.8 4. Ripple (XRP) ……………………………………………………………. Pág.9 5. Stellar (XLM) ……………………………………………………………. Pág.10 6. Ethereum (ETH) ………………………………………………………… Pág.11 7. Dash (Dash; antes Darkcoin o XCoin) ………………………………. Pág.12 8. Tron (TXR) ………………………………………………………………. Pág.13 9. Litecoin (LTC) ……………………………………………………………Pág.14 10. Cardano (ADA) …………………………………………………………. Pág.15 11. Monero (XMR) …………………………………………………………… Pág.16 12. Iota (Miota) ……………………………………………………………… Pág.17 13. Bitcoin (BTC) ……………………………………………………………. Pág.19 14. Bitcoin Cash (BCH)………………………………………………………. Pág. 21 15. Qué es una ICO: la ‘bolsa’ basada en las criptomonedas………… Pág.23 16. Qué es una ICO ………………………………………………………… Pág.24 2 LA CRIPTOMONEDA 17. Cómo se compra una ICO ……………………………………………... Pág. 26 18. ¿QUÉ ES LA MINERÍA DE BITCOINS (CRIPTOMONEDAS)?.......... Pág.28 19. MINERÍA BITCOIN ………………………………………………………. Pág.29 20. ¿CÓMO MINAR CRIPTOMONEDAS? …………………………………Pág.32 21. PRUEBA DE TRABAJO (PROOF-OF-WORK) ………………………. Pág.33 22. Minero ASIC de Bitcoin con fuente de 1.300 vatios ………………… Pág. 35 23. PRUEBA DE PARTICIPACIÓN (PROOF-OF-STAKE) ………………. Pág.38 24. Votación de delegados para forging en Lisk. ………………………. Pág.40 25. GRUPOS DE MINERÍA (MINING POOLS) ……………………………Pág.42 26. Participación de mercado de grupos de minería de Bitcoin. …….. Pág.46 27. MINERÍA EN LA NUBE (CLOUD MINING) …………………………... Pág. 48 28. Minería de criptomonedas para novatos ……………………………. Pág. 50 29. ORIGEN DEL VALOR …………………………………………………... Pág.52 30. HARDWARE NECESARIO ……………………………………………….Pág.57 31. ASPECTOS A TENER EN CUENTA PARA HARDWARE …………..Pág. 60 32. GPU ……………………………………………………………………….. Pág. 63 33. ELEGIR UNA CRIPTOMONEDA PARA CRIPTOMINAR …………….Pág. 67 34. CONSUMO ELÉCTRICO …………………………………………………Pág.74 3 LA CRIPTOMONEDA 35.
    [Show full text]
  • A Survey on Consensus Mechanisms and Mining Strategy Management
    1 A Survey on Consensus Mechanisms and Mining Strategy Management in Blockchain Networks Wenbo Wang, Member, IEEE, Dinh Thai Hoang, Member, IEEE, Peizhao Hu, Member, IEEE, Zehui Xiong, Student Member, IEEE, Dusit Niyato, Fellow, IEEE, Ping Wang, Senior Member, IEEE Yonggang Wen, Senior Member, IEEE and Dong In Kim, Fellow, IEEE Abstract—The past decade has witnessed the rapid evolution digital tokens between Peer-to-Peer (P2P) users. Blockchain in blockchain technologies, which has attracted tremendous networks, especially those adopting open-access policies, are interests from both the research communities and industries. The distinguished by their inherent characteristics of disinterme- blockchain network was originated from the Internet financial sector as a decentralized, immutable ledger system for transac- diation, public accessibility of network functionalities (e.g., tional data ordering. Nowadays, it is envisioned as a powerful data transparency) and tamper-resilience [2]. Therefore, they backbone/framework for decentralized data processing and data- have been hailed as the foundation of various spotlight Fin- driven self-organization in flat, open-access networks. In partic- Tech applications that impose critical requirement on data ular, the plausible characteristics of decentralization, immutabil- security and integrity (e.g., cryptocurrencies [3], [4]). Further- ity and self-organization are primarily owing to the unique decentralized consensus mechanisms introduced by blockchain more, with the distributed consensus provided by blockchain networks. This survey is motivated by the lack of a comprehensive networks, blockchains are fundamental to orchestrating the literature review on the development of decentralized consensus global state machine1 for general-purpose bytecode execution. mechanisms in blockchain networks. In this survey, we provide a Therefore, blockchains are also envisaged as the backbone systematic vision of the organization of blockchain networks.
    [Show full text]
  • Altcoins, Ethereum Projects, and More – Bonus Content
    Altcoins, Ethereum projects, and More – Bonus Content Welcome to the bonus online content for Mastering Blockchain – Third Edition! This content complements the main text, with the intention to enhance the reader learning experience. The material covered here has not been included in the core book for reasons of brevity and scope, but it contains valuable information, and has thus been included here for reference and further learning. We'll list and briefly describe the topics covered in these pages here, as an idea of what will be covered in this package. The topics are best read in conjunction with the chapters specified here, but can also be accessed as a reference guide for various topics at any point! • Bitcoin forks: It is recommended that this topic is read after Chapter 7, Bitcoin Network and Payments. It covers alternative Bitcoin projects such as Bitcoin Cash and Bitcoin Unlimited. • Alternative coins: This is intended to be read in conjunction with Chapter 9, Alternative Coins. This topic covers some important cryptocurrency projects such as Zcash and Primecoin. We cover in detail, among other things, how various clients can be installed, and how mining can be performed. • Ethereum networks, trading and investment: It's recommended to read this material with Chapter 11, Ethereum 101. This topic briefly introduces the different types of Ethereum networks and some technical details. Also, we introduce some basics regarding the trading and investment of ether, the Ethereum cryptocurrency. • Ethereum EVM opcodes: This topic should be read in conjunction with Chapter 12, Further Ethereum. Here, we list all EVM opcodes, with descriptions and some technical details, such as their opcode representation and gas consumption.
    [Show full text]
  • Zcash Protocol Speci Cation
    Zcash Protocol Specication Version 2016.0-beta-1.10 as intended for the Zcash release of autumn 2016 Daira Hopwood Sean Bowe — Taylor Hornby — Nathan Wilcox October 30, 2016 Contents 1 1 Introduction 4 1.1 Caution . .4 1.2 High-level Overview . .4 2 Notation 5 3 Concepts 7 3.1 Payment Addresses and Keys . .7 3.2 Notes...........................................................7 3.2.1 Note Plaintexts and Memo Fields . .8 3.3 Transactions, Blocks, and the Block Chain . .8 3.4 JoinSplit Transfers and Descriptions . .9 3.5 Note Commitment Tree . .9 3.6 Nullier Set . 10 3.7 Block Subsidy and Founders’ Reward . 10 3.8 Coinbase Transactions . 10 4 Abstract Protocol 10 4.1 Abstract Cryptographic Functions . 10 4.1.1 Hash Functions . 10 4.1.2 Pseudo Random Functions . 10 4.1.3 Authenticated One-Time Symmetric Encryption . 11 4.1.4 Key Agreement . 11 1 4.1.5 Key Derivation . 12 4.1.6 Signatures . 12 4.1.7 Commitment . 13 4.1.8 Zero-Knowledge Proving System . 13 4.2 Key Components . 14 4.3 JoinSplit Descriptions . 14 4.4 Sending Notes . 15 4.4.1 Dummy Notes . 16 4.5 Merkle path validity . 16 4.6 Non-malleability . 17 4.7 Balance . 17 4.8 Note Commitments and Nulliers . 17 4.9 JoinSplit Statement . 17 4.10 In-band secret distribution . 18 4.10.1 Encryption . 19 4.10.2 Decryption by a Recipient . 19 5 Concrete Protocol 20 5.1 Caution . 20 5.2 Integers, Bit Sequences, and Endianness . 20 5.3 Constants .
    [Show full text]
  • Vývoj Elektronických Plateb Development of Electronic Payments
    Masarykova univerzita Ekonomicko-správní fakulta Studijní obor: Finance Vývoj elektronických plateb Development of Electronic Payments Diplomová práce Vedoucí diplomové práce: Autor: prof. Ing. Jiří DVOŘÁK, DrSc. Mgr. Bc. Lucia MOŤKOVÁ Brno, 2017 Jméno autora: Lucia Moťková Název diplomové práce: Vývoj elektronických plateb Název práce v angličtině: Development of Electronic Payments Katedra: Katedra financí Vedoucí diplomové práce: prof. Ing. Jiří Dvořák, DrSc. Rok obhajoby: 2017 Anotace Diplomová práce klasifikuje peníze a elektronické (digitální) peníze, mezi které řadí i pohledávky z vkladů na bankovních účtech a soukromé elektronické peníze, včetně kryptoměn (bitcoin). Popisuje aspekty elektronických peněz a různých způsobů provádění elektronických plateb i jejich současnou právní regulaci v České republice, s cílem vytvoření modelů vývoje elektronických peněz a elektronických plateb a modelu elektronického bankovnictví. Autorka dále uvádí některá doporučení: doporučení retailovým klientům bank ve vztahu k realizaci elektronických plateb, doporučení státu ve vztahu k zajištění možnosti sledování peněžních toků a konečně doporučení bankám ve vztahu k vylepšení stávajících produktů, zejména v souvislosti s autentizací elektronických plateb. Annotation The diploma thesis classifies money and electronic (digital) money, among which claims on deposit bank accounts and private electronic money, including cryptocurrencies (bitcoin), are also classified. The features of electronic money and various methods of the realization of electronic
    [Show full text]
  • 51% Attack” January 2019
    PHILIP OWRUTSKY, PH.D., CFA VICE PRESIDENT, INVESTMENT STRATEGIST, CLIENT ADVISORY VIEWPOINTS FROM THE ACADIAN TEAM CRYPTOS’ ACHILLES HEEL: THE RISE OF THE “51% ATTACK” JANUARY 2019 • As of January 8th, Ethereum Classic is experiencing a “51% attack,” whereby malicious agents have stolen over $1.1 million by assuming control of enough computing power to falsify the currency’s transaction history. During 2018, several other cryptocurrencies were subject to similar attacks that netted fraudsters over $20 million. • We believe that these attacks threaten the very core of an entire class of cryptocurrencies, those based on the “proof-of-work” paradigm, which includes Bitcoin. • Paradoxically, the threat to this class of currencies has been exacerbated by their very success; namely, their integration into mainstream financial institutional frameworks. Bitcoin and other cryptocurrencies that are based on As of this writing, such an attack is underway what is known as a “proof-of-work” paradigm1 represent against the Ethereum Classic cryptocurrency. This isn’t a valuable technological advancement. Their underlying the first currency to fall victim. In 2018, malicious agents methodology allows for the maintenance of a provably successfully attacked several other cryptocurrencies in correct public ledger of transactions without the need this manner, pocketing over $20 million in the process for a central, trusted party to maintain it. That ledger’s (Table 1). By securing majority computing power veracity, and, thus, these cryptocurrencies’ credibility, associated with a currency, the perpetrators have been depends on an inviolable condition: that no individual or able to “double-spend” coins by undoing their side of syndicate can control a majority of the computing power anonymous transactions, retaining both their coins and associated with the platform.
    [Show full text]
  • APPLICATION of BLOCKCHAIN NETWORK for the USE of INFORMATION SHARING by Linir Zamir
    APPLICATION OF BLOCKCHAIN NETWORK FOR THE USE OF INFORMATION SHARING by Linir Zamir A Thesis Submitted to the Faculty of The College of Engineering and Computer Science in Partial Fulfillment of the Requirements for the Degree of Master of Science Florida Atlantic University Boca Raton, FL August 2019 Copyright 2019 by Linir Zamir ii ACKNOWLEDGEMENTS I would like to thank my committee members: Dr. Feng-Hao Liu, my commit- tee chair; Dr. Mehrdad Nojoumian and Dr. Elias Bou-Harb for their encouragement, insightful comments and hard questions. I would also like to thank my mother, who supported me with love and understanding. Without you, I could never have made it this far in my academical studies and generally in life. iv ABSTRACT Author: Linir Zamir Title: Application of Blockchain networkfor the use of Information Sharing Institution: Florida Atlantic University Thesis Advisor: Dr. Feng-Hao Liu Degree: Master of Science Year: 2019 The Blockchain concept was originally developed to provide security in the Bitcoin cryptocurrency network, where trust is achieved through the provision of an agreed-upon and immutable record of transactions between parties. The use of a Blockchain as a secure, publicly distributed ledger is applicable to fields beyond finance, and is an emerging area of research across many other fields in the industry. This thesis considers the feasibility of using a Blockchain to facilitate secured infor- mation sharing between parties, where a lack of trust and absence of central control are common characteristics. Implementation of a Blockchain Information Sharing system will be designed on an existing Blockchain network with as a communicative party members sharing secured information.
    [Show full text]