Skip to content

fix links #980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,25 @@ So, we decided to build our library, focusing on performance, with clear documen

## Main crates

- [Math](https://github.com/lambdaclass/lambdaworks/tree/main/math)
- [Crypto primitives](https://github.com/lambdaclass/lambdaworks/tree/main/crypto)
- [STARK Prover](https://github.com/lambdaclass/lambdaworks/tree/main/provers/stark)
- [Plonk Prover](https://github.com/lambdaclass/lambdaworks/tree/main/provers/plonk)
- [Groth 16](https://github.com/lambdaclass/lambdaworks/tree/main/provers/groth16)
- [Math](./crates/math)
- [Crypto primitives](./crates/crypto/)
- [STARK Prover](./crates/provers/stark/)
- [Plonk Prover](./crates/provers/plonk/)
- [Groth 16](./crates/provers/groth16/)

### Crypto

- [Elliptic curves](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve)
- [Multiscalar multiplication](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/msm)
- [Hashes](https://github.com/lambdaclass/lambdaworks/tree/main/crypto/src/hash)
- [Elliptic curves](./crates/math/src/elliptic_curve/)
- [Multiscalar multiplication](./crates/math/src/msm/)
- [Hashes](./crates/crypto/src/hash/)

Most of math and crypto crates supports no-std without allocation with `no-default-features`. A few functions and modules require the `alloc` feature.

Both Math and Crypto support wasm with target `wasm32-unknown-unknown`. To see an example of how to use this to deploy a verifier in a browser, check the Cairo Prover wasm-pack verifier.

## Exercises and Challenges

- [lambdaworks exercises and challenges](https://github.com/lambdaclass/lambdaworks_exercises/tree/main)
- [lambdaworks exercises and challenges](./exercises/)
- [Roadmap for Sparkling Water Bootcamp](https://github.com/lambdaclass/sparkling_water_bootcamp/blob/main/README.md)

## Citing lambdaworks
Expand Down
8 changes: 4 additions & 4 deletions crates/crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lambdaworks-crypto = "0.11.0"
## Structure

This crate contains different cryptographic primitives needed for proof systems. The main elements are:
- [Merkle trees](https://github.com/lambdaclass/lambdaworks/tree/main/crypto/src/merkle_tree)
- [Hash functions](https://github.com/lambdaclass/lambdaworks/tree/main/crypto/src/hash)
- [Fiat Shamir transformation](https://github.com/lambdaclass/lambdaworks/tree/main/crypto/src/fiat_shamir)
- [Polynomial commitment schemes](https://github.com/lambdaclass/lambdaworks/tree/main/crypto/src/commitments)
- [Merkle trees](./src/merkle_tree/)
- [Hash functions](./src/hash/)
- [Fiat Shamir transformation](./src/fiat_shamir/)
- [Polynomial commitment schemes](./src/commitments/)
6 changes: 3 additions & 3 deletions crates/math/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ This crate contains all the relevant mathematical building blocks needed for pro
- [Finite Fields](./src/field/README.md)
- [Elliptic curves](./src/elliptic_curve/README.md)
- [Polynomials - univariate and multivariate](./src/polynomial/README.md)
- [Large unsigned integers](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/unsigned_integer)
- [Fast Fourier Transform](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/fft)
- [Optimized Multiscalar Multiplication](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/msm)
- [Large unsigned integers](./src/unsigned_integer/)
- [Fast Fourier Transform](./src/fft/README.md)
- [Optimized Multiscalar Multiplication](./src/msm/)
28 changes: 14 additions & 14 deletions crates/math/src/elliptic_curve/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Elliptic curves

This folder contains the different elliptic curve models currently supported by lambdaworks. For an overview of the curve models, their addition formulas and coordinate systems, see [Hyperelliptic](https://hyperelliptic.org/EFD/g1p/index.html). The models currently supported are:
- [Short Weierstrass](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/short_weierstrass)
- [Twisted Edwards](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/edwards)
- [Montgomery](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/montgomery)
- [Short Weierstrass](./short_weierstrass/)
- [Twisted Edwards](./edwards/)
- [Montgomery](./montgomery/)

Each of the curve models can have one or more coordinate systems, such as homogeneous projective, Jacobian, XZ coordinates, etc. These are used for reasons of performance. It is possible to define an operation, $\oplus$, taking two points over an elliptic curve, $E$ and obtain a third one, such that $(E, \oplus)$ is a group.

Expand All @@ -12,28 +12,28 @@ This part makes use of lambdaworks finite fields. If you are unfamiliar with it
## Short Weierstrass

The following curves are currently supported:
- [BLS12-377](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/short_weierstrass/curves/bls12_377), a pairing-friendly elliptic curve (pairing implementation pending).
- [BLS12-381](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/short_weierstrass/curves/bls12_381), a pairing-friendly elliptic curve.
- [BN-254](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/short_weierstrass/curves/bn_254), a pairing-friendly elliptic curve. Used on Ethereum.
- [Grumpkin](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/short_weierstrass/curves/grumpkin), an elliptic curve that forms a two-cycle with BN-254. This means that the base field for Grumpkin (where the coordinates $x,y$ live) is the scalar field of BN-254 (the field with order equal to the order of the group of the elliptic curve), and the scalar field for Grumpkin is the base field of BN-254.
- [Pallas](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/short_weierstrass/curves/pallas), useful for recursive SNARKs when used with Vesta.
- [Vesta](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/short_weierstrass/curves/vesta), useful for recursive SNARKs when used with Pallas.
- [Starknet's curve](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/short_weierstrass/curves/stark_curve.rs)
- [BLS12-377](./short_weierstrass/curves/bls12_377/), a pairing-friendly elliptic curve (pairing implementation pending).
- [BLS12-381](./short_weierstrass/curves/bls12_381/), a pairing-friendly elliptic curve.
- [BN-254](./short_weierstrass/curves/bn_254/), a pairing-friendly elliptic curve. Used on Ethereum.
- [Grumpkin](./short_weierstrass/curves/grumpkin/), an elliptic curve that forms a two-cycle with BN-254. This means that the base field for Grumpkin (where the coordinates $x,y$ live) is the scalar field of BN-254 (the field with order equal to the order of the group of the elliptic curve), and the scalar field for Grumpkin is the base field of BN-254.
- [Pallas](./short_weierstrass/curves/pallas/), useful for recursive SNARKs when used with Vesta.
- [Vesta](./short_weierstrass/curves/vesta/), useful for recursive SNARKs when used with Pallas.
- [Starknet's curve](./short_weierstrass/curves/stark_curve.rs)
- [secp256k1](./short_weierstrass/curves/secp256k1/curve.rs): Bitcoin's curve. The implementation is not constant time, so it cannot be used to sign messages!
- [secq256k1](./short_weierstrass/curves/secq256k1/curve.rs): It has the same curve equation as secp256k1, a different generator and their order r and the modulus p are swapped. It uses ```secp256k1_scalarfield``` as a base field, which has modulus r.
- [secp256r1](./short_weierstrass/curves/secp256r1/curve.rs): Used for digital signatures, also known as: P-256 and prime256v1.

## Twisted Edwards

The following curves are currently supported:
- [Ed448Goldilocks](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/edwards/curves/ed448_goldilocks.rs)
- [Bandersnatch](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/elliptic_curve/edwards/curves/bandersnatch)
- [TinyJubJub](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/edwards/curves/tiny_jub_jub.rs), only for learning purposes.
- [Ed448Goldilocks](./edwards/curves/ed448_goldilocks.rs)
- [Bandersnatch](./edwards/curves/bandersnatch/)
- [TinyJubJub](./edwards/curves/tiny_jub_jub.rs), only for learning purposes.

## Montgomery

The following curves are currently supported:
- [TinyJubJub](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/montgomery/curves/tiny_jub_jub.rs), only for learning purposes.
- [TinyJubJub](./montgomery/curves/tiny_jub_jub.rs), only for learning purposes.

## Implementing Elliptic Curves in lambdaworks

Expand Down
2 changes: 1 addition & 1 deletion crates/math/src/fft/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Since the main applications of the FFT are related to polynomial evaluation and
- `interpolate_fft`
- `interpolate_offset_fft`

These functions can be used with [univariate polynomials](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/polynomial). To use the functions,
These functions can be used with [univariate polynomials](./README.md). To use the functions,
```rust
let p_1 = Polynomial::new(&[FE::new(3), FE::new(4), FE::new(5) FE::new(6)]);
let evaluations = Polynomial::evaluate_offset_fft(p_1, 4, 4, FE::new(3))?;
Expand Down
26 changes: 13 additions & 13 deletions crates/math/src/field/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# lambdaworks Fields

This folder contains the different field backends, including field extensions. To learn how to use our fields, see the [examples](https://github.com/lambdaclass/lambdaworks/blob/main/examples/README.md) under basic use of finite fields. Below we give a list of currently supported fields; if yours is not on the list, you can add it by implementing the traits and providing the constants.
- [Stark-252](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/fft_friendly/stark_252_prime_field.rs): the field currently used by Starknet and STARK Platinum prover. FFT-friendly.
- [Mini-Goldilocks](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/fft_friendly/u64_goldilocks.rs), also known as oxfoi prime ($2^{64} - 2^{32} + 1$). FFT-friendly.
- [Pallas base field](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/pallas_field.rs): this is also the scalar field of the Vesta elliptic curve.
- [Vesta base field](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/vesta_field.rs): this is also the scalar field of the Pallas elliptic curve.
- [Goldilocks-448](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/p448_goldilocks_prime_field.rs)
- [Mersenne-31](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/mersenne31/field.rs): $2^{31} - 1$ and its [quadratic extension](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/mersenne31/extension.rs)
- [Baby Bear](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/fft_friendly/babybear.rs) and its [quadratic extension](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/field/fields/fft_friendly/quadratic_babybear.rs): FFT-friendly, $2^{31} - 2^{27} + 1$.
- [Scalar field of BN-254](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/short_weierstrass/curves/bn_254/default_types.rs), and its quadratic extension, quartic, sextic and twelth degree extensions. This coincides with the base field of [Grumpkin](../elliptic_curve/short_weierstrass/curves/grumpkin/curve.rs)
- [Base field of BN-254](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/short_weierstrass/curves/bn_254/field_extension.rs) and its quadratic extension. The base field coincides with the scalar field of [Grumpkin](../elliptic_curve/short_weierstrass/curves/grumpkin/curve.rs)
- [Scalar field of BLS12-381](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/short_weierstrass/curves/bls12_381/default_types.rs), and its quadratic, sextic and twelth degree extensions. FFT-friendly.
- [Base field of BLS12-381](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/short_weierstrass/curves/bls12_381/field_extension.rs)
- [Scalar field of BLS12-377](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/short_weierstrass/curves/bls12_377/curve.rs)
- [Base field of BLS12-377](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/elliptic_curve/short_weierstrass/curves/bls12_377/field_extension.rs)
- [Stark-252](./fields/fft_friendly/stark_252_prime_field.rs): the field currently used by Starknet and STARK Platinum prover. FFT-friendly.
- [Mini-Goldilocks](./fields/fft_friendly/u64_goldilocks.rs), also known as oxfoi prime ($2^{64} - 2^{32} + 1$). FFT-friendly.
- [Pallas base field](./fields/pallas_field.rs): this is also the scalar field of the Vesta elliptic curve.
- [Vesta base field](./fields/vesta_field.rs): this is also the scalar field of the Pallas elliptic curve.
- [Goldilocks-448](./fields/p448_goldilocks_prime_field.rs)
- [Mersenne-31](./fields/mersenne31/): $2^{31} - 1$ and its [quadratic extension](./fields/mersenne31/extensions.rs)
- [Baby Bear](./fields/fft_friendly/babybear_u32.rs) and its [quadratic extension](./fields/fft_friendly/quadratic_babybear.rs): FFT-friendly, $2^{31} - 2^{27} + 1$.
- [Scalar field of BN-254](../elliptic_curve/short_weierstrass/curves/bn_254/default_types.rs), and its quadratic extension, quartic, sextic and twelth degree extensions. This coincides with the base field of [Grumpkin](../elliptic_curve/short_weierstrass/curves/grumpkin/curve.rs)
- [Base field of BN-254](../elliptic_curve/short_weierstrass/curves/bn_254/field_extension.rs) and its quadratic extension. The base field coincides with the scalar field of [Grumpkin](../elliptic_curve/short_weierstrass/curves/grumpkin/curve.rs)
- [Scalar field of BLS12-381](../elliptic_curve/short_weierstrass/curves/bls12_381/default_types.rs), and its quadratic, sextic and twelth degree extensions. FFT-friendly.
- [Base field of BLS12-381](../elliptic_curve/short_weierstrass/curves/bls12_381/field_extension.rs)
- [Scalar field of BLS12-377](../elliptic_curve/short_weierstrass/curves/bls12_377/curve.rs)
- [Base field of BLS12-377](../elliptic_curve/short_weierstrass/curves/bls12_377/field_extension.rs)
- [Base field of secp256k1](./fields/secp256k1_field.rs): the base field of Bitcoin's elliptic curve.
- [Scalar field of secp256k1](./fields/secp256k1_scalarfield.rs): the scalar field of Bitcoin's elliptic curve.

Expand Down
8 changes: 4 additions & 4 deletions crates/math/src/polynomial/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# lambdaworks Polynomials

Contains all the relevant tools for polynomials. Supports:
- [Univariate polynomials](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/polynomial/mod.rs)
- [Dense Multivariate polynomials](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/polynomial/dense_multilinear_poly.rs) and [Sparse Multilinear polynomials](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/polynomial/sparse_multilinear_poly.rs)
- [Univariate polynomials](./mod.rs)
- [Dense Multivariate polynomials](../polynomial/dense_multilinear_poly.rs) and [Sparse Multilinear polynomials](../polynomial/sparse_multilinear_poly.rs)

lambdaworks's polynomials work over [Finite Fields](https://github.com/lambdaclass/lambdaworks/tree/main/math/src/field).
lambdaworks's polynomials work over [Finite Fields](../field/README.md).

## Univariate polynomials

Expand Down Expand Up @@ -65,4 +65,4 @@ Alternatively, polynomials of degree $n$ can be defined by providing exactly $n
let p = Polynomial::interpolate(&[FE::new(0), FE::new(1)], &[FE::new(2), FE::new(1)]).unwrap();
```

Many polynomial operations can go faster by using the [Fast Fourier Transform](https://github.com/lambdaclass/lambdaworks/blob/main/math/src/fft/polynomial.rs).
Many polynomial operations can go faster by using the [Fast Fourier Transform](../fft/polynomial.rs).
8 changes: 4 additions & 4 deletions crates/provers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Provers allow one party, the prover, to show to other parties, the verifiers, that a given computer program has been executed correctly by means of a cryptographic proof. This proof ideally satisfies the following two properties: it is fast to verify and its size is small (smaller than the size of the witness). All provers have a `prove` function, which takes some description of the program and other input and outputs a proof. There is also a `verify` function which takes the proof and other input and accepts or rejects the proof.

This folder contains the different provers currently supported by lambdaworks:
- [Groth 16](https://github.com/lambdaclass/lambdaworks/tree/main/provers/groth16)
- [Plonk](https://github.com/lambdaclass/lambdaworks/tree/main/provers/plonk)
- [STARKs](https://github.com/lambdaclass/lambdaworks/tree/main/provers/stark)
- [Groth 16](./groth16/)
- [Plonk](./plonk/)
- [STARKs](./stark/)
- [Cairo](https://github.com/lambdaclass/lambdaworks/tree/a591186e6c4dd53301b03b4ddd69369abe99f960/provers/cairo) - This is only for learning purposes and no longer supported. The [docs](../docs/src/starks/) still contain information that could be useful to understand and learn how Cairo works.

The reference papers for each of the provers is given below:
Expand All @@ -22,4 +22,4 @@ Using one prover or another depends on usecase and other desired properties. We

## Using provers

- [Plonk prover](https://github.com/lambdaclass/lambdaworks/blob/main/provers/plonk/README.md)
- [Plonk prover](./plonk/README.md)
Loading