OpenZKP - pure Rust implementations of Zero-Knowledge Proof systems.

Related tags

Cryptography OpenZKP
Overview

OpenZKP

Crates.io CircleCI Codecov

OpenZKP - pure Rust implementations of Zero-Knowledge Proof systems.

Overview

Project current implements

  • 🐺 the Stark protocol (see its readme for details)

and has

  • 🌞 a simple interface (see the example below),
  • 🗜️ succinct proofs,
  • 🏎️ decent performance, and
  • 🌐 webassembly support.

That being said, it also has a number of limitations, it has

  • no high-level language,
  • no comprehensive security audit,
  • no perfect zero-knowledge,
  • hard-coded field and hash function,

and some others, see features and limitations below for details.

Packages

Package Version Description
utils/
criterion-utils Crates.io Criterion helpers to benchmark over size and number of processors.
error-utils Crates.io Assertion like macros for returning Result::Err.
logging-allocator Crates.io Wrapper around the system allocator that logs large allocations.
mmap-vec Crates.io Substitute for Vec that uses file-backed storage.
macros-lib Crates.io Library of procedural macros implemented using proc_macro2
macros-impl Crates.io Implementation crate for proc_macro_hack
macros-decl Crates.io Procedural macros.
algebra/
u256 Crates.io Implementation of 256-bit unsigned integers.
primefield Crates.io A 251-bit prime field suitable for FFTs.
elliptic-curve Crates.io An elliptic curve over the primefield.
crypto/
elliptic-curve-crypto Crates.io Pedersen commitments and digital signatures.
hash Crates.io Hash primitive used in zkp-stark.
merkle-tree Crates.io Merkle tree based vector commitment.
stark Crates.io STARK protocol implementation

Example

Example from the stark package:

use zkp_stark::{*, primefield::*};

struct FibonacciClaim {
    index: usize,
    value: FieldElement,
}

impl Verifiable for FibonacciClaim {
    fn constraints(&self) -> Constraints {
        use RationalExpression::*;

        // Seed
        let mut seed = self.index.to_be_bytes().to_vec();
        seed.extend_from_slice(&self.value.as_montgomery().to_bytes_be());

        // Constraint repetitions
        let trace_length = self.index.next_power_of_two();
        let g = Constant(FieldElement::root(trace_length).unwrap());
        let on_row = |index| (X - g.pow(index)).inv();
        let every_row = || (X - g.pow(trace_length - 1)) / (X.pow(trace_length) - 1.into());

        let mut c = Constraints::from_expressions((trace_length, 2), seed, vec![
            (Trace(0, 1) - Trace(1, 0)) * every_row(),
            (Trace(1, 1) - Trace(0, 0) - Trace(1, 0)) * every_row(),
            (Trace(0, 0) - 1.into()) * on_row(0),
            (Trace(0, 0) - (&self.value).into()) * on_row(self.index),
        ])
        .unwrap()
    }
}

impl Provable<&FieldElement> for FibonacciClaim {
    fn trace(&self, witness: &FieldElement) -> TraceTable {
        let trace_length = self.index.next_power_of_two();
        let mut trace = TraceTable::new(trace_length, 2);
        trace[(0, 0)] = 1.into();
        trace[(0, 1)] = witness.clone();
        for i in 0..(trace_length - 1) {
            trace[(i + 1, 0)] = trace[(i, 1)].clone();
            trace[(i + 1, 1)] = &trace[(i, 0)] + &trace[(i, 1)];
        }
        trace
    }
}

pub fn main() {
    let claim = FibonacciClaim {
        index: 5000,
        value: FieldElement::from_hex_str("069673d708ad3174714a2c27ffdb56f9b3bfb38c1ea062e070c3ace63e9e26eb"),
    };
    let secret = FieldElement::from(42);
    let proof = claim.prove(&secret).unwrap();
    claim.verify(&proof).unwrap();
}

Features and Limitations

Features

A simple interface. The public interface is simple and is considered semver-stable. Future versions are expected to add functionality without breaking this interface.

Succinct proofs. For a given security parameter, the proof size is close to minimal. Significant improvements here would require innovations in the way constraint systems are designed or in the underlying cryptography.

Decent performance. All steps of the proof are using asymptotically optimal algorithms and all of the major steps are multi-threaded. There are no hard memory requirements. We can expect a good amount of performance improvements by fine-tuning, but we don't expect orders of magnitude improvements.

