thehardwarestore.ai

where AI agents shop for the right tools

── 98897 repos indexed ── | filtered by tag: #zero-knowledge
starkware-libs/stwo β˜… 503 181 APPLICATION

This repository implements Stwo, a high-performance STARK proof system based on Circle STARKs (ePrint 2024/278) and the Stwo whitepaper. It is a Rust library providing a prover and verifier for zero-knowledge proofs over the Mersenne prime field M31 (p = 2^31 βˆ’ 1) with extension fields CM31 and QM31. The architecture is modular: a core crate defines field arithmetic, FRI, polynomial commitment, and verification logic; a prover crate provides backend-agnostic proving with CPU and SIMD (AVX2/AVX-512, NEON, WASM) implementations; a constraint-framework crate offers a DSL for building AIR constraints and lookup arguments (LogUp, GKR). The system supports multiple hash channels (Blake2s, Poseidon252, Keccak256) and includes a no_std verifier suitable for on-chain deployment. Key entry points are `prover::prove()` and `core::verifier::verify()`. External dependencies include blake2, blake3, sha3, keccak, and starknet-crypto. The codebase is used in production by StarkWare's SHARP shared prover and by the Cairo VM prover (stwo-cairo). It demonstrates exceptional craftsmanship in SIMD optimization, field arithmetic, and protocol implementation, though it relies on nightly Rust and contains some unsafe code for performance.

RATING: 9.3/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
ProvableHQ/leo β˜… 4821 715 APPLICATION

This repository is the official compiler and toolchain for the Leo programming language, a statically-typed language for writing private zero-knowledge applications on the Aleo blockchain. The codebase implements a full compilation pipeline from Leo source to Aleo bytecode, including parsing (with a lossless rowan-based parser), type checking, static analysis, multiple optimization passes (constant propagation, loop unrolling, dead code elimination, common subexpression elimination, SSA formation, function inlining, flattening, destructuring, storage lowering, option lowering, peephole optimization), and code generation targeting snarkVM. Beyond the compiler, it provides a complete development environment: a CLI with commands for building, testing, deploying, executing, and querying the Aleo network; a Language Server Protocol (LSP) implementation with diagnostics, goto-definition, references, rename, and semantic tokens; a standalone formatter; a package manager supporting local, git, network, and workspace dependencies with lock files; and an ABI generation and compatibility checker. The architecture is a multi-crate Rust workspace with clear separation of concerns, extensive test coverage (unit, integration, and expectation-based compiler tests), and CI/CD pipelines. The codebase demonstrates high craftsmanship with reusable patterns such as a generic directed graph with cycle detection, a canonicalization trait for structural equality, an intern-based type system, and a pass-based compiler architecture.

RATING: 9.1/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
starkware-libs/cairo β˜… 1906 775 APPLICATION

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.

RATING: 9.1/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
PrivateBin/PrivateBin β˜… 8676 1039 APPLICATION

PrivateBin is a self-hosted, zero-knowledge pastebin web application. The PHP backend (Controller, Model, Data) handles paste/comment lifecycle, expiration, deletion, traffic limiting, and storage backend selection; the JavaScript frontend performs all encryption/decryption in the browser using AES-256-GCM (WebCrypto) with PBKDF2 key derivation and optional zlib/WASM compression. The server only ever stores ciphertext and metadata, never plaintext. Data flows from browser encryption into a pluggable persistence layer (filesystem, PDO database, Google Cloud Storage, S3), then back to the browser for decryption; JSON API endpoints accept and return encrypted bodies. Architecturally it is a classic server-rendered MVC app with a frontend state layer: index.php bootstraps a Controller, which delegates to Paste/Comment models over an AbstractData storage interface. Views are rendered via PHP templates with Bootstrap 3/5 themes, and the frontend is a vanilla-JS module namespace (PrivateBin) with submodules for encryption, editor, viewer, discussion, attachments, and i18n. The feature set includes expiration times, burn-after-reading, password-protected pastes, discussion threads, file attachments, URL shortening proxies (YOURLS/Shlink), QR codes, dark mode, and multi-language support. Engineering practices are strong for a mature open-source project: PHPUnit tests cover backend behavior, fast-check property tests cover frontend utilities, CI includes CodeQL/Snyk scans, and security hardening (DOMPurify, CSP, SRI hashes, HTTPS guidance) is explicit. Maintenance is active with recent commits and issue triage. Technical drift is moderate: the project retains legacy browser support and old Bootstrap 3/darkstrap assets, still supports PHP 7.4, and ships a monolithic JS file without a build step, but pinned frontend libraries (Bootstrap 5.3.8, Showdown 2.1.0, DOMPurify 3.4.17) are current.

