Zcash 백서

Zcash

원문

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

n p. 24 effectively defined acoinbase transactionas the firsttransactionin ablock. This wording was copied from the Bitcoin Developer Reference [Bitcoin-CbInput], but it does not match the implementation in zcashd that was inherited from BitcoinCore. Instead, acoinbase transaction should be, and now is, defined as atransactionwith a single nullprevout. The specifications of consensus rules have been clarified and adjusted (without any actual consensus change) to take this into account, as follows: –ablockMUSThave at least onetransaction; – the firsttransactionin ablockMUSTbe acoinbase transaction, and subsequenttransactionsMUST NOTbecoinbase transactions; –atransparent inputin a non-coinbasetransactionMUST NOThave a nullprevout; – every non-nullprevoutMUSTpoint to a uniqueUTXOin either a precedingblock, or a previous trans- actionin the sameblock(this rule was previously not given explicitly because it was assumed to be inherited fromBitcoin); – the rule that “Acoinbase transactionMUST NOThave anytransparent inputswith non-null prevout fields” is removed as an explicit consensus rule because it is implied by the corrected definition of coinbase transaction. 162 2022.2.192022-01-19 #2022.2.19 • In §4.10 ‘SIGHASH Transaction Hashing’ on p. 53, add a consensus rule thatSIGHASH typeencodings MUSTbe canonical for v5transactions. • In §3.5 ‘JoinSplit Transfers and Descriptions’ on p. 20, clarify that balance forJoinSplit transfersis enforced by theJoinSplit statement, and that there is no consensus rule to check it directly. • In §8.5 ‘Internal hash collision attack and fix’ on p. 151, add a security argument for why the SHA-256- basedcommitment scheme NoteCommitSprout isbindingandhiding, under reasonable assumptions about SHA256Compress. 2022.2.182022-01-03 #2022.2.18 • Change the types ofcm𝑥, UncommittedOrchard, andak in Orchardto{0.. 𝑞P−1} , avoiding type errors and reflecting the implementation in zcashd. This eliminates all uses of P𝑥 (except that ak in an Orchardfull viewing keyis still required to be a validPallasaffine-short-Weierstrass𝑥-coordinate). • Refine the security argument aboutpartitioning oracle attacksin §8.7 ‘In-band secret distribution’ on p. 153: – The argument for decryption with anincoming viewing keydoes not need to depend on theDecisional Diffie–Hellman Problem, sinceg d is committed to by thenote commitmentas well aspk d. –It is necessary to say that thenote commitmentis always checked for a successful decryption. – Pedantically, it was not correct to conclude from the given security argument thatpartitioning oracle attacksagainst anoutgoing ciphertextare necessarily prevented, according to the definition in [LGR2021]. Instead, the correct conclusions are that such attacks could not feasibly result in any equivocation of the decrypted data, or in recovery ofovkorock. • Correct the note about domain separators for PRFexpand in §4.1.2 ‘Pseudo Random Functions’ on p. 26, and ensure that new domain separators for deriving internal keys from [ZIP-32] and [ZIP-316] are included. 2021.2.172021-12-01 #2021.2.17 • Add notes in §B.1 ‘RedDSAbatch validation’ on p. 227, §B.2 ‘Groth16 batch verification’ on p. 228 and §B.3 ‘Ed25519batch validation’ on p.230 that𝑧 𝑗 may be sampled from{0..2 128−1}instead of{1..2 128−1}. • Add note in §8.7 ‘In-band secret distribution’ on p. 153 about resistance ofnoteencryption topartitioning oracle attacks[LGR2021]. •Add acknowledgement to Mihir Bellare for contributions to the science ofzero-knowledge proofs. •Add acknowledgement to Sasha Meyer. 2021.2.162021-09-30 #2021.2.16 •Use complete addition inSinsemillaCommit. •Correct the proof of Theorem 5.4.6 on p.102. •Change the type ofcm old in OrchardtoPrather thanP *, i.e. allow the identity point. • Change the type of rtOrchardPool from P𝑥 (i.e. a Pallas𝑥 -coordinate or 0) to{0.. 𝑞P−1} . This reflects the existing zcashd implementation; also checkingrt OrchardPool∈P 𝑥 would require a square root and is unnecessary. • Witness gnewd and pknewd in the OrchardAction circuitas P*, i.e. non-identity Pallas points, rather than witnessing their representations asbit sequences. This reflects the existing zcashd implementation. •Note thatak P in Orchardcannot be the identity. • Correct the consensus rule about the maximum value of outputs in acoinbase transaction: it should reference theblock subsidyrather than theminer subsidy. 163 2021.2.152021-09-01 #2021.2.15 • Correct a minor error in the proof of Theorem 5.4.3 on p. 86: the condition SinsemillaHashToPoint(𝐷, 𝑀)̸=⊥ is required in the proof. (The case SinsemillaHashToPoint(𝐷, 𝑀) =⊥ is covered by Theorem 5.4.4 on p. 87.) The proof had not been updated correctly when the statement was revised inv2021.2.0. Also add a missing 𝐷 argument toSinsemillaHashToPointin that proof. • Fix a reference to nonexistent version 2019.0-beta-40 of this specification (in §7.7.3 ‘Difficulty adjustment’ on p.140) that should be v2019.0.0. •Fix URL links to [BBDP2001] and [BDJR2000]. •Improve protocol/links_and_dests.py to eliminate false positives when checking DOI links. 2021.2.142021-08-12 #2021.2.14 •Fix the URL for [ZIP-239] in the References. • Reword the reference to a Saplingfull viewing keyin §4.8.2 ‘Dummy Notes (Sapling)’ on p. 50 (thefull viewing keywould includeovk, although it is not used in that section). 2021.2.132021-07-29 #2021.2.13 • Add consensus rules in §3.8 ‘Note Commitment Trees’ on p. 23 that, for eachnote commitment tree, ablock MUST NOTaddnote commitmentsthat exceed the capacity of that tree. 2021.2.122021-07-29 #2021.2.12 • Change the number of partial rounds, 𝑅𝑃 , for Poseidon from 58 to 56. This matches the number calcu- lated by calc_round_numbers.py (for 128-bit security “with margin”) in Version 1.1 of thePoseidon reference implementation [Poseidon-1.1] [Poseidon-Zc1.1]. 2021.2.112021-07-20 #2021.2.11 • Change the definition of inputs to theAction circuitto split enableSpends and enableOutputs into two field elements. 2021.2.102021-07-13 #2021.2.10 • Clarify that decomposition of scalars for scalar multiplication in theAction circuitMUSTbe canonical, unless a non-canonical decomposition can be proven to result in an equivalent statement – and clarify for which multiplications the latter case applies. • The encoding of theblock heightin the scriptSig of acoinbase transactionis now at most 5 bytes (rather than 9 bytes), becauseblock heightMUSTalso be encoded in the 32-bit nExpiryHeight field ofcoinbase transactionsafter NU5activation. • Clarify in §3.4 ‘Transactions and Treestates’ on p. 19 that the remaining value in atransparent transaction value poolis only available to miners as a fee in the case of non-coinbasetransactions, and that the remaining value in thetransparent transaction value poolof acoinbase transactionis destroyed. • Remove a spurious reference to rseed in §4.19 ‘In-band secret distribution (Sprout)’ on p. 68. There were no changes for Sproutin [ZIP-212]. 164 2021.2.92021-07-01 #2021.2.9 • Add a consensus rule for version 5 or latertransactions, that if nActionsOrchard >0 then at least one of enableSpendsOrchard and enableOutputsOrchard MUSTbe1. • Delete the consensus rule in §3.4 ‘Transactions and Treestates’ on p. 19 that required checking that each intermediaterootof thenote commitment treeis not ⊥. Checking this rule would have imposed a significant performance penalty, since intermediate roots do not otherwise need to be computed. • Change the type of MerkleCRHOrchard to have{0.. 𝑞P−1} in place of{0.. 𝑞P−1}∪{⊥} for the inputs and output, and map a⊥ output from SinsemillaHash to 0. (We retain the original definitions of SinsemillaHash and SinsemillaHashToPoint both because it would be disruptive to change them at this point in the Network Upgrade Process, and because it is necessary to track⊥ outputs in order to correctly model non-determinism in theAction circuit.) • Allow the Merkle path validity check in theAction circuitto pass if any output of MerkleCRHOrchard is 0, and add a note in §4.9 ‘Merkle Path Validity’ on p.52 arguing that this is safe. • Fix a typo in the Security Requirements for §5.4.1.3 ‘MerkleCRHOrchard Hash Function’ on p. 80: the length of the input toSinsemillaHashis10 + 2·ℓ OrchardMerkle bits, not6 + 2·ℓ OrchardMerkle bits. • Replace “must” with “MUST” in two consensus rules specified in §7.1 ‘Transaction Encoding and Consensus’ on p.125. • Add a clarification in §7.1.2 ‘Transaction Consensus Rules’ on p. 128 that afterHeartwoodand beforeCanopy activation, Sapling-pool outputs of acoinbase transactionMUSThavenote plaintext lead byteequal to 0x01. This was implied by the existing rule that such outputsMUSTdecrypt successfully with an all-zerooutgoing viewing key. •Correct𝑙to𝑙⋆in two places in §5.4.1.3 ‘MerkleCRHSapling Hash Function’ on p.79. • Correct an erroneous statement in §3.4 ‘Transactions and Treestates’ on p. 19 that claimedtransaction IDs are not part of the consensus protocol. 2021.2.82021-06-29 #2021.2.8 • Change one of the [ Sapling onward] consensus rules in §7.1.2 ‘Transaction Consensus Rules’ on p. 128 to have the correct applicability: [ SaplingtoCanopyinclusive, pre- NU5]. •Describetransaction IDsandwtxidsin §3.4 ‘Transactions and Treestates’ on p.19. •Add a section §7.1.1 ‘Transaction Identifiers’ on p.128 on how to computetransaction IDsandwtxids. • Split thetransaction-related consensus rules into their own subsection §7.1.2 ‘Transaction Consensus Rules’ on p.128, for more precise cross-referencing. 2021.2.72021-06-28 #2021.2.7 •Correct the type ofUncommitted Orchard, which should beP 𝑥 rather than abit sequence. •Explicitly say that padding in §5.4.1.9 ‘Sinsemilla Hash Function’ on p.84 is by appending zero bits. • Add a step to the algorithm for generating an Orchard-pool notein §4.7.3 ‘Sending Notes (Orchard)’ on p. 48, to restart ifesk= 0. 2021.2.62021-06-26 #2021.2.6 • Require that from NU5 activation, the nExpiryHeightfield of acoinbase transactionis set to theblock height. This is needed to maintain the property that alltransactionshave uniquetransaction IDs, as explained in a note in §7.1.2 ‘Transaction Consensus Rules’ on p. 128. In order to avoid theblock heightbeing limited to 499999999, we also remove that bound on nExpiryHeight forcoinbase transactions. • Remove the recommendation to support 63-bitblock heightsin §3.3 ‘The Block Chain’ on p. 19 (since it is incompatible with the above consensus rule for coinbase nExpiryHeight). 165 •Ensure that thelayernumber is passed toMerkleCRHin §4.9 ‘Merkle Path Validity’ on p.52. • Refine the key components diagram in §3.1 ‘Payment Addresses and Keys’ on p. 14 to show that Orchard incoming viewing keysinclude bothdkandivk. • Clarify that the{−MAX_MONEY..MAX_MONEY} range restriction applies to both valueBalanceSapling and valueBalanceOrchard. •Update §5.5 ‘Encodings of Note Plaintexts and Memo Fields’ on p.115 for Orchard. •Add [ZIP-203], [ZIP-212], and [ZIP-213] to the list of ZIPs updated for NU5. •Give cross-references to §2 ‘Notation’ on p.11 where ?√∙ and +√∙ are used. 2021.2.52021-06-19 #2021.2.5 • Change the consensus rule that requires at least one input to, and at least one output from a v5 or later transaction, to take into account the enableSpendsOrchard and enableOutputsOrchard flags. • Correct the type of Extract⊥P imported in §5.4.1.9 ‘Sinsemilla Hash Function’ on p. 84 (from P→P 𝑥 to P∪{⊥}→P 𝑥∪{⊥}). •Add [ZIP-209] to the list of ZIPs updated for NU5. 2021.2.42021-06-08 #2021.2.4 • Add an explicit consensus rule in §7.1.2 ‘Transaction Consensus Rules’ on p. 128 that the reserved bits of the flagsOrchard fieldMUSTbe zero. • Correct a cut-and-paste error in the algorithm for §4.8.3 ‘Dummy Notes (Orchard)’ on p. 51, which should refer to theAction statementrather than theSpend statement. 2021.2.32021-06-06 #2021.2.3 • Specify (as a note in §4.18.4 ‘Action Statement (Orchard)’ on p. 66) the encoding ofprimary inputsto the Action circuit. This uses new helper functions 𝑥 and 𝑦 defined in §5.4.9.7 ‘Coordinate Extractor for Pallas’ on p. 109. The specification of ExtractP has also been refactored to use 𝑥 (this does not change the Orchard protocol). • In §5.4.1.10 ‘PoseidonHashFunction’ on p. 87, say that the round constants as well as the MDS matrices are generated according to Version 1.1 of the reference implementation. •Clarify thatepkencoded in anAction descriptioncannot be𝒪 P. •Specify that Orchardspending keysare encoded usingBech32m. •Add [ZIP-239] to the list of ZIPs included in NU5. • Move the section on abstraction (previously section 5.1) to §4 ‘Abstract Protocol’ on p. 25. Section 5.2 has been split into two ( §5.1 ‘Integers, Bit Sequences, and Endianness’ on p. 76 and §5.2 ‘Bit layout diagrams’ on p.76) to avoid renumbering later subsections. •Correct an error in the encoding of height-in-coinbase forblocksat heights1..16. • Clarify, in §3.3 ‘The Block Chain’ on p. 19, requirements on the range ofblock heightsthat should be sup- ported. • Delete the sentence “All conversions betweenEd25519points,byte sequences, and integers used in this section are as specified in [BDLSY2012]. ” from §5.4.6 ‘Ed25519’ on p. 93. This sentence was misleading given that the conversions in [BDLSY2012] are not sufficiently well-specified for a consensus protocol; it should have been deleted earlier when explicit definitions forreprBytes Ed25519 andabstBytes Ed25519 were added. •Make the NU5specification the default. 166 2021.2.22021-05-20 #2021.2.2 • Clarify in §4.10 ‘SIGHASH Transaction Hashing’ on p. 53 that v4transactionscontinue to use the [ZIP-243] SIGHASH algorithmafter NU5activation. 2021.2.12021-05-20 #2021.2.1 •Correct the size of vActionsOrchard in §7.1 ‘Transaction Encoding and Consensus’ on p.125. • Change the type of OrchardMerklehash valuesto {0.. 𝑞P−1} , with a corresponding change to the signature of MerkleCRHOrchard. Add a note to §4.9 ‘Merkle Path Validity’ on p. 52 clarifying thatnon-canonicalencodings are allowed as input toMerkleCRH Orchard. •Clarify the distinction between Orchardincoming viewing keysandKA Orchard private keys. • Add a note in §5.4.1.9 ‘Sinsemilla Hash Function’ on p. 84 that [JT2020, Lemma 3] proves a tight reduction from finding a nontrivialdiscrete logarithmrelation to theDiscrete Logarithm Problem. • Add a note to §4.9 ‘Merkle Path Validity’ on p. 52 clarifying the encoding of rtSaplingPool as aprimary inputto the SaplingSpend circuit, and thatnon-canonicalencodings are allowed as input toMerkleCRH Sapling. •Change the notationℐ 𝐷𝑖 for a SaplingPedersen generator toℐ(𝐷, 𝑖). 2021.2.02021-05-07 #2021.2.0 • Include ρ as an input to the derivation of ψ, esk, and rcm in Orchard. This was originally intended and as described in [Zcash-Orchard, Section 3.5 Nullifiers]. • Change the statement of Theorem 5.4.3 on p. 86 to exclude⊥ outputs from SinsemillaHashToPoint. This does not affect security given Theorem 5.4.4 on p. 87, but the⊥ case is only handled by the latter proof and not the former. • Delegate to [ZIP-316] for the specification ofunified payment addresses,unified incoming viewing keys, and unified full viewing keys( §5.6.4.1 ‘Unified Payment Addresses and Viewing Keys’ on p.121). •Specify thatdiversifier indicesfor Orchardpayment addressesshould be chosen uniquely, not randomly. • Vanitydiversifiersare not an issue for Orchardgiven that it does not have its ownpayment addressformat, and given the use of “jumbling” ([ZIP-316]) inunified payment addresses. Remove the corresponding note from §4.2.3 ‘Orchard Key Components’ on p.40. •Clarify that the change to use hashBlockCommitments in ablock headerfor NU5is a consensus rule. • Clarify thattransparent inputsare prohibited incoinbase transactionsonly if they have a non-null prevout field. • Caveat how the result of[GG2015] applies to analysis of PRFnfOrchard in §5.4.2 ‘Pseudo Random Functions’ on p.89. • Unlinkability ofdiversified payment addressesdepends on theDecisional Diffie–Hellman Problem, not the Discrete Logarithm Problem. •Add a paragraph to §8.6 ‘Changes to PRF inputs and truncation’ on p.152 covering Orchard. • Clarify the definition of pad in §5.4.1.9 ‘Sinsemilla Hash Function’ on p. 84 by disambiguating 𝑀 pieces from 𝑀 padded. • State explicitly that valueBalanceOrchard can only be negative in acoinbase transactionif it has [ZIP-213] shielded outputs. •Update the list of ZIPs relevant to NU5in §6 ‘Network Upgrades’ on p.124. •Clarify notation by changingℓ rcm toℓ Sproutrcm . 167 2021.1.242021-04-23 #2021.1.24 • Add the nConsensusBranchId field to v5transactions, matching theconsensus branch IDused forSIGHASH transaction hashes. •Include thediversifier keyin an encoded OrchardIncoming Viewing Key. •Remove an unused precomputation in §5.4.9.8 ‘Group Hash into Pallas and Vesta’ on p.110. •Clarify that only anoutgoing cipher keyis strictly needed to decrypt anoutgoing ciphertext. • Explicitly say thatcoinbase transactionsMUST NOThavetransparent inputs(this is a consensus rule inherited fromBitcoinwhich has been present since launch). 2021.1.232021-04-19 #2021.1.23 • Correct errors in the definitions ofExtractP and Extract⊥P in §5.4.9.7 ‘Coordinate Extractor for Pallas’ on p. 109: ExtractP(𝒪P)should be0, andExtract ⊥P(⊥)should be⊥. • Change the type of KAOrchard public keys and shared secrets to P* (i.e. exclude𝒪P), and the type of KAOrchard private keystoF *𝑟P (i.e. exclude0). •Change the type of an Orchardivkto{1.. 𝑞 P−1}(i.e. exclude0). •Change the types ofpk oldd ,cm old andak P toP* in theauxiliary inputsto theAction statement. •When creatingOrchard-poolnotes, repeat with anotherrseedifcmis⊥. •Add a note in §4.2.3 ‘Orchard Key Components’ on p.40 about non-uniformity ofivk. •Fix a typo: “Decription” to “Description” . •AddAction descriptionsto the introduction of §4.16 ‘Computingρvalues and Nullifiers’ on p.60. •Use a different footnote symbol for each Saplingfield cardinality rule in v5transactions. •Fix some URLs in references. 2021.1.222021-04-05 #2021.1.22 •Specify that aunified payment addressMUSTcontain at least oneshielded payment address. •Further clarifications to Theorem 5.4.3 on p.86. •CorrectZKSpend.VerifytoZKOutput.Verifyin §4.5 ‘Output Descriptions’ on p.43. •Make sure that Change History entries are URL destinations. 2021.1.212021-04-01 #2021.1.21 •Correct and clarify Theorem 5.4.3 on p.86 and Theorem 5.4.4 on p.87. • Clarify that adummy noteshould be created if no real Orchard-pool noteis being spent in anAction transfer. • Add a caveat in §4.2.3 ‘Orchard Key Components’ on p. 40 about reuse ofrivk between PRFexpand and Commitivk. • Expand the set of ZIPs associated with NU5 in §6 ‘Network Upgrades’ on p. 124, and reference [Zcash-halo2] and [Zcash-Orchard] there. •Section §5.4.5.6 ‘Orchard Key Derivation’ on p.93 should be in slate blue. •Explicitly note that the end of the [ZIP-212] grace period precedes NU5activation. •Change the condition for presence of anchorSapling in a version 5transactionto vSpendsSapling >0. •Fix type error inkdfinputforKDF Sapling andKDF Orchard (ephemeralKey is already abyte sequence). • Make a note in §8.7 ‘In-band secret distribution’ on p. 153 of the divergence of ivk for Saplingand Orchard from a uniform scalar. 168 • Correct the set of inputs to PRFexpand used for [ZIP-32] and Orchardin §4.1.2 ‘Pseudo Random Functions’ on p.26. • Write the caution about linkage between the abstract and concrete protocols in §4 ‘Abstract Protocol’ on p.25. • Update the Sproutkey component diagram in §3.1 ‘Payment Addresses and Keys’ on p. 14 to remove magenta highlighting. 2021.1.202021-03-25 #2021.1.20 • Credit Eirik Ogilvie-Wigley as a designer of the Zcash protocol. Add Andre Serrano, Brad Miller, Charlie O’Keefe, David Campbell, Elena Giralt, Francisco Gindre, Joseph Van Geffen, Josh Swihart, Kevin Gorham, Larry Ruane, Marshall Gaucher, and Ryan Taylor to the acknowledgements. •Add proof ofcollision resistancefor Sinsemilla. •Correct some interim findings of the NCC specification audit: –Fix typos. –Correct the de
프로젝트로 돌아가기