2022-02-14 00:03:06 +01:00
\chapter { Redesigned RSA Protocols}
In order to bring the RSA and \gls { CSBS} protocols closer, this chapter describes a variant of the RSA protocols with the same changes as in the \gls { CSBS} versions (where they can be applied).
\section { Withdraw Protocol}
\begin { figure} [htp]
\begin { equation*}
\resizebox { 1.0\textwidth } { !} { $ \displaystyle
\begin { array} { l c l }
\text { Customer} & & \text { Exchange}
\\ \text { knows:} & & \text { knows:}
\\ \text { reserve keys } w_ s, W_ p & & \text { reserve public key } W_ p
\\ \text { denomination public key } D_ p = e, N & & \text { denomination keys } d_ s, D_ p
\\ & &
\\ \text { generate withdraw secret:}
\\ \omega := randombytes(32)
\\ \text { persist } \langle \omega , D_ p \rangle
\\ \text { derive coin key pair:} & &
\\ c_ s := \text { HKDF} (256, \omega , \text { "cs"} )
\\ C_ p := \text { Ed25519.GetPub} (c_ s)
\\ \text { blind:} & &
\\ b_ s := \text { HKDF} (256, \omega , \text { "b-seed"} )
\\ r := \text { FDH} (b_ s)
\\ m' := \text { FDH} (N, C_ p)*r^ { e} \mod N & &
\\ \text { sign with reserve private key:} & &
\\ \rho _ W := \langle D_ p, m' \rangle & &
\\ \sigma _ W := \text { Ed25519.Sign} (w_ s, \rho _ W) & &
\\ & \xrightarrow [\rule{2.5cm}{0pt}] { \rho = W_ p, \sigma _ W, \rho _ W} &
\\ & & \langle D_ p, m' \rangle := \rho _ W
\\ & & \text { verify if } D_ p \text { is valid}
\\ & & \text { check } \text { Ed25519.Verify} (W_ p, \rho _ W, \sigma _ W)
\\ & & \sigma '_ c = (m')^ { d_ s} \mod N
\\ & & \text { decrease balance if sufficient and}
\\ & & \text { persist } \langle D_ p, s \rangle
\\ & \xleftarrow [\rule{2.5cm}{0pt}] { \sigma '_ c} &
\\ \text { unblind:} & &
\\ \sigma _ c = \sigma '_ c*r^ { -1} & &
\\ \text { verify signature:} & &
\\ \textbf { check if } \sigma _ c^ { e} = \text { FDH} (N, C_ p) & &
\\ & &
\\ \text { resulting coin: } c_ s, C_ p, \sigma _ c, D_ p & &
\\ & &
\\ \text { implementation note: minimum of}
\\ \text { persisted values is } \langle \omega , \sigma _ c \rangle
\end { array} $
}
\end { equation*}
\caption { Redesigned RSA withdrawal process}
\label { fig:withdrawal-process-rsa-redesign}
\end { figure}
The changes to the RSA witdhdraw protocol (see \autoref { fig:withdrawal-process-rsa-redesign} ) are limited to the derivation of the coin and blinding factor.
\section { Refresh Protocol}
The changes to the refresh protocol are related to the derivation of transfer secrets and subsequent operations, see \autoref { fig:refresh-derive-rsa-redesign} , \autoref { fig:refresh-part1-rsa-redesign} and \autoref { fig:refresh-part2-rsa-redesign} .
\begin { figure} [htp]
\centering
\fbox { %
\procedure [codesize=\small] { $ \text { RefreshDerive } ( t, \langle e, N \rangle , C _ p ) $ } { %
T := \text { Curve25519.GetPub} (t) \\
x := \textrm { ECDH-EC} (t, C_ p) \\
b_ s := \text { HKDF} (256, x, \text { "b-seed"} ) \\
r := \text { FDH} (b_ s) \\
c'_ s := \text { HKDF} (256,x,"c") \\
C'_ p := \text { Ed25519.GetPub} (c'_ s) \\
\overline { m} := r^ e * C'_ p \mod N \\
\pcreturn \langle T, c_ s', C_ p', \overline { m} \rangle
}
}
\caption { Redesigned RSA RefreshDerive algorithm}
\label { fig:refresh-derive-rsa-redesign}
\end { figure}
\begin { figure} [htp]
\begin { equation*}
\resizebox { 1.0\textwidth } { !} { $ \displaystyle
\begin { array} { l c l }
% preliminaries
\text { Customer} & & \text { Exchange}
\\ \text { knows:} & & \text { knows:}
\\ \text { denomination public key } D_ { p(i)} & & \text { denomination keys } d_ { s(i)} , D_ { p(i)}
\\ \text { coin} _ 0 = \langle D_ { p(0)} , c_ s^ { (0)} , C_ p^ { (0)} , \sigma _ c^ { (0)} \rangle & &
% refresh request
\\ \text { Select} \langle N_ t, e_ t\rangle := D_ { p(t)} \in D_ { p(i)}
\\ \omega := randombytes(32)
\\ \text { persist } \langle \omega , D_ { p(t)} \rangle
\\ \textbf { for } i = 1, \dots , \kappa : % generate k derives
\\ t_ i := \text { HKDF} (256, \omega ,\text { "t} i \text { "} ) % seed generation
\\ X_ i := \text { RefreshDerive} (t_ i, D_ { p(t)} , C_ p^ { (0)} )
\\ (T_ i, c_ s^ { (i)} , C_ p^ { (i)} , \overline { m} _ i) := X_ i
\\ \textbf { endfor}
\\ h_ T := H(T_ 1, \dots , T_ k)
\\ h_ { \overline { m} } := H(\overline { m} _ 1, \dots , \overline { m} _ k)
\\ h_ C := H(h_ t, h_ { \overline { m} } )
\\ \rho _ { RC} := \langle h_ C, D_ { p(t)} , D_ { p(0)} , C_ p^ { (0)} , \sigma _ C^ { (0)} \rangle
\\ \sigma _ { RC} := \text { Ed25519.Sign} (c_ s^ { (0)} , \rho _ { RC} )
\\ \text { Persist refresh-request} \langle \omega , \rho _ { RC} , \sigma _ { RC} \rangle
\\ & \xrightarrow [\rule{2.5cm}{0pt}] { \rho _ { RC} , \sigma _ { RC} } &
% Exchange checks refresh request
\\ & & (h_ C, D_ { p(t)} , D_ { p(0)} , C_ p^ { (0)} , \sigma _ C^ { (0)} = \rho _ { RC} )
\\ & & \textbf { check} \text { Ed25519.Verify} (C_ p^ { (0)} , \sigma _ { RC} , \rho _ { RC} )
\\ & & x \rightarrow \text { GetOldRefresh} (\rho _ { RC} )
\\ & & \textbf { Comment: } \text { GetOldRefresh} (\rho _ { RC} \mapsto \{ \bot ,\gamma \} )
\\ & & \pcif x = \bot
\\ & & v := \text { Denomination} (D_ { p(t)} )
\\ & & \langle e_ 0, N_ 0 \rangle := D_ { p(0)}
\\ & & \textbf { check } \text { IsOverspending} (C_ p^ { (0)} , D_ { p(0)} , v)
\\ & & \textbf { check } D_ { p(t)} \in \{ D_ { p(i)} \}
\\ & & \textbf { check } \text { FDH} (N_ 0, C_ p^ { (0)} ) \equiv _ { N_ 0} (\sigma _ 0^ { (0)} )^ { e_ 0}
\\ & & \text { MarkFractionalSpend} (C_ p^ { (0)} , v)
\\ & & \gamma \leftarrow \{ 1, \dots , \kappa \}
\\ & & \text { Persist refresh-record } \langle \rho _ { RC} ,\gamma \rangle
\\ & & \pcelse
\\ & & \gamma := x
\\ & & \textbf { endif}
\\ & \xleftarrow [\rule{2.5cm}{0pt}] { \gamma } &
\\
\\
\\ & \textit { Continued in figure \ref { fig:refresh-part2} } &
%\\ \pcintertext[dotted]{(Continued in Figure)}
\end { array} $
}
\end { equation*}
\caption { Redesigned RSA refresh protocol (commit phase)}
\label { fig:refresh-part1-rsa-redesign}
\end { figure}
\begin { figure} [htp]
\begin { equation*}
\resizebox { 1.0\textwidth } { !} { $ \displaystyle
\begin { array} { l c l }
% preliminaries
\text { Customer} & & \text { Exchange}
\\ & \textit { Continuation of figure \ref { fig:refresh-part1} } &
\\
\\
% Check challenge and send challenge response (reveal not selected msgs)
\\ & \xleftarrow [\rule{2.5cm}{0pt}] { \gamma } &
\\ \textbf { check } \text { IsConsistentChallenge} (\rho _ { RC} , \gamma )
\\ \textbf { Comment: } \text { IsConsistentChallenge} \\ (\rho _ { RC} , \gamma ) \mapsto \{ \bot ,\top \}
\\
\\ \text { Persist refresh-challenge} \langle \rho _ { RC} , \gamma \rangle
\\ S := \langle t_ 1, \dots , t_ { \gamma -1} , t_ { \gamma +1} , \dots , t_ \kappa \rangle % all seeds without the gamma seed
\\ \rho _ L = \langle C_ p^ { (0)} , D_ { p(t)} , T_ { \gamma } ,\overline { m} _ \gamma \rangle
\\ \rho _ { RR} = \langle T_ \gamma , \overline { m} _ \gamma , S \rangle
\\ \sigma _ { L} = \text { Ed25519.Sign} (c_ s^ { (0)} , \rho _ { L} )
\\ & \xrightarrow [\rule{2.5cm}{0pt}] { \rho _ { RR} ,\rho _ L, \sigma _ { L} } &
% check revealed msgs and sign coin
\\ & & \langle T'_ \gamma , \overline { m} '_ \gamma , S \rangle := \rho _ { RR}
\\ & & \langle t_ 1, \dots , t_ { \gamma -1} , t_ { \gamma +1} , \dots , t_ \kappa \rangle ) := S
\\ & & \textbf { check } \text { Ed25519.Verify} (C_ p^ { (0)} , \sigma _ L, \rho _ L)
\\ & & \textbf { for} i = 1,\dots , \gamma -1, \gamma +1,\dots , \kappa
\\ & & X_ i := \text { RefreshDerive} (t_ i, D_ { p(t)} , C_ p^ { (0)} )
\\ & & \langle T_ i, c_ s^ { (i)} , C_ p^ { (i)} , \overline { m} _ i \rangle := X_ i
\\ & & \textbf { endfor}
\\ & & h_ T' = H(T_ 1,\dots ,T_ { \gamma -1} ,T'_ { \gamma } ,T_ { \gamma +1} ,\dots ,T_ \kappa )
\\ & & h_ { \overline { m} } ' = H(\overline { m} _ 1,\dots ,\overline { m} _ { \gamma -1} ,\overline { m} '_ { \gamma } ,\overline { m} _ { \gamma +1} ,\dots ,\overline { m} _ \kappa )
\\ & & h_ C' = H(h_ T', h_ { \overline { m} } ')
\\ & & \textbf { check } h_ C = h_ C'
\\ & & \overline { \sigma } _ C^ { (\gamma )} := \overline { m} ^ { d_ { s(t)} }
2022-02-16 21:59:41 +01:00
\\ & & \text { persist } \langle \rho _ L, \sigma _ L, S \rangle
2022-02-14 00:03:06 +01:00
\\ & \xleftarrow [\rule{2.5cm}{0pt}] { \overline { \sigma } _ C^ { (\gamma )} } &
% Check coin signature and persist coin
\\ \sigma _ C^ { (\gamma )} := r^ { -1} \overline { \sigma } _ C^ { (\gamma )}
\\ \textbf { check if } (\sigma _ C^ { (\gamma )} )^ { e_ t} \equiv _ { N_ t} C_ p^ { (\gamma )}
\\ \text { Persist coin} \langle D_ { p(t)} , c_ s^ { (\gamma )} , C_ p^ { (\gamma )} , \sigma _ C^ { (\gamma )} \rangle
\end { array} $
}
\end { equation*}
\caption { Redesigned RSA refresh protocol (reveal phase)}
\label { fig:refresh-part2-rsa-redesign}
\end { figure}
\section { Linking Protocol}
The changes are described in \autoref { fig:refresh-link-rsa-redesign} .
\begin { figure} [htp]
\begin { equation*}
\resizebox { 1.0\textwidth } { !} { $ \displaystyle
\begin { array} { l c l }
% preliminaries
\text { Customer} & & \text { Exchange}
\\ \text { knows:} & & \text { knows:}
\\ \text { coin} _ 0 = \langle D_ { p(0)} , c_ s^ { (0)} , C_ p^ { (0)} , \sigma _ { C} ^ { (0)} \rangle
\\ & \xrightarrow [\rule{2.5cm}{0pt}] { C_ { p(0)} } &
\\ & & L := \text { LookupLink} (C_ { p(0)} )
\\ & & \textbf { Comment: } \text { LookupLink} (C_ p) \mapsto \{ \langle \rho _ L^ { (i)} ,
\\ & & \sigma _ L^ { (i)} , \overline { \sigma } _ C^ { (i)} \rangle \}
\\ & \xleftarrow [\rule{2.5cm}{0pt}] { L} &
\\ \pcfor \langle \rho _ { L} ^ { (i)} , \overline { \sigma } _ L^ { (i)} , \sigma _ C^ { (i)} \rangle \in L
\\ \langle \hat { C} _ p^ { (i)} , D_ { p(t)} ^ { (i)} , T_ \gamma ^ { (i)} , \overline { m} _ \gamma ^ { (i)} \rangle := \rho _ L^ { (i)}
\\ \langle e_ t^ { (i)} , N_ t^ { (i)} \rangle := D_ { p(t)} ^ { (i)}
\\ \textbf { check } \hat { C} _ p^ { (i)} \equiv C_ p^ { (0)}
\\ \textbf { check } \text { Ed25519.Verify} (C_ p^ { (0)} , \rho _ { L} ^ { (i)} , \sigma _ L^ { (i)} )
\\ x_ i := \text { ECDH} (c_ s^ { (0)} , T_ { \gamma } ^ { (i)} )
\\ c_ s^ { (i)} := \text { HKDF} (256,x_ i,"c")
\\ C_ p^ { (i)} := \text { Ed25519.GetPub} (c_ s^ { (i)} )
\\ b_ s^ { (i)} := \text { HKDF} (256, x_ i, \text { "b-seed"} )
\\ r_ i := \text { FDH} (b_ s^ { (i)} )
\\ \sigma _ C^ { (i)} := (r_ i)^ { -1} \cdot \overline { m} _ \gamma ^ { (i)}
\\ \textbf { check } (\sigma _ C^ { (i)} )^ { e_ t^ { (i)} } \equiv _ { N_ t^ { (i)} } C_ p^ { (i)}
\\ \text { (Re-)obtain coin} \langle D_ { p(t)} ^ { (i)} ,c_ s^ { (i)} , C_ p^ { (i)} , \sigma _ C^ { (i)} \rangle
\end { array} $
}
\end { equation*}
\caption { Redesigned RSA linking protocol}
\label { fig:refresh-link-rsa-redesign}
\end { figure}