diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 670680cb..6d0360d8 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -10,6 +10,7 @@ - [The backend structure of a POD]() - [Backend types](./backendtypes.md) - [MerkleTree](./merkletree.md) + - [Signature](./signature.md) - [Deductions](./deductions.md) - [Statements](./statements.md) - [Statements involving compound types and Merkle trees](./merklestatements.md) diff --git a/book/src/signature.md b/book/src/signature.md new file mode 100644 index 00000000..1e7eed74 --- /dev/null +++ b/book/src/signature.md @@ -0,0 +1,41 @@ +# Signature + + +Current signature scheme used is proof-based signatures using Plonky2 proofs, following [https://eprint.iacr.org/2024/1553](https://eprint.iacr.org/2024/1553) and [https://jdodinh.io/assets/files/m-thesis.pdf](https://jdodinh.io/assets/files/m-thesis.pdf). This comes from [Polygon Miden's RPO STARK-based](https://github.com/0xPolygonMiden/crypto/blob/d2a67396053fded90ec72690404c8c7728b98e4e/src/dsa/rpo_stark/signature/mod.rs#L129) signatures. + +In future iterations we may replace it by other signature schemes (either elliptic curve based scheme on a Golilocks-prime friendly curve, or a lattice based scheme). + + + +### generate_params() +$pp$: plonky2 circuit prover params
+$vp$: plonky2 circuit verifier params
+return $(pp, vp)$ + +### keygen() +secret key: $sk \xleftarrow{R} \mathbb{F}^4$
+public key: $pk := H(sk)$ [^1]
+return $(sk, pk)$ + +### sign(pp, sk, m) +$pk := H(sk)$
+$s := H(pk, m)$
+$\pi = plonky2.Prove(pp, sk, pk, m, s)$
+return $(sig:=\pi)$ + +### verify(vp, sig, pk, m) +$\pi = sig$
+$s := H(pk, m)$
+return $plonky2.Verify(vp, \pi, pk, m, s)$ + + +### Plonky2 circuit +private inputs: $(sk)$
+public inputs: $(pk, m, s)$
+$pk \stackrel{!}{=} H(sk)$
+$s \stackrel{!}{=} H(pk, m)$ + + +

+ +[^1]: The [2024/1553 paper](https://eprint.iacr.org/2024/1553) uses $pk:=H(sk||0^4)$ to have as input (to the hash) 8 field elements, to be able to reuse the same instance of the RPO hash as the one they use later in the signature (where it hashes 8 field elements). diff --git a/book/src/signedpod.md b/book/src/signedpod.md index 44e0934b..e32f5418 100644 --- a/book/src/signedpod.md +++ b/book/src/signedpod.md @@ -5,7 +5,7 @@ A SignedPod consists of the following fields: - it can only contain [`ValueOf` statements](./statements.md). - the Signer's public key is one of the key-values in the `kvs`. - `id`: the Root of the `kvs` MerkleTree -- `signature`: a signature over the `id` +- `signature`: a [signature](./signature.md) over the `id` - `signer`: the public key attached to the digital signature `signature` - `type`: the constant `SIGNATURE`