Systems in Rust
ix
A key exchange protocol \(P\) is a pair of probabilistic machines \((A, B)\) that take turns in sending messages to each other. At the end of the protocol, when both machines terminate, they both obtain the same value \(k\). A protocol transcript \(T_P\) is the sequence of messages exchanged between the parties in one exe- cution of the protocol.
Since \(A\) and \(B\) are probabilistic machines, we obtain a different transcript every time we run the protocol. Formally, the transcript \(T_P\) of protocol \(P\) is a random variable, which is a function of the random bits generated by \(A\) and \(B\). The eavesdropping adversary \(E\) sees the entire transcript \(T_P\) and its goal is to figure out the secret \(k\).
Each owner transfers the coin to the next by digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin
In public-key cryptography, Edwards-curve Digital Signature Algorithm (EdDSA) is a digital signature scheme using a variant of Schnorr signature based on twisted Edwards curves.
An EdDSA signature scheme is a choice.
An EdDSA signature scheme is a choice over:
u
\(n\)s and i
\(n\)’s in Rust are rings
An EdDSA signature scheme is a choice over:
An EdDSA signature scheme is a choice over:
An EdDSA signature scheme is a choice over:
An EdDSA signature scheme is a choice over:
Public key
An EdDSA public key is a curve point \(A \in E(\mathbb{F}_p)\) encoded in \(b\) bits
Signature verification
An EdDSA signature on a message \(M\) by public \(A\) is the (ordered) pair \((R,S)\) encoded in \(2b\) bits, where \(R\) is a curve point \(R \in E(\mathbb{F}_p)\) and \(S\) is non-negative integer less than the size of the large prime \(\ell\). \((R,S)\) must satisfy the following equation (where \(\parallel\) is string concatenation).
\[ 2^c S B = 2^c R + 2^c H(R \parallel A \parallel M) A \]
Private key
An EdDSA private key is a \(b\)-bit string \(k\) which should be chosen uniformly at random. The corresponding public key is \(A = s B\), where \(s = H_{0,\dots,b - 1}(k)\) is the least significant \(b\) bits of \(H(k)\) interpreted as an integer.
Signing
The signature on a message \(M\) is deterministically computed as \((R, S)\) where \(R = r B\) for \(r = H(H_{b,\dots,2b - 1}(k) \parallel M)\), and \[ S \equiv r + H(R \parallel A \parallel M) s \pmod \ell \] This satisfies the verification equation \[ \begin{align} 2^c S B &= 2^c (r + H(R \parallel A \parallel M) s) B \\ &= 2^c r B + 2^c H(R \parallel A \parallel M) s B \\ &= 2^c R + 2^c H(R \parallel A \parallel M) A. \end{align} \]