This repository is the official compiler for the Cairo programming language, a Turing-complete language designed for provable computation (zero-knowledge proofs). It compiles Cairo source through a multi-stage pipeline: parsing (via LALRPOP), semantic analysis with type inference and trait resolution, lowering to a control-flow graph with extensive optimizations (CSE, constant folding, inlining, match optimization, gas redeposit), generation of the Sierra intermediate representation (a safe, bounded subset for ZK provability), and final compilation to CASM (Cairo Assembly) for execution on the Cairo VM. The compiler uses the Salsa incremental computation framework for query-based caching and is split into 40+ crates organized by compiler phase (parser, semantic, lowering, sierra-generator, sierra-to-casm, etc.). It also includes a full toolchain for Starknet smart contract development, with plugins for contracts, storage, events, and ABI generation. CLI tools (cairo-compile, cairo-run, sierra-compile, starknet-compile, cairo-test, cairo-format) provide end-to-end functionality. The standard library ('corelib'), written in Cairo, provides fundamental types, collections, hash functions, and Starknet-specific primitives. The codebase demonstrates high craftsmanship with clean abstractions, a generic dataflow analysis framework, deterministic hash map utilities, and a reusable graph algorithm library. It is actively maintained with extensive CI, benchmarks, and a golden-file test infrastructure.
Blitzar is a high-performance C++ library for GPU-accelerated cryptographic zero-knowledge proofs, developed by Space and Time. It provides multi-scalar multiplication (MSM), Pedersen commitments, inner product arguments, sumcheck proofs, and sequential commitments over multiple elliptic curves (Curve25519/Ristretto255, BLS12-381, BN254, Grumpkin). The library supports both CPU and CUDA GPU backends, with a stable C API and Rust bindings (blitzar-sys). It is designed for use in Space and Time's Proof of SQL, enabling analytic queries on large datasets with sub-second proof generation. The codebase is well-structured with extensive unit tests, benchmarks, and a Bazel/Nix build system. It incorporates optimized algorithms (Pippenger, bucket methods) and low-level field/curve arithmetic adopted from libsodium and zkcrypto, demonstrating strong engineering craftsmanship in GPU cryptography.
This repository is a comprehensive specification and documentation set for the OpenDID (Open Decentralized Identity) framework. It defines standards, protocols, and data models for a decentralized identity system based on W3C DID and VC specifications, with extensions for zero-knowledge proofs. The repository contains no executable code but provides detailed specifications through Markdown documents, GraphML diagrams, PlantUML sequence diagrams, and the OpenDID Schema Definition Language (OSD). It covers the full lifecycle of decentralized identities including DID document management, verifiable credential issuance and presentation, zero-knowledge proof-based verification, wallet management, and secure communication protocols between system components.
Themis is a cross-platform cryptographic library developed by Cossack Labs, providing high-level security primitives such as Secure Cell (symmetric encryption with three modes: Seal, Token Protect, Context Imprint), Secure Message (asymmetric encryption and digital signing), Secure Session (mutual authentication and key exchange), Secure Comparator (zero-knowledge password comparison), and key generation (EC, RSA, symmetric). The core is implemented in C with a cryptographic engine abstraction layer (Soter) that supports OpenSSL, BoringSSL, and a custom Ed25519 implementation. The library exposes consistent APIs across 13+ language wrappers including Python, Go, Rust, Java, Swift, Objective-C, JavaScript (Node.js and WebAssembly), PHP, Ruby, C++, and React Native. The codebase is well-structured with extensive unit, integration, and fuzz testing, CI/CD pipelines for each wrapper, and cross-language compatibility tests. While the repository has deprecated older APIs and maintains multiple backends, it remains actively maintained with regular releases, security patches, and community engagement.
dsperse is a distributed Zero-Knowledge Machine Learning (zkML) toolkit that decomposes ONNX neural network models into circuit-compatible segments for verifiable AI inference. The core Rust library provides model slicing, circuit compilation (using JSTprove backend), witness generation, and proof verification. It exposes both a CLI interface and Python bindings via PyO3/Maturin for integration into ML pipelines. The architecture follows a clear separation: the slicer module handles ONNX graph decomposition and tiling strategies (channel split, dimension split, spatial tiling), the pipeline orchestrates execution with memory-efficient tensor caching, and the backend trait enables pluggable ZK proving systems. Content-addressed storage with SHA256 hashing ensures artifact integrity across distributed execution. Notable constraints: the license explicitly restricts operational use without written permission from the IP owner, and the codebase relies on nightly Rust toolchain with specific git dependencies (tract-onnx, jstprove_circuits) that create version coupling risks. Security advisories are partially ignored in the audit configuration.
This is the original zkSync L2 scaling monorepo (zkSync Lite), implementing a ZK-rollup on Ethereum with low-gas ETH/ERC20 transfers, plus NFTs, swaps, and forced exits. The code is primarily a Rust backend with multiple binaries and services: the core state-keeper/committer (`zksync_core`), REST/JSON-RPC/Web3 API server (`zksync_api`), PLONK prover and witness generator, Ethereum transaction sender, event listener, data-restore tool, and exit-tree generator. It also contains Solidity smart contracts, JavaScript/Rust SDKs, a TypeScript integration test suite, and a large PostgreSQL storage layer with Diesel migrations. In production, the system receives L1 deposits and L2 transactions, validates them in a mempool, builds pending blocks in the state keeper, generates witnesses and proofs, and commits/verifies/executes blocks on Ethereum. The API exposes account, transaction, fee, and NFT endpoints, with WebSocket event notifications. The main external dependencies are Ethereum (via web3/ethabi), PostgreSQL, CoinGecko/CoinMarketCap price feeds, and custom `franklin_crypto`/`rescue`/`jubjub` zero-knowledge circuit libraries. The project is now in a deprecation/sunset phase: zkSync Lite is no longer the active product, and the `exit_tree_generator`/exit-tool paths exist primarily to help users withdraw funds. Architecturally, the monorepo is modular and contains several well-isolated patterns worth studying: a generic `Balancer` for channel-based load distribution, an async shared LRU cache, and generic serde wrappers for hex/BigUint/ratio serialization. These components demonstrate solid Rust engineering, but the repository also carries substantial legacy weight: multiple contract and schema versions, ignored tests, hardcoded development keys, old dependency versions, deprecated testnets, and a custom crypto fork. It is best treated as a reference for the original zkSync architecture or as a base for maintaining a sunset service, not as a codebase to absorb as a whole.