Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

SatoshiVM/SVMZK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVMZK

We describe SVMZK – an efficient NIZK proof toolkit. Given commitments [a], [b], [c], the prover is able to convince the verifier either one of the following relations:

  • Addition: a + b = c;
  • Subtraction: a − b = c;
  • Multiplication: a · b = c;
  • Division: a/b = c;
  • Equality: a = b;
  • Comparison: a ≥ b;

Getting Started

You need to have Rust and Cargo installed on your machine. If you haven't installed Rust, you can do so by following the instructions on the official Rust website.

Build

To build the project without launching it, you can use the following Cargo command:

cargo build --release

Test

To run the tests, do the following:

cargo test

Examples

prove x >= 0

    use SVMZK::{Comparison, ComparisonProofWithPublicParams};
    
    let input = 209348i32;  
    let comm = Comparison::commit(input);

    let proof = Comparison::prove(&comm);

    let res = Comparison::verify(ComparisonProofWithPublicParams {
        proof: proof,
        x: comm.comm.point,
    });
    
    assert_eq!(res,true);

About

An efficient NIZK proof toolkit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages