Giter VIP home page Giter VIP logo

cairo_verifier's Introduction

Cairo Verifier

A STARK Verifier for Cairo programs, written in Rust. For use in the Open Libra Blockchain as a Zero-Knowledge Verification mechanism. Cairo Programs serve as a flexible, robust alternative to manually designing polynomial constraints, which are difficult and can be error-prone.

For a more detailed explanation check out my Medium post.

Based off of STARKWare's Soldity Implementation available at: github/starkware-libs/starkex-contracts/evm-verifier/

Use

Include in your project's cargo.toml:

[dependencies]
cairo-verifier = { git = "https://github.com/patrickbiel01/Cairo_Verifier", branch = "main" }

Call:

use cairo_verifier;

cairo_verifier::verify_proof(
	proof_params, proof, task_meta_data,  cairo_aux_input, cairo_verifier_id
);

verify_proof Definition:

fn verify_proof(
    proof_params: Vec<Uint256>,
    proof: Vec<Uint256>,
    task_meta_data: Vec<Uint256>,
    cairo_aux_input: Vec<Uint256>,
    cairo_verifier_id: Uint256,
)

Note: Uint256 is the num256::uint256::Uint256 crate

Goals:

Currently this verifier only supports Cairo Programs that use Layout 1

  • Implement Layout 0, 2 (Example: layout 0)
    • Change values in memory_map.rs, oods_check.rs, polynomial_contrainsts.rs, stark_params.rs
    • Change all of above to accept multiple layout (Look at 4th element in Cairo Aux Input)

Resources:

Papers

      Cairo Whitepaper
      Scalable, transparent, and post-quantum secure computational integrity
      ethSTARK Documentation

STARKWare Articles

      StarkDEX Deep Dive: the STARK Core Engine
      STARK Math Series
      Using SHARP (Shared Prover)
      Cairo for Blockchain Developers

Vitalik Buterin Articles

      STARKs, Part I: Proofs with Polynomials
      STARKs, Part II: Thank Goodness It's FRI-day
      STARKs, Part 3: Into the Weeds

Misc. Articles

      A Hands-On Tutorial for Zero-Knowledge Proofs Series
      Cryptography Stack Exchange Answer

Ropsten Addresses

      0x2886D2A190f00aA324Ac5BF5a5b90217121D5756
      0xe74999fbc71455462c8143b56797d3bb84c1064b

cairo_verifier's People

Contributors

patrickbiel01 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.