Skip to content

Exposes to Java, through JNI, the ginger-lib components needed by the Zendoo sidechain SDK.

Notifications You must be signed in to change notification settings

conghieucntt/zendoo-sc-cryptolib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zendoo-sc-cryptolib

zendoo-sc-cryptolib is a Rust crate that exposes to Java, through JNI, the ginger-lib components needed by the Zendoo sidechain SDK.

In particular it exposes interfaces to:

  • handle the finite fields that are the alphabets of the zk Proving Systems
  • call the Poseidon function, a Snark friendly hashing algorithm
  • use a Poseidon-based Merkle Tree (calculate root, verify merkle path, ...)
  • compute and verify Schnorr signatures, handle associated keypairs
  • compute and verify a VRF proof, fetch a VRF output, handle associated keypairs (to support Ouroborous-style PoS sidechain consensus)
  • create and manage Zendoo Sidechain proofs

The library includes also an example of a simple Zendoo sidechain proving circuit that can be used to create proofs for backward transfer certificates. This demo circuit can prove that a given certificate was signed by a minimum number of signers, all belonging to a defined set of approved signers. For more info, pls see the specific document. The circuit is offered as an example to developers, to help them build their own circuits, that will match their sidechain logic and needs.

Please note: the code is in development. No guarantees are provided about its security and functionality

Build guide

The library can be built by using Cargo:

	cargo build

There are a few Rust tests that can be executed still with the usual Cargo command:

	cargo test

Contributing

Contributions are welcomed! Bug fixes and new features can be initiated through GitHub pull requests. To speed the code review process, please adhere to the following guidelines:

  • Follow Horizen repositories' code of conduct
  • Follow Horizen repositories' styling guide
  • Please gpg sign your commits
  • Please make sure you push your pull requests to the development branch

PRs Welcome

License

The code is licensed under the following license:

Unless you explicitly state otherwise, any contribution submitted for inclusion in ginger-lib by you shall be licensed as above, without any additional terms or conditions.

License MIT

About

Exposes to Java, through JNI, the ginger-lib components needed by the Zendoo sidechain SDK.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 62.3%
  • Java 32.9%
  • Shell 3.2%
  • Dockerfile 1.6%