Specify lead bytes for P2SH and P2PKH addresses.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2016-10-03 07:11:04 +01:00
parent 891f21bac9
commit 3dd475ea77
1 changed files with 13 additions and 12 deletions

View File

@ -333,18 +333,18 @@
\newcommand{\PaymentAddressSecondByte}{\hexint{9A}} \newcommand{\PaymentAddressSecondByte}{\hexint{9A}}
\newcommand{\SpendingKeyLeadByte}{\hexint{AB}} \newcommand{\SpendingKeyLeadByte}{\hexint{AB}}
\newcommand{\SpendingKeySecondByte}{\hexint{36}} \newcommand{\SpendingKeySecondByte}{\hexint{36}}
\newcommand{\PtoSHAddressLeadByte}{\hexint{??}} \newcommand{\PtoSHAddressLeadByte}{\hexint{1B}}
\newcommand{\PtoSHAddressSecondByte}{\hexint{??}} \newcommand{\PtoSHAddressSecondByte}{\hexint{9C}}
\newcommand{\PtoPKHAddressLeadByte}{\hexint{??}} \newcommand{\PtoPKHAddressLeadByte}{\hexint{1B}}
\newcommand{\PtoPKHAddressSecondByte}{\hexint{??}} \newcommand{\PtoPKHAddressSecondByte}{\hexint{97}}
\newcommand{\PaymentAddressTestnetLeadByte}{\hexint{14}} \newcommand{\PaymentAddressTestnetLeadByte}{\hexint{14}}
\newcommand{\PaymentAddressTestnetSecondByte}{\hexint{51}} \newcommand{\PaymentAddressTestnetSecondByte}{\hexint{51}}
\newcommand{\SpendingKeyTestnetLeadByte}{\hexint{B1}} \newcommand{\SpendingKeyTestnetLeadByte}{\hexint{B1}}
\newcommand{\SpendingKeyTestnetSecondByte}{\hexint{EB}} \newcommand{\SpendingKeyTestnetSecondByte}{\hexint{EB}}
\newcommand{\PtoSHAddressTestnetLeadByte}{\hexint{??}} \newcommand{\PtoSHAddressTestnetLeadByte}{\hexint{1B}}
\newcommand{\PtoSHAddressTestnetSecondByte}{\hexint{??}} \newcommand{\PtoSHAddressTestnetSecondByte}{\hexint{9A}}
\newcommand{\PtoPKHAddressTestnetLeadByte}{\hexint{??}} \newcommand{\PtoPKHAddressTestnetLeadByte}{\hexint{1C}}
\newcommand{\PtoPKHAddressTestnetSecondByte}{\hexint{??}} \newcommand{\PtoPKHAddressTestnetSecondByte}{\hexint{05}}
\newcommand{\NotePlaintextLeadByte}{\hexint{00}} \newcommand{\NotePlaintextLeadByte}{\hexint{00}}
\newcommand{\AuthPublic}{\mathsf{a_{pk}}} \newcommand{\AuthPublic}{\mathsf{a_{pk}}}
\newcommand{\AuthPrivate}{\mathsf{a_{sk}}} \newcommand{\AuthPrivate}{\mathsf{a_{sk}}}
@ -2444,10 +2444,10 @@ The raw encoding of a P2PKH address consists of:
\item In \Bitcoin a single byte is used for the version field identifying \item In \Bitcoin a single byte is used for the version field identifying
the address type. In \Zcash two bytes are used. For addresses on the address type. In \Zcash two bytes are used. For addresses on
the production network, this fixes the first two characters of the the production network, this fixes the first two characters of the
Base58Check encoding to be \ascii{T3} for P2SH addresses, or Base58Check encoding to be \ascii{r3} for P2SH addresses, or
\ascii{T1} for P2PKH addresses. (This does \emph{not} imply that a \ascii{r1} for P2PKH addresses. (This does \emph{not} imply that a
\transparent \Zcash address can be parsed in the same way as a \transparent \Zcash address can be parsed in the same way as a
\Bitcoin address just by removing the \ascii{T}.) \Bitcoin address just by removing the \ascii{r}.)
\item \Zcash does not yet support Hierarchical Deterministic Wallet \item \Zcash does not yet support Hierarchical Deterministic Wallet
addresses \cite{BIP-32}. addresses \cite{BIP-32}.
\end{pnotes} \end{pnotes}
@ -2455,7 +2455,7 @@ The raw encoding of a P2PKH address consists of:
\nsubsubsection{\Transparent{} Private Keys} \label{transparentkeyencoding} \nsubsubsection{\Transparent{} Private Keys} \label{transparentkeyencoding}
These are encoded in the same way as in \Bitcoin \cite{Bitcoin-Base58}, These are encoded in the same way as in \Bitcoin \cite{Bitcoin-Base58},
for both the production and test networks. \todo{confirm this.} for both the production and test networks.
\nsubsubsection{\Protected{} Payment Addresses} \label{paymentaddrencoding} \nsubsubsection{\Protected{} Payment Addresses} \label{paymentaddrencoding}
@ -3627,6 +3627,7 @@ The errors in the proof of Ledger Indistinguishability mentioned in
\subparagraph{2016.0-beta-1.8} \subparagraph{2016.0-beta-1.8}
\begin{itemize} \begin{itemize}
\item Specify the lead bytes for \transparent P2SH and P2PKH addresses.
\item Add a section on which BIPs apply to \Zcash. \item Add a section on which BIPs apply to \Zcash.
\item Change the representation type of $\vpubOldField$ and $\vpubNewField$ \item Change the representation type of $\vpubOldField$ and $\vpubNewField$
to \type{uint64\_t}. (This is not a consensus change because the type of to \type{uint64\_t}. (This is not a consensus change because the type of