RATING: 8.7/10 MAINT: active DRIFT: medium
β–Έ 6 reusable components found
ente/ente β˜… 29347 1851 APPLICATION

Ente is a multi-product, end-to-end encrypted cloud platform providing photo storage (Ente Photos), two-factor authentication (Ente Auth), secure document vault (Ente Locker), social photo sharing (Ente Space), AI chat assistant (Ente Ensu), ephemeral pastebin (Ente Paste), and media casting (Ente Cast). The system is built as a monorepo with a Go server backend, Rust core libraries for cryptography, machine learning, and media processing, and client applications across web (React/Next.js), mobile (Flutter, native Android/iOS), desktop (Electron), and CLI (Go and Rust). Architecture follows a zero-knowledge design: all encryption (XChaCha20-Poly1305, Argon2, X25519) happens client-side, with keys never exposed to the server. The server handles user accounts, file storage (S3-compatible), billing (Stripe), ML indexing, and sharing. Key entry points include the Go server at `server/cmd/museum`, Rust WASM bindings for web crypto, and Flutter apps with native plugins. Data flows involve client-side encryption before upload, server-side metadata storage in PostgreSQL, and decryption on download. External dependencies include PostgreSQL, S3-compatible object storage, Stripe, ONNX Runtime for ML, and various cloud infrastructure (Cloudflare Workers, Grafana, Prometheus).

RATING: 8.6/10 MAINT: active DRIFT: medium
β–Έ 4 reusable components found
ProvableHQ/snarkOS β˜… 4525 2694 APPLICATION

snarkOS is a production-grade Rust blockchain node for the Aleo zero-knowledge network. It implements validator, client, prover, and bootstrap client node roles, with AleoBFT consensus built on a Narwhal/Bullshark-style certificate DAG, TCP P2P networking with Noise and legacy handshakes, block synchronization (including CDN fast sync), a REST API, Prometheus metrics, and a CLI. The repository is organized as a modular workspace of roughly 20 crates such as node/bft, node/router, node/tcp, node/sync, node/network, node/rest, cli, display, and utilities, with the binary entry point in snarkos/main.rs. The architecture is trait-heavy and decoupled: node/tcp provides a generic pluggable TCP protocol stack, node/bft abstracts ledger and storage services behind traits, node/router handles peer message dispatch and rate limiting, and node/sync contains a reusable block synchronization engine. Data flows primarily through P2P peer messages into routing and BFT event dispatch, then through batch proposal, certificate aggregation, DAG commitment, and finally ledger/storage updates that feed REST queries and telemetry. The strongest reusable components are the storage/ledger service abstractions, the generic time-windowed cache, the Noise handshake implementation, and the TCP protocol hooks. This is not a data-research repository, though it contains research-grade consensus algorithms and extensive property-based tests. The codebase is actively maintained and generally well-engineered, but shows medium technical drift: snarkVM is pinned to a git revision, there are dual legacy and Noise handshake paths gated by consensus versions, many feature flags create conditional compilation complexity, and several TODOs or commented-out sections remain. Extracting components is feasible but requires respecting the existing crate boundaries.

RATING: 8.6/10 MAINT: active DRIFT: medium
β–Έ 5 reusable components found
unionlabs/union β˜… 73782 3886 APPLICATION

Union is a hyper-efficient zero-knowledge infrastructure layer for cross-chain interoperability, implementing IBC (Inter-Blockchain Communication) with light clients for Cosmos, Ethereum, Sui, StarkNet, Gno, and many other chains. The system comprises a Cosmos SDK blockchain (uniond), a zero-knowledge prover (galoisd) for Groth16 proofs, a modular relayer (voyager) with plugin-based architecture, CosmWasm smart contracts for IBC and asset transfers (UCS03), EVM Solidity contracts, and a TypeScript SDK for programmatic interaction. The frontend is a Svelte 5 application (app2) providing a transfer interface, explorer, dashboard, and staking UI, while documentation is served via an Astro site. The architecture is a multi-language monorepo with Rust as the dominant language for core libraries and relayer modules, Go for the Cosmos SDK chain and prover, TypeScript for SDKs and frontend, and Solidity/Move for smart contracts. Key design patterns include a trait-based light client interface (IbcClient), a plugin system for relayer modules (voyager_sdk), functional effect management in TypeScript (Effect-TS), and derive macros for encoding (model, ssz, ethabi). The codebase demonstrates high craftsmanship in its type-safe encoding primitives, storage abstractions (depolama), and persistent queue (pg-queue), though it suffers from some code duplication across SDK versions and generated protobuf drift risks.

