New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the check that Merkle roots are not ⊥ for Orchard #530
Conversation
…ecking that each intermediate Merkle root of the note commitment tree is not ⊥. Checking this rule would have imposed a significant performance penalty, since intermediate roots do not otherwise need to be computed. Signed-off-by: Daira Hopwood <daira@jacaranda.org>
…ace of MerkleHash^Orchard ∪ {⊥} for the inputs and output, and map a ⊥ output from SinsemillaHash to 0. Signed-off-by: Daira Hopwood <daira@jacaranda.org>
… any output of MerkleCRH^Orchard is 0, and add a note in \crossref{merklepath} arguing that this is safe. Signed-off-by: Daira Hopwood <daira@jacaranda.org>
…h}: the length of the input to SinsemillaHash is 10 + 2·ℓ^Orchard_Merkle bits, not 6 + 2·ℓ^Orchard_Merkle bits. Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
I suggest reviewing this commit-by-commit with the rendered PDF open. |
|
||
\vspace{-1ex} | ||
\consensusrule{The \merkleRoot of the \Orchard \noteCommitmentTree \MUSTNOT be $\bot$ | ||
in any (intermediate or output) \treestate created by a \block.} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that after this change, the Orchard Merkle root in a final treestate (not just an intermediate treestate) is allowed to be 0. There's no advantage in making a distinction between intermediate and final roots, even if the latter is cheaper to check.
\item For \Sapling, Merkle \merkleHashes are specified to be encoded as bit sequences, but the | ||
\merkleRoot $\rt{Sapling}$ is encoded for the \primaryInput of a \spendProof as an element | ||
of $\GF{\ParamJ{q}}$, as specified in \crossref{cctsaplingspend}. The \spendCircuit allows | ||
inputs to $\MerkleCRH{Sapling}$ at each \merkleNode to be \nonCanonicallyFieldElement encoded, | ||
as specified in \crossref{cctmerklepath}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just moving the existing note for formatting reasons.
\item For \Orchard, Merkle \merkleHashes have type $\MerkleHashOrchard$ as defined in | ||
\crossref{concreteextractorpallas}. Similarly to \Sapling, the \actionCircuit allows | ||
inputs to $\MerkleCRH{Orchard}$ at each \merkleNode to be \nonCanonicallyFieldElement | ||
encoded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, this is just moving the existing note into a list.
\item It must be infeasible to find a input of length $6 + 2 \mult \MerkleHashLength{Orchard}$ | ||
to $\SinsemillaHash$ that yields output $\bot$. | ||
\item $\SinsemillaHash$ must be \collisionResistant. | ||
\item It must be infeasible to find a input of length $10 + 2 \mult \MerkleHashLength{Orchard}$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an independent typo.
\end{securityrequirements} | ||
|
||
\pnote{The prefix $l$ provides domain separation between inputs at different layers of the | ||
\pnote{The prefix $\layerRepr$ provides domain separation between inputs at different layers of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, an independent fix.
\item There is no solution to $y^2 = 0^3 + 5$ in $\GF{\ParamP{q}}$, and so $\ExtractP(P)$ | ||
can only be $0$ when $P = \ZeroP$. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to say this in order to argue that MerkleCRHOrchard only returns 0 for the exceptional case that we proved would yield a discrete log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK. I am not well-enough versed in the protocol spec to identify anything that might have been missed, but I have verified that all of the changes match my understanding.
This was included in v2021.2.9. |
…uttycom Update Orchard commitment tree hashes to use total MerkleCRH^Orchard. See zcash/zips#530
No description provided.