doc/book: fix nullifier derivation N = H(x, C)

This commit is contained in:
zero
2024-04-10 09:45:14 +02:00
parent 9ff7bc4658
commit ccda1a41df
3 changed files with 7 additions and 5 deletions

View File

@@ -43,13 +43,11 @@ Reveal $C$ and $V$ commitments. Add $C$ to the Merkle tree.
When we spend the coin, we must ensure that the value of the coin
cannot be double spent. We call this the *Burn* phase. The process
relies on a $N$ nullifier, which we create using the secret key $x$
for the public key $P$ and the secret serial $\rho$. Nullifiers are unique per coin and prevent
for the public key $P$ and the coin itself $C$. Nullifiers are unique per coin and prevent
double spending. $R$ is the Merkle root. $v$ is the coin's value.
Generate a random number $r_V$.
$$ N = H(x, \rho) $$
Check that the secret key corresponds to a public key:
$$ P = xG $$
@@ -60,6 +58,10 @@ tree $R$:
$$ C = H(P, v, \rho, r_C) $$
$$ C \in R $$
Derive the nullifier:
$$ N = H(x, C) $$
Check that the value commitment is constructed correctly:
$$ v > 0 $$
@@ -92,4 +94,4 @@ blinding factor for the amounts.
![](diagram-dkzk.png)
*Note: In the diagram $s$ correspond to the $\rho$*
*Note: In the diagram $s$ correspond to the $\rho$*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 123 KiB

View File

@@ -133,7 +133,7 @@ impl Parent {
// ...
});
self_.child.p2p.init(self_.clone());
self_.child.parent.init(self_.clone());
// ...
self_
}