|
|
@@ -0,0 +1,32 @@
|
|
|
+# Cryptographic Schemes
|
|
|
+
|
|
|
+## `PoseidonHash` Function
|
|
|
+
|
|
|
+Poseidon is a circuit friendly permutation hash function described in
|
|
|
+the paper GKRRS2019.
|
|
|
+
|
|
|
+| Parameter | Setting |
|
|
|
+|-------------------|--------------------------------|
|
|
|
+| S-box | $x → x⁵$ |
|
|
|
+| Full rounds | 8 |
|
|
|
+| Partial rounds | 56 |
|
|
|
+
|
|
|
+Our usage matches that of the halo2 library. Namely using a sponge configuration
|
|
|
+with addition which defines the function
|
|
|
+$$\textrm{PoseidonHash} : 𝔽ₚ × ⋯ × 𝔽ₚ → 𝔽ₚ$$
|
|
|
+
|
|
|
+## Bulla Commitments
|
|
|
+
|
|
|
+Given an abstract hash function such as [`PoseidonHash`](#poseidonhash-function),
|
|
|
+we use a variant of the commit-and-reveal scheme to define anonymized
|
|
|
+representations of objects on chain. Contracts then operate with these anonymous
|
|
|
+representations which we call bullas.
|
|
|
+
|
|
|
+Let $\textrm{Params} ∈ 𝔽ₚⁿ$ represent object parameters, then we can define
|
|
|
+$$ \textrm{Bulla} : 𝔽ₚⁿ × 𝔽ₚ → 𝔽ₚ $$
|
|
|
+$$ \textrm{Bulla}(\textrm{Params}, r) = \textrm{PoseidonHash}(\textrm{Params}, r) $$
|
|
|
+where $r ∈ 𝔽ₚ$ is a random blinding factor.
|
|
|
+
|
|
|
+Then the bulla (on chain anonymized representation) can be used in contracts
|
|
|
+with ZK proofs to construct statements on $\textrm{Params}$.
|
|
|
+
|