From 4256ae18bd301410f81c8d2466698ea18cf27652 Mon Sep 17 00:00:00 2001 From: MauroFab Date: Tue, 2 Jan 2024 17:03:35 -0300 Subject: [PATCH 1/6] Update readme --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index aeaf745d8..db77dd8b5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,29 @@ # LambdaWorks -From the heights of these towers of fields, forty centuries of mathematics look down on us. The library for kids who wanna learn how to do STARKs, SNARKs and learn other cryptographic stuff too. -
+The library for kids who wanna learn how to do STARKs, SNARKs and learn other cryptographic stuff too. + +> From the heights of these towers of fields, forty centuries of mathematics look down on us. + +This library provides efficient implementation of cryptographic primitives used to build proving systems. Along with it, many backends for proving systems are shipped, and compatibility with different frontends is supported. +
+ + +- [LambdaWorks](#lambdaworks) + - [Documentation](#documentation) + - [List of features](#list-of-features) + - [Main crates](#main-crates) + - [Crypto](#crypto) + - [Examples - mini apps](#examples---mini-apps) + - [Exercises and Challenges](#exercises-and-challenges) + - [Why did we build lambdaworks](#why-did-we-build-lambdaworks) + - [Additional tooling usage](#additional-tooling-usage) + - [Fuzzers](#fuzzers) + - [Documentation building](#documentation-building) + - [📊 Benchmarks](#-benchmarks) + - [📚 References](#-references) + + [![Telegram Chat][tg-badge]][tg-url] [![codecov](https://img.shields.io/codecov/c/github/lambdaclass/lambdaworks)](https://codecov.io/gh/lambdaclass/lambdaworks) @@ -14,6 +35,7 @@ From the heights of these towers of fields, forty centuries of mathematics look ## [Documentation](https://lambdaclass.github.io/lambdaworks) ## List of features + Disclaimer: This list contains cryptographic primitives and mathematical structures that we want to support in Lambdaworks. It can be expanded later to include new primitives. If you find there is a mistake or there has been an update in another library, please let us know. List of symbols: @@ -58,11 +80,19 @@ List of symbols: | Protostar | :x: | | | | | | Protogalaxy | :x: | | | | | +Additionally, provers are compatible with the following frontends and VMs: -Zero-Knowledge and Validity Proofs have gained a lot of attention over the last few years. We strongly believe in this potential and that is why we decided to start working in this challenging ecosystem, where math, cryptography and distributed systems meet. The main barrier in the beginning was not the cryptography or math but the lack of good libraries which are performant and developer friendly. There are some exceptions, though, like gnark or halo2. Some have nice APIs and are easy to work with, but they are not written in Rust, and some are written in Rust but have poor programming and engineering practices. Most of them don't have support for CUDA, Metal and WebGPU or distributed FFT calculation using schedulers like Dask. - -So, we decided to build our library, focusing on performance, with clear documentation and developer-focused. Our core team is a group of passionate people from different backgrounds and different strengths; we think that the whole is greater than just the addition of the parts. We don't want to be a compilation of every research result in the ZK space. We want this to be a library that can be used in production, not just in academic research. We want to offer developers the main building blocks and proof systems so that they can build their applications on top of this library. +| Backend | Frontend | Status | +| Groth16 | Arkworks | :heavy_check_mark: | +| Groth16 | Gnark | :x: | +| Groth16 | Circom | 🏗️ | +| Plonk | Gnark | 🏗️ | +| Plonk | Noir | :x: | +| Stark | Winterfell | :heavy_check_mark: | +| Stark | Miden | :heavy_check_mark: | +| Stark | Cairo | :heavy_check_mark: | +This can be used in a multi prover setting for extra security. Or as a standalone to be used with Rust. ## Main crates @@ -99,9 +129,14 @@ If you use ```Lambdaworks``` libraries in your research projects, please cite th } ``` -### Gadgets +## Why did we build lambdaworks + +Zero-Knowledge and Validity Proofs have gained a lot of attention over the last few years. We strongly believe in this potential and that is why we decided to start working in this challenging ecosystem, where math, cryptography and distributed systems meet. The main barrier in the beginning was not the cryptography or math but the lack of good libraries which are performant and developer friendly. There are some exceptions, though, like gnark or halo2. Some have nice APIs and are easy to work with, but they are not written in Rust, and some are written in Rust but have poor programming and engineering practices. Most of them don't have support for CUDA, Metal and WebGPU or distributed FFT calculation using schedulers like Dask. + +So, we decided to build our library, focusing on performance, with clear documentation and developer-focused. Our core team is a group of passionate people from different backgrounds and different strengths; we think that the whole is greater than just the addition of the parts. We don't want to be a compilation of every research result in the ZK space. We want this to be a library that can be used in production, not just in academic research. We want to offer developers the main building blocks and proof systems so that they can build their applications on top of this library. -## Fuzzers +## Additional tooling usage +### Fuzzers Fuzzers are divided between the ones that use only the CPU, the ones that use Metal, and the ones that use CUDA. @@ -124,7 +159,7 @@ Run a specific fuzzer from the ones contained in **fuzz/fuzz_targets/** folder w make run-fuzzer FUZZER=field_from_hex ``` -## Documentation +### Documentation building To serve the documentation locally, first install both [mdbook](https://rust-lang.github.io/mdBook/guide/installation.html) and the [Katex preprocessor](https://github.com/lzanini/mdbook-katex#getting-started) to render LaTeX, then run From a89e3c55737d817a5302c8520007b9c7312197b2 Mon Sep 17 00:00:00 2001 From: Diego K <43053772+diegokingston@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:28:02 -0300 Subject: [PATCH 2/6] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index db77dd8b5..37f4787fd 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,9 @@ The library for kids who wanna learn how to do STARKs, SNARKs and learn other cr This library provides efficient implementation of cryptographic primitives used to build proving systems. Along with it, many backends for proving systems are shipped, and compatibility with different frontends is supported. +- [Our vision on ZKP](https://blog.lambdaclass.com/transforming-the-future-with-zero-knowledge-proofs-fully-homomorphic-encryption-and-new-distributed-systems-algorithms/) +- [Lambda Crypto Doctrine](https://blog.lambdaclass.com/lambda-crypto-doctrine/) +
@@ -107,6 +110,7 @@ If you are interested in proving Cairo programs, use the Cairo Prover CLI. ### 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) Finite Field crate fully supports no-std with `no-default-features` @@ -117,6 +121,7 @@ Both Math and Crypto support wasm with target `wasm32-unknown-unknown` by defaul ## Exercises and Challenges - [Lambdaworks exercises and challenges](https://github.com/lambdaclass/lambdaworks_exercises/tree/main) +- [Roadmap for Sparkling Water Bootcamp](https://github.com/lambdaclass/sparkling_water_bootcamp/blob/main/README.md) If you use ```Lambdaworks``` libraries in your research projects, please cite them using the following template: @@ -129,13 +134,14 @@ If you use ```Lambdaworks``` libraries in your research projects, please cite th } ``` -## Why did we build lambdaworks +## Why we built Lambdaworks Zero-Knowledge and Validity Proofs have gained a lot of attention over the last few years. We strongly believe in this potential and that is why we decided to start working in this challenging ecosystem, where math, cryptography and distributed systems meet. The main barrier in the beginning was not the cryptography or math but the lack of good libraries which are performant and developer friendly. There are some exceptions, though, like gnark or halo2. Some have nice APIs and are easy to work with, but they are not written in Rust, and some are written in Rust but have poor programming and engineering practices. Most of them don't have support for CUDA, Metal and WebGPU or distributed FFT calculation using schedulers like Dask. So, we decided to build our library, focusing on performance, with clear documentation and developer-focused. Our core team is a group of passionate people from different backgrounds and different strengths; we think that the whole is greater than just the addition of the parts. We don't want to be a compilation of every research result in the ZK space. We want this to be a library that can be used in production, not just in academic research. We want to offer developers the main building blocks and proof systems so that they can build their applications on top of this library. ## Additional tooling usage + ### Fuzzers Fuzzers are divided between the ones that use only the CPU, the ones that use Metal, and the ones that use CUDA. From 3ae18ed15e72e5e910f0a6c78b30d68ddfb86674 Mon Sep 17 00:00:00 2001 From: Diego K <43053772+diegokingston@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:32:39 -0300 Subject: [PATCH 3/6] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37f4787fd..d04939e65 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This library provides efficient implementation of cryptographic primitives used - [Our vision on ZKP](https://blog.lambdaclass.com/transforming-the-future-with-zero-knowledge-proofs-fully-homomorphic-encryption-and-new-distributed-systems-algorithms/) - [Lambda Crypto Doctrine](https://blog.lambdaclass.com/lambda-crypto-doctrine/) +## Table of contents
@@ -95,7 +96,7 @@ Additionally, provers are compatible with the following frontends and VMs: | Stark | Miden | :heavy_check_mark: | | Stark | Cairo | :heavy_check_mark: | -This can be used in a multi prover setting for extra security. Or as a standalone to be used with Rust. +This can be used in a multi prover setting for extra security, or as a standalone to be used with Rust. ## Main crates From b8e68ea1653df6d0681bb0943e687c87fecc4639 Mon Sep 17 00:00:00 2001 From: Diego K <43053772+diegokingston@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:35:26 -0300 Subject: [PATCH 4/6] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d04939e65..b7e772d62 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,8 @@ List of symbols: | BLS12-381 | :heavy_check_mark: | :heavy_check_mark: | | | | | BLS12-377 | 🏗️ | :heavy_check_mark: | | :heavy_check_mark: | | | BN-254 | :x: | :heavy_check_mark: | | | | -| Pallas | 🏗️ | :heavy_check_mark: | | | | -| Vesta | 🏗️ | :heavy_check_mark: | | | | +| Pallas | :heavy_check_mark: | :heavy_check_mark: | | | | +| Vesta | :heavy_check_mark: | :heavy_check_mark: | | | | | Bandersnatch | 🏗️ | :heavy_check_mark: | | | | | **STARKs** | **Lambdaworks** | **Arkworks** | **Halo2** | **gnark** | **Constantine** | | STARK Prover | :heavy_check_mark: | :x: | | :x: | | @@ -102,6 +102,7 @@ This can be used in a multi prover setting for extra security, or as a standalon - [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) - [Cairo Prover](https://github.com/lambdaclass/lambdaworks/tree/main/provers/cairo) - [Groth 16](https://github.com/lambdaclass/lambdaworks/tree/main/provers/groth16) From 1c95b3c9a5fdeeac3aeff1fb1ccbab62dc6aa8b0 Mon Sep 17 00:00:00 2001 From: Diego K <43053772+diegokingston@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:36:53 -0300 Subject: [PATCH 5/6] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b7e772d62..3804fa51c 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ List of symbols: Additionally, provers are compatible with the following frontends and VMs: | Backend | Frontend | Status | +|---------|----------|--------| | Groth16 | Arkworks | :heavy_check_mark: | | Groth16 | Gnark | :x: | | Groth16 | Circom | 🏗️ | From 05aa62b5f1830c5546d04121cb488646525358c8 Mon Sep 17 00:00:00 2001 From: Diego K <43053772+diegokingston@users.noreply.github.com> Date: Tue, 2 Jan 2024 17:38:16 -0300 Subject: [PATCH 6/6] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3804fa51c..3ca089854 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,8 @@ Both Math and Crypto support wasm with target `wasm32-unknown-unknown` by defaul - [Lambdaworks exercises and challenges](https://github.com/lambdaclass/lambdaworks_exercises/tree/main) - [Roadmap for Sparkling Water Bootcamp](https://github.com/lambdaclass/sparkling_water_bootcamp/blob/main/README.md) +## Citing Lambdaworks + If you use ```Lambdaworks``` libraries in your research projects, please cite them using the following template: ``` bibtex