Webassembly support. The verifier can be used in a WebAssembly environment without the Rust std lib. The prover will work too, but has not been a priority.

Limitations

No high-level language. Constraints are specified using their algebraic expressions. This requires complicated and careful design from the library user and is easy to do wrong, leading to insecure systems. A high level language would help make development simpler and safer and facilitate re-use of components.

No comprehensive security audit. While development is done with the best security practices in mind, it is still very early stage and has not had the amount of expert peer review required for a production grade system.

No perfect zero-knowledge. The current implementation provides succinct proofs but not perfect zero knowledge. While non-trivial, it is theoretically possible to learn something about the secret. Achieving perfect zero-knowledge is possible and can be implemented.

No side-channel resistance. The implementation favours performance over side-channel resistance. While this is common in zero-knowledge proof system, you should be aware that his might leak intermediate computations. Side-channel resistance can be implemented.

Hard-coded field and hash. The current implementation uses a particular prime field and a particular hash function. These are optimized for verification in the Ethereum Virtual Machine. This can be generalized to other primitives optimized for other use cases.

Contributing

See our Contributing guideline and Code of conduct.

See CircleCI documentation on how to run tests locally.

References

Resource overviews on Zero Knowledge Proof protoocols:

Resources on numeric and cryptographic algorithm implementation:

  • Alfred J. Menezes, Paul C. van Oorschot and Scott A. Vanstone (2001). "Handbook of Applied Cryptography". Available online
  • Donald Knuth (1968-). "The art of computer programming". In particular part II: Seminumerical algorithms.
