In \crossref{sighash}, add a consensus rule that SIGHASH type encodings MUST be canonical

for v5 transactions.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2022-01-19 18:01:34 +00:00
parent 24cfab0b55
commit dcc5532d61
1 changed files with 13 additions and 0 deletions

View File

@ -6053,6 +6053,15 @@ to use the \sighashAlgorithm defined in \cite{ZIP-243}. After \NUFive activation
\transaction versions use the \NUFive \consensusBranchID \hexint{F919A198} as defined in
\cite{ZIP-252}.}
\nufive{
\consensusrule{
\nufiveonward{Any \sighashType encoding used in a version 5 \transaction \MUST be the
canonical encoding of one of the defined \sighashTypes, i.e.\ one of \hexint{01},
\hexint{02}, \hexint{03}, \hexint{81}, \hexint{82}, or \hexint{83}. (Previously,
undefined bits of a \sighashType encoding were ignored.)}
} %consensusrule
} %nufive
\lsubsection{Non-malleability (\SproutText)}{sproutnonmalleability}
@ -14545,6 +14554,10 @@ Peter Newell's illustration of the Jubjub bird, from \cite{Carroll1902}.
\historyentry{2022.2.19}{}
\begin{itemize}
\nufive{
\item In \crossref{sighash}, add a consensus rule that \sighashType encodings \MUST
be canonical for v5 \transactions.
} %nufive
\item In \crossref{joinsplit}, clarify that balance for \joinSplitTransfers is enforced
by the \joinSplitStatement, and that there is no consensus rule to check it directly.
\item In \crossref{internalh}, add a security argument for why the \shaHash-based