Zcash 백서

Zcash

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 35쪽 중 24쪽

2015 Soundness vulnerability in BCTV14[Parno2015] was found by Bryan Parno. An additional condition needed to resist this attack was documented by Ariel Gabizon [Gabizon2019, section 3]. The 2019 Soundness vulnerability inBCTV14[Gabizon2019] was found by Ariel Gabizon. The design of Saplingis primarily due to Matthew Green, Ian Miers, Daira-Emma Hopwood, Sean Bowe, Jack Grigg, and Jack Gavigan. A potential attack linkingdiversified payment addresses, avoided in the adopted design, was found by Brian Warner. The design of Orchardis primarily due to Daira-Emma Hopwood, Sean Bowe, Jack Grigg, Kris Nuttycombe, Ying Tong Lai, and Steven Smith. The observation in §5.4.1.6 ‘DiversifyHashSapling andDiversifyHash Orchard Hash Functions’ on p. 81 thatdiversified payment addressunlinkability can be proven in the same way askey privacyfor ElGamal, is due to Mary Maller. We thank Ariel Gabizon for teaching us the techniques of [BFIJSV2010] used in §B.2 ‘Groth16 batch verification’ on p.228, by applying them toBCTV14. The arithmetization used by Halo 2 is based on that used by PLONK[GWC2019] , which was designed by Ariel Gabizon, Zachary Williamson, and Oana Ciobotaru. Numerous people have contributed to the science ofzero-knowledge proving systems, but we would particularly like to acknowledge the work of Shafi Goldwasser, Silvio Micali, Oded Goldreich, Mihir Bellare, Charles Rackoff, Joe Kilian, Yael Tauman Kalai, Guy Rothblum, Rosario Gennaro, Bryan Parno, Jon Howell, Craig Gentry, Mariana Raykova, Jens Groth, Rafail Ostrovsky, and Amit Sahai. We thank the organizers of the ZKProof standardization effort and workshops; and also Anna Rose, Fredrik Harrysson, Terun Chitra, James Prestwich, Josh Cincinnati, Tanya Karsou, Henrik Jose, Chris Ward, and others for their work on the Zero Knowledge Podcast, ZK Summits, and ZK Study Club. These efforts have enriched the zero knowledge community immeasurably. Many of the ideas used inZcash—including the use ofzero-knowledge proofsto resolve the tension between privacy and auditability, Merkle trees over note commitments (using Pedersen hashes as in Sapling), and the use of “serial numbers” ornullifiersto detect or preventdouble-spends— were first applied to privacy-preserving digital currencies by Tomas Sander and Amnon Ta-Shma. To a large extentZcashis a refinement of their “Auditable, Anonymous Electronic Cash” proposal in [ST1999]. We thank Alexandra Elbakyan for her tireless work in dismantling barriers to scientific research. This document is set in the beautiful Quattrocento font designed by Pablo Impallari.Shielded poolnames are set in Raleway Italic, by Matt McInerney, Pablo Impallari, and Rodrigo Fuenzalida. TheNew Century Schoolbook font by URW Type Foundry, based on Century Schoolbook designed by Morris Fuller, is used foritalics. Finally, we would like to thank the Internet Archive for their scan of Peter Newell’s illustration of the Jubjub bird, from [Carroll1902]. 156 10 Change History #changehistory 2026.7.02026-07-05 #2026.7.0 • Apply the changes described in [ZIP-257] to specify the mitigation of the soundness bug in the pre- NU6.2 OrchardAction circuit, and a non-canonical proof length issue: –Add a vulnerability disclosure in §4.18.4 ‘Action Statement (Orchard)’ on p.66 for the soundness bug. – Add a consensus rule in §7.1.2 ‘Transaction Consensus Rules’ on p. 128 temporarily prohibiting Orchard Action descriptions, from a specifiedblock heighton eachnetworkuntil the activation of NU6.2. – Add consensus rules in §4.6 ‘Action Descriptions’ on p. 44 specifying whichverifying keyis used before and after NU6.2. – Use subscripts to indicate the verifying key for ZKAction.Prove and ZKAction.Verify, since more than one version of theOrchardcircuit has been deployed. – Remove the note in §4.1.13 ‘Zero-Knowledge Proving System’ on p. 36 saying that these subscripts are dropped. – [ NU6.2 onward] Add a consensus rule in §7.5 ‘Action Description Encoding and Consensus’ on p. 135 that the proofsOrchard fieldMUSTbe of the canonical length. •Add boilerplate support for NU6.2. • Specify in §3.3 ‘The Block Chain’ on p. 19 that NU6.2 is the most recentsettled network upgradeonTestnet andMainnet. • Note in §3.12 ‘Mainnet and Testnet’ on p. 24 thatTestnetdoes not always activatenetwork upgradesbefore Mainnet; NU6.2activated onTestnetafterMainnet. 2026.6.42026-07-05 #2026.6.4 •Apply the retrospective changes described in [ZIP-256] in response to vulnerabilities found after NU6.1: – Add a consensus rule in §4.6 ‘Action Descriptions’ on p. 44 that rk MUST NOTbe the identity point, retrospectively enforced as a soft fork. – Add a non-normative note in §7.5 ‘Action Description Encoding and Consensus’ on p. 135 on the in- valid ephemeralKey conformance issue. – Add a footnote in §7.1.2 ‘Transaction Consensus Rules’ on p. 128 clarifying that valueBalanceSapling for a v4transactionrefers to the value as encoded, not the normalizedv SaplingPoolBalance. – In §4.17 ‘Chain Value Pool Balances’ on p. 61, add consensus rules that the transparent chain value pool balanceMUST NOTbecome negative and that thetotal issued supplyMUST NOTexceed MAX_MONEY zatoshi. • Correct a typo in the balance argument in §4.14 ‘Balance and Binding Signature (Orchard)’ on p. 57 for Orchard: it should use thePallasgroup order𝑟 P, not theJubjuborder𝑟 J. •Factor outdkandovkderivation intoDeriveDkAndOvk Orchard, so that [ZIP-32] can use it without duplication. •Consistently usediscrete logarithmrather than “discrete log” . • Expand §3.2 ‘Shielded Pools and Notes’ on p. 15, retitled “Shielded Pools and Notes” , to describe the relation betweenshielded payment addresses,shielded pools, andnotes. • Distinguishnetwork upgrades,shielded protocols, andshielded poolstypographically, like this:Upgrade, Protocol,Pool. •Drop the blue highlighting forOverwinterand the brown for TODOs, so that those colours can be reused. •Update author affiliations. •Update how to report security-relevant issues, suggesting to use a GitHub Security Advisory. 157 2025.6.32025-12-02 #2025.6.3 • Specify in §3.3 ‘The Block Chain’ on p. 19 that NU6.1 is the most recentsettled network upgradeonTestnet andMainnet. •Update the description in §3.12 ‘Mainnet and Testnet’ on p.24 of protocol governance. 2025.6.22025-11-11 #2025.6.2 • In §4.16 ‘Computingρvalues and Nullifiers’ on p. 60, add a note that the ρ and ψ inputs to DeriveNullifier must be consistent with the note committed to bycm. • Fix an error in the statement of Merkle Path Validity for Orchard: theMerkle pathshould be from the leaf valueExtract P(cmold)rather thancm old. This was implemented as intended in the orchard crate. • Add a note to the Orchardkey components diagram in §3.1 ‘Payment Addresses and Keys’ on p. 14, say- ing that the derivations of ask and rivk shown there are not the only possibility, and referencing §4.2.3 ‘Orchard Key Components’ on p. 40. Also change the existing note in that section to say that “mostZcash wallets” , not justzcashd, derive Saplingand Orchardkeys and addresses according to [ZIP-32]. • Fix type errors in §4.20.2 ‘Decryption using an Incoming Viewing Key (Sapling and Orchard)’ on p. 71 and in §4.20.3 ‘Decryption using an Outgoing Viewing Key (Sapling and Orchard)’ on p. 73: ToScalarreturns an integer, not a byte sequence, and so cannot be assigned to rcm. This was implemented as intended in the zcash_note_encryption crate. • Rename §4.20.3 on p. 73 from “Decryption using a Full Viewing Key ( Saplingand Orchard)” to “Decryption using an Outgoing Viewing Key ( Saplingand Orchard)” . • Define allowedLeadBytes in §3.2.1 ‘Note Plaintexts and Memo Fields’ on p. 16, and use it to refactor the con- straints onnote plaintext lead bytes. •Correct the accents on Lukáš Korba’s name. • Add acknowledgements to Joe Kilian, Yael Tauman Kalai, and Guy Rothblum for contributions to the science ofzero-knowledge proving systems. 2025.6.12025-10-08 #2025.6.1 • Update NU6.1 consensus changes with the one-timelockbox disbursementaddresses, the splitting of the disbursement intoZIP271DisbursementChunkschunks, and other updates to [ZIP-271]. •Remove "proposal" from the version string. 2025.6.02025-09-17 #2025.6.0 •Apply NU6.1consensus changes from [ZIP-271]. •Add boilerplate support for NU6.1. •Specify in §3.3 ‘The Block Chain’ on p.19 that NU6is the most recent settlednetwork upgrade. • Clarify §3.4 ‘Transactions and Treestates’ on p. 19, taking into account the NU6 consensus changes from [ZIP-236]. • Adjust the recommendation in §4.2.2 ‘Sapling Key Components’ on p. 38 not to encode information in the diversifier, to recommend instead using a [ZIP-32]diversifier index. • Deprecate the encoding of a Saplingivk in §5.6.3.2 ‘Sapling Incoming Viewing Keys’ on p. 119, in favour of using aunified incoming viewing keywith a Saplingcomponent that includes thediversifier keydk. 158 • Tighten the type of ivk in Saplingto{1..2 ℓSaplingivk −1}, and the type of pkd in Saplingto KASapling.PublicPrimeOrder, in order to make the exclusion of the zero point for pkd more obvious [Zips-Issue664]. This also has the effect that a Saplingincoming viewing key §5.6.3.2 ‘Sapling Incoming Viewing Keys’ on p. 119 or a Sapling IVK Encodingin aunified incoming viewing key [ZIP-316] that encodes the zero ivk MUSTbe considered invalid when imported. Notes have been added in §5.6.3.1 ‘Sapling Payment Addresses’ on p. 119 and §5.6.3.2 ‘Sapling Incoming Viewing Keys’ on p.119 calling out these changes. • In §4.20.3 ‘Decryption using an Outgoing Viewing Key (Sapling and Orchard)’ on p. 73, retrospectively en- force the check for canonicity ofpkd. This has no effect on consensus relative to the previous version, because only small-orderJubjub curvepoints havenon-canonicalencodings, and so the check that returns ⊥ if pkd̸∈J (𝑟)* would catch all such cases. • Document in §5.4.7 ‘RedDSA,RedJubjub, andRedPallas’ on p. 95, §4.4 ‘Spend Descriptions’ on p. 42, and §7.1.2 ‘Transaction Consensus Rules’ on p. 128 that the canonicity restriction on the encoding of𝑅 in RedDSA signature validation is retrospectively valid onMainnetandTestnetbefore NU5. • So that Saplingand Orchardare consistent, §5.4.5.5 ‘Orchard Key Agreement’ on p. 93 now also defines the type KAOrchard.PublicPrimeOrder, which is used instead of KAOrchard.Public as the type of an Orchardpkd. This has no effect on conformance since bothKA Orchard.PublicPrimeOrderandKA Orchard.Publicare defined asP *. • In §5.6.4.4 ‘Orchard Raw Full Viewing Keys’ on p. 122, clarify the requirement onak by rewording “validPallas 𝑥-coordinate“ to “valid affine 𝑥-coordinate of aPallas curvepoint in P*“ . Implementations might use(0,0) to represent𝒪 P, but0is not a valid𝑥-coordinate in the sense required here. •Change incorrect uses of “block reward“ toblock subsidy. •Added dark mode rendering (https://zips.z.cash/protocol/protocol-dark.pdf). •Add an acknowledgement to Schell Scivally for discussions on the Zcash protocol. 2024.5.12024-09-26 #2024.5.1 •Apply NU6consensus changes from [ZIP-2001] and [ZIP-236]. • Collect the definitions of balances for eachchain value poolinto §4.17 ‘Chain Value Pool Balances’ on p. 61. •Add a definition oftotal issued supply. • Add acknowledgements to Aditya Bharadwaj, Andrew Arnott, Arya, Andrea Kobrlova, Lukáš Korba, and Honza Rychnovský for discussions on the Zcash protocol. 2024.5.02024-08-28 #2024.5.0 •Add the hyphen in Daira-Emma Hopwood. •Correct some author lists in the References. •Prevent incorrect line-breaking on hyphens. •In §5.4.1.9 ‘Sinsemilla Hash Function’ on p.84, declare use ofLEBS2IPinstead ofLEOS2IP. •Add an acknowledgement to Conrado Gouvêa for discussions on the Zcash protocol. •Add boilerplate support for NU6. 159 2023.4.02023-12-19 #2023.4.0 • The domain separators [4] and [5] used in the input to PRFexpandrseed for Saplingwere accidentally swapped in the protocol specification relative to [ZIP-212]. The implementation in zcashd followed [ZIP-212], using [4] to derivercmand[5]to deriveesk. This has been corrected in the protocol specification. For Orchard, the implementation in the orchard crate (and therefore in zcashd) followed the protocol spec- ification, using [5]||I2LEOSP 256(ρ) to derive rcm and [4]||I2LEOSP 256(ρ) to derive esk. This cannot now be changed, and so [ZIP-212] has been updated to follow this implementation. Notes have been added pointing out the discrepancy. • Document that the attacks in [DKLS2020] are no better than brute force key search against FF1-AES256 as specified in §5.4.4 ‘Pseudo Random Permutations’ on p.91. • In the table of §7.6 ‘Block Header Encoding and Consensus’ on p. 137, clarify that hashLightClientRoot is used inHeartwoodandCanopy, but not in NU5or later. • The return type of GroupHashJ(𝑟)* in §5.4.9.5 ‘Group Hash into Jubjub’ on p. 107 was incorrectly given as J(𝑟)*, rather than the correctJ (𝑟)*∪{⊥}. • In the discussion of partitioning oracle attacks onnoteencryption in §8.7 ‘In-band secret distribution’ on p. 153, we now use the fact that gd has order greater than the maximum value of ivk, rather than assuming that gd is a non-zero point in theprime-order subgroup. (In the case of Sapling, the circuits only enforce that gd is not asmall-orderpoint, not that it is in theprime-order subgroup. It is true that honestly generated addresses haveprime-order gd which would have been sufficient for the security argument against this class of attacks, but the chosen fix is more direct.) • Delete a confusing claim in §4.4 ‘Spend Descriptions’ on p. 42 that “The check that rk is not ofsmall orderis technically redundant with a check in theSpend circuit... ” . Thesmall-ordercheck excludes the zero point𝒪J, which theSpend authoritycheck that this claim was intending to reference does not. • An implementation of HomomorphicPedersenCommitSapling MAYresample thecommitment trapdooruntil the resulting commitment is not𝒪J, in order to avoid it being rejected as the cv field of aSpend description orOutput description. Add notes in §4.4 ‘Spend Descriptions’ on p. 42, §4.5 ‘Output Descriptions’ on p. 43, and §5.4.8.3 ‘Homomorphic Pedersen commitments (Sapling and Orchard)’ on p.99 to that effect. • Rename the section “Note Commitments and Nullifiers” to §4.16 ‘Computingρvalues and Nullifiers’ on p.60, to more accurately reflect its contents. • Split some of the content of the section “Notes” into subsections §3.2.2 ‘Note Commitments’ on p. 17 and §3.2.3 ‘Nullifiers’ on p. 18. Make the descriptions of hownote commitmentsandnullifiersare used more precise and explicit, and add forward references where helpful. •Remove redundancy in the definition ofnote plaintextsbetween §3.2.1 ‘Note Plaintexts and Memo Fields’ on p.16 and §5.5 ‘Encodings of Note Plaintexts and Memo Fields’ on p.115. •The abstract no longer describes the NU5version of the specification as a draft. •Acknowledge Greg Pfeil as a co-designer of theZcashprotocol. • Acknowledge Daira-Emma Hopwood for the fix to the Faerie Gold attack in Sprout, and add a reference to hir Explaining the Security of Zcashtalk at Zcon3 [Hopwood2022] for repairs to theZerocashsecurity definitions. •Acknowledge the font designers Pablo Impallari and Morris Fuller. •Change Daira-Emma Hopwood’s name. 2022.3.82022-09-15 #2022.3.8 •Correct Jurgen Bos’ name. 160 2022.3.72022-09-10 #2022.3.7 •Remove a now-unused sampling ofrcvin §4.8.3 ‘Dummy Notes (Orchard)’ on p.51. •Specify in §3.3 ‘The Block Chain’ on p.19 that NU5is the most recent settlednetwork upgrade. 2022.3.62022-09-01 #2022.3.6 •Correct Kexin Hu’s name. •Correct cross-references for the definition of ananchor. • Remove a calculation of cv in §4.8.3 ‘Dummy Notes (Orchard)’ on p. 51 that is not applicable to Orchard(since cvfor anAction descriptiondepends on both the spent and outputnotes). • Clarify that the recommended format for a QR code starts with aBech32encoding for a Saplingpayment addressand with aBech32mencoding for aunified payment address. • Replace ResearchGate links for[CDvdG1987] and [BDPA2007] with alternatives that do not cause false-positive link checker errors. • In protocol/README.rst: update the build dependency documentation for Debian Bullseye, mention the “make linkcheck ” target, and correct the description of “make all ” . •Update the Makefile to build correctly with newer versions of latexmk. 2022.3.52022-08-02 #2022.3.5 •ZIP 244 is not modified by ZIP 225. • §5.4.1.5 ‘CRHivk Hash Function’ on p. 80 incorrectly cross-referencedBLAKE2b-256 rather thanBLAKE2s-256. The actual specification was correct. 2022.3.42022-06-22 #2022.3.4 • Document in §5.4.6 ‘Ed25519’ on p. 93 that afull validatorimplementation that checkpoints on theCanopy activation blockMAYvalidateEd25519signatures using the post-Canopyrules for the whole chain. •Update references for [ECCZF2019] and [ZIP-302] and [ZIP-252]. 2022.3.32022-06-21 #2022.3.3 • In §3.12 ‘Mainnet and Testnet’ on p. 24, update the settled activationblock hashesto be those for NU5 on MainnetandTestnet. •Correct the history entry for v2022.3.2 to include the entry about the calculation for sizeProofsOrchard. •RenameExcludedPointEncodingstoPreCanopyExcludedPointEncodings. • In §5.6.2.3 ‘Sprout Spending Keys’ on p. 118, remove the statement that future key representations might use the padding bits of Sproutspending keys. •Give a full-text URL for [Nakamoto2008]. 2022.3.22022-06-06 #2022.3.2 •Set the NU5activation block heightforTestnetandMainnet. • An [ NU5 onward] consensus rule requiring the nConsensusBranchId field to match theconsensus branch ID used forSIGHASH transaction hashes, should apply only when effectiveVersion≥5 (since v4transactionsdid not explicitly encode the nConsensusBranchId field). •Correction in §5.3 ‘Constants’ on p.77:Uncommitted Orchard {0.. 𝑞P−1}is not abit sequence. 161 • In §7.1 ‘Transaction Encoding and Consensus’ on p. 125, add the calculation for sizeProofsOrchard to the v5transactionformat table. •Make §1.2 ‘High-level Overview’ on p.9 more precise aboutchain value pools. 2022.3.12022-04-28 #2022.3.1 • In §4.2.3 ‘Orchard Key Components’ on p. 40, do not allow construction of Orchardspending keyssuch that the corresponding internalincoming viewing keyis 0 or⊥. (This was already specified for the externalincoming viewing key.) Similarly in §5.6.4.4 ‘Orchard Raw Full Viewing Keys’ on p. 122, do not consider a decoded key valid if either its external or internalincoming viewing keywould be0or⊥. • Clarify how to determine which table in §7.1 ‘Transaction Encoding and Consensus’ on p. 125 to use for transactionparsing, depending on theeffectiveVersionas determined by the header field. •Correct “block chain branch” to “consensus branch” to match [ZIP-200]. •Add an acknowledgement to Mary Maller for reviewing theHalo 2security proofs. •Add an acknowledgement to Josh Cincinnati for discussions on the Zcash protocol. •Add acknowledgements to more people associated with the ZK Podcast. 2022.3.02022-03-18 #2022.3.0 • Correct a type error in the usage of Commitivk: the output type Commitivk.Output includes 0, but the type ofincoming viewing keysshould not include 0 because KAOrchard.Private does not. This is now handled by explicitly rejecting 0 as output from Commitivk when generating ivk in §4.2.3 ‘Orchard Key Components’ on p. 40. An encoding ofivk as 0 is also rejected in §5.6.4.3 ‘Orchard Raw Incoming Viewing Keys’ on p. 122 when parsing anincoming viewing key. TheAction circuitneeded no changes because pkd already could not be𝒪P, and therefore theDiversified address integritycondition fails whenivk= 0. • In §3.3 ‘The Block Chain’ on p. 19, define what asettled network upgradeis, specify requirements for check- pointing, and allow nodes to impose a limitation on rollback depth. • In §5.4.10.1 ‘BCTV14’ on p. 113, note that the above checkpointing requirement mitigates the risks of not performingBCTV14zk proofverification. •Document the consensus rule that coinbase script lengthMUSTbe{2..100}bytes. • §3.11 ‘Coinbase Transactions’ o
프로젝트로 돌아가기