Comments
  • How to run the examples

    How to run the examples

    Congratulations on this repo!

    I'm very excited and try to check out but the followings does not work for me. It does not finish and I have to stop it.

    cargo run --example large_fib
    
    opened by mikedoan 5
  • Make the Eth verifier suitable for importing

    Make the Eth verifier suitable for importing

    • [ ] Tag the PR with wip while in development.
    • [ ] Assign yourself as to the PR
    • [ ] Assign relevant labels such as bug, enhancement.
    • [ ] Request reviews if the PR is large, complex or you would like an extra pair of eyes to go over it.
    • [ ] Add tests to cover changes as needed.
    • [ ] Update documentation as needed.
    • [ ] Add new entries to the Changelog.md.
    • [ ] Update version numbers as needed.

    Semver: https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md

    https://semver.org/

    opened by recmo 1
  • Optimize merkle verification

    Optimize merkle verification

    • [ ] Tag the PR with wip while in development.
    • [ ] Assign yourself as to the PR
    • [ ] Assign relevant labels such as bug, enhancement.
    • [ ] Request reviews if the PR is large, complex or you would like an extra pair of eyes to go over it.
    • [ ] Add tests to cover changes as needed.
    • [ ] Update documentation as needed.
    • [ ] Add new entries to the Changelog.md.
    • [ ] Update version numbers as needed.

    Semver: https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md

    https://semver.org/

    opened by recmo 1
  • Simplify Field abstraction

    Simplify Field abstraction

    • [ ] Tag the PR with wip while in development.
    • [ ] Assign yourself as to the PR
    • [ ] Assign relevant labels such as bug, enhancement.
    • [ ] Request reviews if the PR is large, complex or you would like an extra pair of eyes to go over it.
    • [ ] Add tests to cover changes as needed.
    • [ ] Update documentation as needed.
    • [ ] Add new entries to the Changelog.md.
    • [ ] Update version numbers as needed.

    Semver: https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md

    https://semver.org/

    enhancement wip on hold 
    opened by recmo 1
  • run

    run "cargo test" gave compile error

    Hi, Remco, I am able to build the projects as well as running the examples. But when I used "cargo test", it gave me a bunch of errors including "unresolved import quickcheck" etc. I checked the toml file, quickcheck is specified in dependency field. I am missing something here? Thanks!

    opened by chaosma 1
  •  Harmonize fib_proof_test and fib_test_1024_python_witness

    Harmonize fib_proof_test and fib_test_1024_python_witness

    Previously, these two tests, which have the same public and private inputs, resulted in differenct final coin digests because fib_proof_test pulled an extra random element. Now they have the same ending proof digest.

    opened by z2trillion 1
  • Build without warnings

    Build without warnings

    build finishes without warnings. Previously, they were warning: unused import: crate::u256h warning: unused import: hex_literal::* warning: cannot borrow proof as mutable because it is also borrowed as immutable warning[E0502]: cannot borrow res as immutable because it is also borrowed as mutable

    opened by z2trillion 1
  • What Is The Difference Between MiMC_hash, MiMC_quadratic and MiMC_cubic in the Stark/examples?

    What Is The Difference Between MiMC_hash, MiMC_quadratic and MiMC_cubic in the Stark/examples?

    Hello,

    I was wondering what the difference between all three (and also MiMC_tree) under OpenZKP/crypto/stark/examples/... is. Could you give some information on this?

    opened by AtropineTears 0
  • Fix serde error

    Fix serde error

    • [ ] Tag the PR with wip while in development.
    • [ ] Assign yourself as to the PR
    • [ ] Assign relevant labels such as bug, enhancement.
    • [ ] Request reviews if the PR is large, complex or you would like an extra pair of eyes to go over it.
    • [ ] Add tests to cover changes as needed.
    • [ ] Update documentation as needed.
    • [ ] Add new entries to the Changelog.md.
    • [ ] Update version numbers as needed.

    Semver: https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md

    https://semver.org/

    opened by recmo 0
  • Annotate the incompatible forbid lint in algebra

    Annotate the incompatible forbid lint in algebra

    • [ ] Tag the PR with wip while in development.
    • [ ] Assign yourself as to the PR
    • [ ] Assign relevant labels such as bug, enhancement.
    • [ ] Request reviews if the PR is large, complex or you would like an extra pair of eyes to go over it.
    • [ ] Add tests to cover changes as needed.
    • [ ] Update documentation as needed.
    • [ ] Add new entries to the Changelog.md.
    • [ ] Update version numbers as needed.

    Semver: https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md

    https://semver.org/


     𝝺 rustc --version
    rustc 1.50.0-nightly (c919f490b 2020-11-17)
     𝝺 cargo build
       Compiling zkp-u256 v0.2.0
    error[E0453]: warn(unsafe_code) incompatible with previous forbid in same scope
      --> /Users/mercury/.cargo/registry/src/github.com-1ecc6299db9ec823/zkp-u256-0.2.0/src/lib.rs:35:5
       |
    6  | #![forbid(unsafe_code)]
       |           ----------- `forbid` level set here
    ...
    35 |     unsafe_code,
       |     ^^^^^^^^^^^
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0453`.
    error: could not compile `zkp-u256`
    
    To learn more, run the command again with --verbose.
    
    opened by clearloop 0
  • Version 0.2.0

    Version 0.2.0

    • [ ] Tag the PR with wip while in development.
    • [ ] Assign yourself as to the PR
    • [ ] Assign relevant labels such as bug, enhancement.
    • [ ] Request reviews if the PR is large, complex or you would like an extra pair of eyes to go over it.
    • [ ] Add tests to cover changes as needed.
    • [ ] Update documentation as needed.
    • [ ] Add new entries to the Changelog.md.
    • [ ] Update version numbers as needed.

    Semver: https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md

    https://semver.org/

    opened by recmo 0
  • Bump express from 4.17.1 to 4.18.2 in /crypto/stark-verifier-ethereum

    Bump express from 4.17.1 to 4.18.2 in /crypto/stark-verifier-ethereum

    Bumps express from 4.17.1 to 4.18.2.

    Release notes

    Sourced from express's releases.

    4.18.2

    4.18.1

    • Fix hanging on large stack of sync routes

    4.18.0

    ... (truncated)

    Changelog

    Sourced from express's changelog.

    4.18.2 / 2022-10-08

    4.18.1 / 2022-04-29

    • Fix hanging on large stack of sync routes

    4.18.0 / 2022-04-25

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2 in /crypto/stark-verifier-ethereum

    Bump decode-uri-component from 0.2.0 to 0.2.2 in /crypto/stark-verifier-ethereum

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump qs from 6.5.2 to 6.5.3 in /crypto/stark-verifier-ethereum

    Bump qs from 6.5.2 to 6.5.3 in /crypto/stark-verifier-ethereum

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge`: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies javascript 
    opened by dependabot[bot] 0
  • Bump ajv from 6.11.0 to 6.12.6 in /crypto/stark-verifier-ethereum

    Bump ajv from 6.11.0 to 6.12.6 in /crypto/stark-verifier-ethereum

    Bumps ajv from 6.11.0 to 6.12.6.

    Release notes

    Sourced from ajv's releases.

    v6.12.6

    Fix performance issue of "url" format.

    v6.12.5

    Fix uri scheme validation (@​ChALkeR). Fix boolean schemas with strictKeywords option (#1270)

    v6.12.4

    Fix: coercion of one-item arrays to scalar that should fail validation (failing example).

    v6.12.3

    Pass schema object to processCode function Option for strictNumbers (@​issacgerges, #1128) Fixed vulnerability related to untrusted schemas (CVE-2020-15366)

    v6.12.2

    Removed post-install script

    v6.12.1

    Docs and dependency updates

    v6.12.0

    Improved hostname validation (@​sambauers, #1143) Option keywords to add custom keywords (@​franciscomorais, #1137) Types fixes (@​boenrobot, @​MattiAstedrone) Docs:

    Commits
    • fe59143 6.12.6
    • d580d3e Merge pull request #1298 from ajv-validator/fix-url
    • fd36389 fix: regular expression for "url" format
    • 490e34c docs: link to v7-beta branch
    • 9cd93a1 docs: note about v7 in readme
    • 877d286 Merge pull request #1262 from b4h0-c4t/refactor-opt-object-type
    • f1c8e45 6.12.5
    • 764035e Merge branch 'ChALkeR-chalker/fix-comma'
    • 3798160 Merge branch 'chalker/fix-comma' of git://github.com/ChALkeR/ajv into ChALkeR...
    • a3c7eba Merge branch 'refactor-opt-object-type' of github.com:b4h0-c4t/ajv into refac...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump pathval from 1.1.0 to 1.1.1 in /crypto/stark-verifier-ethereum

    Bump pathval from 1.1.0 to 1.1.1 in /crypto/stark-verifier-ethereum

    Bumps pathval from 1.1.0 to 1.1.1.

    Release notes

    Sourced from pathval's releases.

    v1.1.1

    Fixes a security issue around prototype pollution.

    Commits
    • db6c3e3 chore: v1.1.1
    • 7859e0e Merge pull request #60 from deleonio/fix/vulnerability-prototype-pollution
    • 49ce1f4 style: correct rule in package.json
    • c77b9d2 fix: prototype pollution vulnerability + working tests
    • 49031e4 chore: remove very old nodejs
    • 57730a9 chore: update deps and tool configuration
    • a123018 Merge pull request #55 from chaijs/remove-lgtm
    • 07eb4a8 Delete MAINTAINERS
    • a0147cd Merge pull request #54 from astorije/patch-1
    • aebb278 Center repo name on README
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by chai, a new releaser for pathval since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • fix small_fib example for indices of 2^x

    fix small_fib example for indices of 2^x

    This PR fixes small_fib example for indices of format 2^x.

    When testing claims with index: 2^x, x >=1, value 1 passes the proof verification. I think the reason is how the trace is constructed.

    Trace length is defined as power of two:

    let trace_length = self.index.next_power_of_two();
    

    But if self.index is already power of two, trace_length == self.index. It can be a bit misleading that next keyword returns greater or equal power of two

    Thus if I change it to

    let trace_length = (self.index + 1).next_power_of_two();
    

    all indices work fine now.

    • [ ] Tag the PR with wip while in development.
    • [ ] Assign yourself as to the PR
    • [ ] Assign relevant labels such as bug, enhancement.
    • [ ] Request reviews if the PR is large, complex or you would like an extra pair of eyes to go over it.
    • [ ] Add tests to cover changes as needed.
    • [ ] Update documentation as needed.
    • [ ] Add new entries to the Changelog.md.
    • [ ] Update version numbers as needed.

    https://semver.org/

    opened by ph4r05 0
Owner
0x
Exchange Infrastructure for the Internet
0x
The Zero Knowledge Whitelist Tool is a powerful utility for managing an address whitelist using Zero-Knowledge (ZK) proofs.

zk_whitelist: A Zero Knowledge Whitelist Tool The Zero Knowledge Whitelist Tool is a powerful utility for managing an address whitelist using Zero-Kno

Nikos Koumbakis 4 Nov 21, 2023
A fast zero-knowledge proof friendly Move language runtime environment.

zkMove Lite zkMove Lite is a lightweight zero-knowledge proof friendly Move language virtual machine. Move bytecode is automatically "compiled" into c

YoungRocks 43 May 20, 2023
Implementation of zero-knowledge proof circuits for Tendermint.

Tendermint X Implementation of zero-knowledge proof circuits for Tendermint. Overview Tendermint X's core contract is TendermintX, which stores the he

Succinct 3 Nov 8, 2023
RISC Zero is a zero-knowledge verifiable general computing platform based on zk-STARKs and the RISC-V microarchitecture.

RISC Zero WARNING: This software is still experimental, we do not recommend it for production use (see Security section). RISC Zero is a zero-knowledg

RISC Zero 653 Jan 3, 2023
Composable proof transcripts for public-coin arguments of knowledge

Merlin: composable proof transcripts for public-coin arguments of knowledge Merlin is a STROBE-based transcript construction for zero-knowledge proofs

dalek cryptography 99 Dec 22, 2022
A Software Development Kit (SDK) for Zero-Knowledge Transactions

Aleo SDK The Aleo SDK is a developer framework to make it simple to create a new account, craft a transaction, and broadcast it to the network. Table

Aleo 270 Jan 5, 2023
Zerocaf: A library built for EC operations in Zero Knowledge.

Dusk-Zerocaf WARNING: WIP Repo. Fast, efficient and bulletproof-friendly cryptographic operations. This repository contains an implementation of the S

Dusk Network 50 Oct 31, 2022
Zero-Knowledge Assembly language and compiler

zkAsm A Zero-Knowledge circuit assembly language, designed to represent Zero-Knowledge circuits in a compressed format, to be stored on blockchains. I

null 1 Dec 30, 2021
Noir is a domain specific language for zero knowledge proofs

The Noir Programming Language Noir is a Domain Specific Language for SNARK proving systems. It has been designed to use any ACIR compatible proving sy

null 404 Jan 1, 2023
Vector OLE and zero-knowledge for Z2k.

Mozzarella Benchmarking Code This repository contains the code developed for the benchmarking experiments in our paper: "Moz $\mathbb{Z}_{2^k}$ arella

null 7 Dec 20, 2022
Safeguard your financial privacy with zero-knowledge proofs.

Spinner The Spinner project (https://spinner.cash) takes a privacy first approach to protect users crypto assets. It is a layer-2 protocol built on th

Spinner 21 Dec 28, 2022
STARK - SNARK recursive zero knowledge proofs, combinaison of the Winterfell library and the Circom language

STARK - SNARK recursive proofs The point of this library is to combine the SNARK and STARK computation arguments of knowledge, namely the Winterfell l

Victor Colomb 68 Dec 5, 2022
Zero Knowledge Light Client Implementation by Zpoken team.

zkp for chain state Prerecusites This project requires using the nightly Rust toolchain, which can be used by default in this way: rustup default nigh

Zpoken 40 Mar 6, 2023
Spartan2: High-speed zero-knowledge SNARKs.

Spartan2: High-speed zero-knowledge SNARKs. Spartan is a high-speed zkSNARK, where a zkSNARK is type cryptographic proof system that enables a prover

Microsoft 7 Jul 28, 2023
Pure-Rust traits and utilities for constant-time cryptographic implementations.

subtle Pure-Rust traits and utilities for constant-time cryptographic implementations. It consists of a Choice type, and a collection of traits using

dalek cryptography 196 Dec 13, 2022
Elliptic-curves - Collection of pure Rust elliptic curve implementations (e.g. P-256, P-384, secp256k1)

RustCrypto: Elliptic Curves General purpose Elliptic Curve Cryptography (ECC) support, including types and traits for representing various elliptic cu

Rust Crypto 386 Dec 27, 2022
Pure Rust implementations of the key-committing (and context-committing) AEADs

kc-aeads Pure Rust implementations of the key-committing (and context-committing) AEADs defined in Bellare and Hoang '22. Crash course on the paper: T

Michael Rosenberg 2 Aug 10, 2022
A prototype implementation of the Host Identity Protocol v2 for bare-metal systems, written in pure-rust.

Host Identity Protocol for bare-metal systems, using Rust I've been evaluating TLS replacements in constrained environments for a while now. Embedded

null 31 Dec 12, 2022
the official Rust and C implementations of the BLAKE3 cryptographic hash function

BLAKE3 is a cryptographic hash function that is: Much faster than MD5, SHA-1, SHA-2, SHA-3, and BLAKE2. Secure, unlike MD5 and SHA-1. And secure again

BLAKE3 team 3.7k Jan 6, 2023