From 3dd475ea77b951500c6a9206da7b43a20d0d0428 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 3 Oct 2016 07:11:04 +0100 Subject: [PATCH] Specify lead bytes for P2SH and P2PKH addresses. Signed-off-by: Daira Hopwood --- protocol/protocol.tex | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/protocol/protocol.tex b/protocol/protocol.tex index ccb60ca1..5804bba2 100644 --- a/protocol/protocol.tex +++ b/protocol/protocol.tex @@ -333,18 +333,18 @@ \newcommand{\PaymentAddressSecondByte}{\hexint{9A}} \newcommand{\SpendingKeyLeadByte}{\hexint{AB}} \newcommand{\SpendingKeySecondByte}{\hexint{36}} -\newcommand{\PtoSHAddressLeadByte}{\hexint{??}} -\newcommand{\PtoSHAddressSecondByte}{\hexint{??}} -\newcommand{\PtoPKHAddressLeadByte}{\hexint{??}} -\newcommand{\PtoPKHAddressSecondByte}{\hexint{??}} +\newcommand{\PtoSHAddressLeadByte}{\hexint{1B}} +\newcommand{\PtoSHAddressSecondByte}{\hexint{9C}} +\newcommand{\PtoPKHAddressLeadByte}{\hexint{1B}} +\newcommand{\PtoPKHAddressSecondByte}{\hexint{97}} \newcommand{\PaymentAddressTestnetLeadByte}{\hexint{14}} \newcommand{\PaymentAddressTestnetSecondByte}{\hexint{51}} \newcommand{\SpendingKeyTestnetLeadByte}{\hexint{B1}} \newcommand{\SpendingKeyTestnetSecondByte}{\hexint{EB}} -\newcommand{\PtoSHAddressTestnetLeadByte}{\hexint{??}} -\newcommand{\PtoSHAddressTestnetSecondByte}{\hexint{??}} -\newcommand{\PtoPKHAddressTestnetLeadByte}{\hexint{??}} -\newcommand{\PtoPKHAddressTestnetSecondByte}{\hexint{??}} +\newcommand{\PtoSHAddressTestnetLeadByte}{\hexint{1B}} +\newcommand{\PtoSHAddressTestnetSecondByte}{\hexint{9A}} +\newcommand{\PtoPKHAddressTestnetLeadByte}{\hexint{1C}} +\newcommand{\PtoPKHAddressTestnetSecondByte}{\hexint{05}} \newcommand{\NotePlaintextLeadByte}{\hexint{00}} \newcommand{\AuthPublic}{\mathsf{a_{pk}}} \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 the address type. In \Zcash two bytes are used. For addresses on the production network, this fixes the first two characters of the - Base58Check encoding to be \ascii{T3} for P2SH addresses, or - \ascii{T1} for P2PKH addresses. (This does \emph{not} imply that a + Base58Check encoding to be \ascii{r3} for P2SH addresses, or + \ascii{r1} for P2PKH addresses. (This does \emph{not} imply that 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 addresses \cite{BIP-32}. \end{pnotes} @@ -2455,7 +2455,7 @@ The raw encoding of a P2PKH address consists of: \nsubsubsection{\Transparent{} Private Keys} \label{transparentkeyencoding} 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} @@ -3627,6 +3627,7 @@ The errors in the proof of Ledger Indistinguishability mentioned in \subparagraph{2016.0-beta-1.8} \begin{itemize} + \item Specify the lead bytes for \transparent P2SH and P2PKH addresses. \item Add a section on which BIPs apply to \Zcash. \item Change the representation type of $\vpubOldField$ and $\vpubNewField$ to \type{uint64\_t}. (This is not a consensus change because the type of