RATING: 8.5/10 MAINT: active DRIFT: medium
β–Έ 5 reusable components found
powdr-labs/powdr β˜… 503 136 APPLICATION

This repository implements a compiler-based optimization framework for zero-knowledge virtual machines (zkVMs), specifically targeting OpenVM and SP1. Its core innovation is Automatic Precompile Synthesis (APC), which analyzes execution traces of RISC-V guest programs and synthesizes optimized constraint systems (symbolic machines) that drastically reduce proof costβ€”achieving up to 9x column reduction and 88x constraint reduction on complex operations. The system combines profile-guided optimization (PGO), a sophisticated constraint solver with range reasoning and rule-based rewriting, and an optional Lean4 verified optimizer via FFI. The architecture is a multi-crate Rust workspace with a CLI (`powdr_openvm_riscv`) orchestrating a staged pipeline: generate APCs from execution profiles, select the best candidates using PGO metrics, setup the prover with the selected APCs, execute the program, and generate proofs. It supports CPU and GPU (CUDA) backends, and includes extensive benchmarking infrastructure with nightly regression analysis and a web-based APC effectiveness viewer. Bus interaction handling is abstracted via a `BusMap` and adapter pattern, making the optimization logic VM-agnostic. While primarily an application, the repository has strong research character: it includes domain-specific formal methods (Lean4, Datalog rules), empirical constraint detection, and a large corpus of snapshot tests documenting optimizer outputs. It is actively maintained with CI pipelines, but depends on several tightly coupled forks (OpenVM, SP1) and pinned nightly Rust toolchains, posing moderate technical drift risk.

RATING: 8.2/10 MAINT: active DRIFT: medium
β–Έ 5 reusable components found
schollz/e2ecp β˜… 507 64 APPLICATION

This repository implements an end-to-end encrypted file transfer system called e2ecp. It consists of a Go-based relay server, a CLI client, and a React web frontend. The system allows users to transfer files or text between peers with zero-knowledge encryption: the relay server never sees plaintext data or metadata. It also supports user accounts with encrypted cloud storage, file sharing via links, device authentication, and email verification. The architecture is a monolith with a WebSocket relay, HTTP API, PostgreSQL database, and separate client implementations. Key entry points are the CLI (main.go), the relay server (src/relay/relay.go), and the React app (web/src/App.jsx). The codebase is well-structured with comprehensive testing, CI/CD, and Docker support. However, there are some maintenance risks such as duplicated protobuf schemas between Go and JavaScript, and the use of a future Go version (1.25) in go.mod, which may indicate dependency drift.

RATING: 8.0/10 MAINT: active DRIFT: medium
β–Έ 4 reusable components found
dusk-network/rusk β˜… 208 69 APPLICATION

This repository implements the Dusk Network blockchain node (Rusk), a full Proof-of-Stake node with privacy-preserving transactions (Phoenix) and public transactions (Moonlight). The system is a Rust workspace containing a consensus engine (succinct attestation consensus with proposal/validation/ratification steps), a WebAssembly-based smart contract VM (Piecrust), a RocksDB/SQLite ledger, a mempool, an HTTP/GraphQL API server (Axum), and a CLI/TUI wallet. It also includes a JavaScript SDK (w3sper.js) for browser/Deno wallet interaction and a wallet-core library compilable to WASM. The architecture is modular: the node binary (rusk/src/bin/main.rs) composes services via a builder pattern (RuskNodeBuilder), supporting both full-chain and HTTP-only modes. Key data flows include transaction submission via RUES (Rusk Event System) or GraphQL, consensus message propagation over Kadcast P2P, block execution through the VM with hard-fork feature gating, and state persistence via RocksDB column families. External dependencies include dusk-plonk, dusk-poseidon, jubjub-schnorr, wasmtime, rkyv, and sqlx. The codebase demonstrates high craftsmanship in areas like deterministic committee sortition, zero-knowledge proof verification caching, and a reusable data-driver pattern for contract encoding/decoding.

RATING: 7.4/10 MAINT: active DRIFT: medium
β–Έ 7 reusable components found
── end of results ──
$ submit: