seemenkina 9cc7a892fe
docs: Enhance README documentation for Zerokit and RLN module
- Improve README.md for main project and RLN module with more comprehensive documentation
- Add badges, overview sections, and detailed usage instructions
- Include important notes about platform compatibility and feature support
- Expand build, test, and circuit compilation instructions
- Update acknowledgements and project structure descriptions
- Provide more detailed code examples and protocol flow explanation
2025-02-20 18:47:51 +07:00
2023-02-28 16:25:18 +05:30

Zerokit

Crates.io GitHub Workflow Status License: MIT License: Apache 2.0

A collection of Zero Knowledge modules written in Rust and designed to be used in other system programming environments.

Overview

Zerokit provides zero-knowledge cryptographic primitives with a focus on performance, security, and usability. The current focus is on Rate-Limiting Nullifier (RLN) implementation.

Features

  • RLN Implementation: Efficient Rate-Limiting Nullifier using zkSNARKs
  • Circom Compatibility: Uses Circom-based circuits for RLN
  • Cross-Platform: Support for multiple architectures (see compatibility note below)
  • FFI-Friendly: Easy to integrate with other languages

Architecture

Zerokit currently focuses on RLN (Rate-Limiting Nullifier) implementation using Circom circuits through ark-circom, providing an alternative to existing native Rust implementations.

Build and Test

IMPORTANT: For WASM support or x32 architecture builds, use version 0.6.1. Current version has dependency issues for these platforms. WASM support will return in a future release.

Install Dependencies

make installdeps

Build and Test All Crates

make build
make test

Release Assets

We use cross-rs to cross-compile and generate release assets:

# Example: Build for specific target
cross build --target x86_64-unknown-linux-gnu --release -p rln

Used By

Zerokit powers zero-knowledge functionality in:

  • nwaku - Nim implementation of the Waku v2 protocol
  • js-rln - JavaScript bindings for RLN

Acknowledgements

  • Inspired by Applied ZKP group work, including zk-kit
  • Uses ark-circom for zkey and Groth16 proof generation
  • Witness calculation based on circom-witnesscalc by iden3. The execution graph file used by this code has been generated by means of the same iden3 software.

[!IMPORTANT]
The circom-witnesscalc code fragments have been borrowed instead of depending on this crate, because its types of input and output data were incompatible with the corresponding zerokit code fragments, and circom-witnesscalc has some dependencies, which are redundant for our purpose.

Documentation

For detailed documentation on each module:

cargo doc --open
Description
A set of Zero Knowledge modules, written in Rust and designed to be used in other system programming environments.
Readme
Languages
Rust 99.8%
Makefile 0.2%