This repository contains a comprehensive toolset for proving computations using the Cairo language. The repository includes a server, an SDK for interacting with the server, a binary cairo-prove
for executing proofs, and helper binaries such as keygen
and register
.
-
Generate Public and Private Keys:
- Start by generating a pair of cryptographic keys (public and private) using an appropriate library or tool. This step ensures secure communication and validation in future steps.
-
Start the Server / Send Public Key to Server Operator:
- Once the keys are generated, the public key is sent to the server or server operator to register and authenticate the user/device/app. This allows the server to verify the authenticity of the data coming from the client.
- The private key remains securely stored on the client side and should never be shared.
-
Use Cairo-Prove Binary or SDK for Proving:
- Use either the Cairo-Prove binary or integrate SDK into your app. These tools will send compiled programs and input to server, which will return job id, which can be fetched, by polling or by using SSE endopint
The Cairo Proving System provides tools to prove and verify computations written in the Cairo language. This repository includes:
- A server that manages and verifies proofs.
- An SDK to interact with the server programmatically.
- A cairo-prove binary that implements the SDK and allows users to perform proofs from the command line.
- Helper binaries like keygen and register to manage keys and registration.
The server is the core of the proving system. It handles proof requests, manages authorization, and verifies proofs.
- Directory:
prover
- Description: The server is built using a modular design, with components handling authentication, proof generation, verification, and a thread pool to manage concurrent tasks.
- Inner README: Server README
The SDK provides a Rust-based interface for interacting with the server. It abstracts the underlying API calls and simplifies the development of client applications.
- Directory:
prover-sdk
- Description: The SDK includes modules for handling access keys, managing errors, and building client requests.
- Inner README: SDK README
The cairo-prove
binary is a command-line tool that leverages the SDK to perform proofs. It’s intended for users who want to interact with the proving system without writing custom code.
- Inner README: Cairo-Prove README
The keygen
binary is a helper tool for generating cryptographic keys required by the server and SDK.
- Inner README: Keygen README
The register
binary is used to register new keys with the server.
- Inner README: Register README
The common library provides shared utilities and data structures used across the various components.
- Directory:
common
- Description: Includes modules for handling prover inputs, requests, and shared models.
Examples demonstrating how to use the tools are provided in the examples
directory. These include:
- Cairo Examples:
examples/cairo
- Cairo 0 Examples:
examples/cairo0
Each example contains necessary inputs and compiled programs to run with the cairo-prove
binary.
Helper scripts are included in the scripts
directory for tasks like running end-to-end tests.
- End-to-End Testing Script:
scripts/e2e_test.sh
To get started with the Cairo Proving System, please refer to the individual READMEs linked above for detailed instructions on building, configuring, and running each component.