Bläddra i källkod

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

zero 2 år sedan
förälder
incheckning
ccda1a41df
3 ändrade filer med 7 tillägg och 5 borttagningar
  1. 6 4
      doc/src/arch/anonymous_assets.md
  2. BIN
      doc/src/arch/diagram-dkzk.png
  3. 1 1
      doc/src/arch/services.md

+ 6 - 4
doc/src/arch/anonymous_assets.md

@@ -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
 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
 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$
 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.
 double spending. $R$ is the Merkle root. $v$ is the coin's value.
 
 
 Generate a random number $r_V$.
 Generate a random number $r_V$.
 
 
-$$ N = H(x, \rho) $$
-
 Check that the secret key corresponds to a public key:
 Check that the secret key corresponds to a public key:
 
 
 $$ P = xG $$
 $$ P = xG $$
@@ -60,6 +58,10 @@ tree $R$:
 $$ C = H(P, v, \rho, r_C) $$
 $$ C = H(P, v, \rho, r_C) $$
 $$ C \in R $$
 $$ C \in R $$
 
 
+Derive the nullifier:
+
+$$ N = H(x, C) $$
+
 Check that the value commitment is constructed correctly:
 Check that the value commitment is constructed correctly:
 
 
 $$ v > 0 $$
 $$ v > 0 $$
@@ -92,4 +94,4 @@ blinding factor for the amounts.
 
 
 ![](diagram-dkzk.png)
 ![](diagram-dkzk.png)
 
 
-*Note: In the diagram $s$ correspond to the $\rho$*
+*Note: In the diagram $s$ correspond to the $\rho$*

BIN
doc/src/arch/diagram-dkzk.png


+ 1 - 1
doc/src/arch/services.md

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