Skip to content

Commit 8dc1c20

Browse files
committed
minor corrections and additions
1 parent ef5a5a1 commit 8dc1c20

File tree

9 files changed

+37
-9
lines changed

9 files changed

+37
-9
lines changed

prover/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ You can also jump to following sections from following links:
3232
- Schnorr signature: [Schnorr][crate::docs::schnorr]
3333
- Ad-hoc threshold multi-signature: [ATMS][crate::docs::atms]
3434
- Rescue sponge hash function: [Rescue][crate::docs::rescue]
35-
- I/O specs and encoding: [I/O][crate::docs::encoding_io]
35+
- I/O specs and encoding: [I/O][crate::docs::encoding_io]
36+
- Flow of the functionality: [flow][crate::docs::flow]

prover/docs/docs-ecc.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# ECC Preliminaries
2+
This module includes a brief explanation of the elliptic curve cryptography primitives used in the library.
3+
- [Basic ECC Toolbox][crate::docs::ecc#basic-ecc-toolbox]
4+
- [Twisted Edward's Curve][crate::docs::ecc#twisted-edwards-curve]
5+
- [EdDSA][crate::docs::ecc#eddsa---edwards-curve-digital-signature-algorithm]
6+
- [BLS12-381][crate::docs::ecc#bls12-381]
7+
- [Pairings][crate::docs::ecc#pairing]
8+
- [Jubjub][crate::docs::ecc#jubjub]
9+
210
## Basic ECC Toolbox
311
- $p$: a large prime number.
412
- $\mathbb{F}_p$: Finite field over prime $p$.
@@ -32,7 +40,7 @@ where $a, d \in \mathbb{F}_p$ and non-zero.
3240
$$(x_3, y_3) = \Bigg(\frac{x_1y_2 + y_1x_2}{1 + dx_1x_2y_1y_2}, \frac{y_1y_2 - ax_1x_2}{1 - dx_1x_2y_1y_2}\Bigg).$$
3341

3442

35-
### Edward's Curve Digital Signature Algorithm (EdDSA)
43+
### EdDSA - (Edward's Curve Digital Signature Algorithm)
3644
Let $B$ be the base point of $E_{E, a, d}$ with order $l$ and $H$ be a hash function with $2b-$bit output size where $2^{b-1} > p$.
3745
* $keygen$
3846
* **Input**: Security parameter $\lambda$.

prover/docs/docs-encoding-io.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Encoding and I/O requirements.
22

3+
This module includes the following:
4+
- [Commonly used types and structs][crate::docs::encoding_io#commonly-used-types-and-structs]
5+
- [Functions: I/O][crate::docs::encoding_io#functions-io]
6+
- [Encoding][crate::docs::encoding_io#encoding]
7+
38
# Commonly used types and structs
49
## Type Base
510
Represents an element of the base field $\mathbb{F}_q$ of the Jubjub elliptic curve construction.

prover/docs/intro.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ This section includes the basic primitives of elliptic curve cryptography requir
5757
* Key generation, signing, and verification algorithms of Schnorr signature is given in [here][crate::docs::schnorr].
5858
* **ATMS:**
5959
* We give a brief introduction to [ATMS][crate::docs::atms#atms-ad-hoc-threshold-multi-signatures] and explained the [SNARK-based ATMS with Schnorr setup][crate::docs::atms#snark-based-atms-with-schnorr-setup].
60-
* **Rescue sponge:** [Rescue][crate::docs::rescue]
61-
* **Encoding and I/O:** [Encoding and I/O][crate::docs::encoding_io]
62-
* **Flow:** [Flow][crate::docs::flow]
60+
* **Rescue sponge:** Rescue prime and Sponge function are explained [here][crate::docs::rescue].
61+
* **Encoding and I/O:**
62+
This [section][crate::docs::encoding_io] contains commonly used types and structs in the library, input and output fields of the crucial functions, and encodings of the field elements.
63+
* [Commonly used types and structs][crate::docs::encoding_io#commonly-used-types-and-structs]
64+
* [Functions: I/O][crate::docs::encoding_io#functions-io]
65+
* [Encoding][crate::docs::encoding_io#encoding]
66+
* **Flow:** Here we explained the generic [flow][crate::docs::flow] of the functionality.

prover/src/ecc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Elliptic curve operations.
2+
//!
3+
//! See the [Elliptic curve cryptography documentation][crate::docs::ecc].
24
use std::fmt::Debug;
35

46
use halo2_proofs::{

prover/src/rescue/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Modules for the rescue hash function.
2+
//!
3+
//! See the documentation of [Rescue Hash][crate::docs::rescue].
24
35
mod primitive;
46
mod rescue_counter_mode;

prover/src/signatures/atms.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! ATMS verifier.
22
//!
33
//! We implement a gate that verifies the validity of an ATMS signature given the threshold and public key commitment as Public Inputs.
4+
//!
5+
//! Background for SNARK-based ATMS with Schnorr setup can be found [here][crate::docs::atms].
46
57
#![doc = include_str!("../../docs/signatures/atms/example.md")]
68

prover/src/signatures/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
//! Schnorr-based Ad-hoc Threshold Multi-signature.
1+
//! SNARK-based Ad-hoc Threshold Multi-signature with Schnorr setup.
2+
//!
3+
//! - See the [documentation][crate::docs] for introduction to ATMS.
4+
//! - The flow of the functionality is given [here][crate::docs::flow].
25
36
pub mod atms;
47
pub mod primitive;

prover/src/signatures/schnorr.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ pub type AssignedSchnorrSignature = (AssignedEccPoint, ScalarVar);
2727
/// Type of a Schnorr Signature
2828
///
2929
/// Schnorr signature consists of
30-
/// - An affine point on jubjub curve: [AffinePoint]
31-
/// - A [Scalar] which is an element of the scalar field $\mathbb{F}_r$ of the Jubjub curve.
30+
/// - An affine point on jubjub curve: [AffinePoint][crate::docs::encoding_io#type-affinepoint]
31+
/// - A [Scalar][crate::docs::encoding_io#type-scalar] which is an element of the scalar field $\mathbb{F}_r$ of the Jubjub curve.
3232
pub type SchnorrSig = (AffinePoint, Scalar);
3333

3434
/// Configuration for SchnorrVerifierGate
@@ -315,7 +315,8 @@ impl SchnorrVerifierGate {
315315

316316
/// Assign a schnorr signature
317317
///
318-
/// Assign the [AffinePoint] and [Scalar] of the Schnorr signature
318+
/// Assign the [AffinePoint][crate::docs::encoding_io#type-affinepoint] and
319+
/// [Scalar][crate::docs::encoding_io#type-scalar] of the Schnorr signature
319320
/// to [witness_point][crate::ecc::chip::EccChip::witness_point()]
320321
/// and [witness_scalar_var][crate::ecc::chip::EccChip::witness_scalar_var()] respectively to the `ecc_gate`.
321322
pub fn assign_sig(

0 commit comments

Comments
 (0)