{"id":13809819,"url":"https://github.com/spaceandtimefdn/blitzar-rs","last_synced_at":"2025-06-15T15:38:51.859Z","repository":{"id":193551328,"uuid":"653618927","full_name":"spaceandtimefdn/blitzar-rs","owner":"spaceandtimefdn","description":"High-Level Rust wrapper for the blitzar-sys crate","archived":false,"fork":false,"pushed_at":"2025-06-04T19:35:56.000Z","size":498,"stargazers_count":28,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-04T21:57:45.754Z","etag":null,"topics":["elliptic-curve-cryptography","rust","zk-proofs"],"latest_commit_sha":null,"homepage":"https://www.spaceandtime.io/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spaceandtimefdn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-14T11:54:38.000Z","updated_at":"2025-06-04T15:57:56.000Z","dependencies_parsed_at":"2023-10-14T16:53:02.038Z","dependency_job_id":"c49085ce-a1fe-4ea1-81e4-c3966a0581b4","html_url":"https://github.com/spaceandtimefdn/blitzar-rs","commit_stats":null,"previous_names":["spaceandtimelabs/blitzar-rs","spaceandtimefdn/blitzar-rs"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/spaceandtimefdn/blitzar-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceandtimefdn%2Fblitzar-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceandtimefdn%2Fblitzar-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceandtimefdn%2Fblitzar-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceandtimefdn%2Fblitzar-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spaceandtimefdn","download_url":"https://codeload.github.com/spaceandtimefdn/blitzar-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spaceandtimefdn%2Fblitzar-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259737895,"owners_count":22903869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elliptic-curve-cryptography","rust","zk-proofs"],"created_at":"2024-08-04T02:00:36.800Z","updated_at":"2025-06-15T15:38:51.816Z","avatar_url":"https://github.com/spaceandtimefdn.png","language":"Rust","funding_links":[],"categories":["Frameworks","Web3 and ZKP Framework"],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eBlitzar Crate\u003c/h1\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" width=\"200px\" srcset=\"https://raw.githubusercontent.com/spaceandtimelabs/blitzar-rs/assets/logo_dark_background.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" width=\"200px\" srcset=\"https://raw.githubusercontent.com/spaceandtimelabs/blitzar-rs/assets/logo_light_background.png\"\u003e\n  \u003cimg alt=\"Blitzar\" width=\"200px\" src=\"https://raw.githubusercontent.com/spaceandtimelabs/blitzar-rs/assets/logo_light_background.png\"\u003e\n\u003c/picture\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://twitter.com/intent/follow?screen_name=spaceandtimedb\"\u003e\n    \u003cimg alt=\"Twitter\" src=\"https://img.shields.io/twitter/follow/spaceandtimedb.svg?style=social\u0026label=Follow\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"http://discord.gg/SpaceandTimeDB\"\u003e\n    \u003cimg alt=\"Discord Server\" src=\"https://img.shields.io/discord/953025874154893342?logo=discord\"\u003e\n  \u003c/a\u003e\n  \n  \u003ca href=\"https://github.com/spaceandtimelabs/blitzar-rs/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\"\u003e\n    \u003c/a\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.linux.org/\"\u003e\n    \u003cimg alt=\"OS\" src=\"https://img.shields.io/badge/OS-Linux-blue?logo=linux\"\u003e\n    \u003c/a\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.linux.org/\"\u003e\n    \u003cimg alt=\"CPU\" src=\"https://img.shields.io/badge/CPU-x86-blue\"\u003e\n    \u003c/a\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://www.rust-lang.org/\"\u003e\n    \u003cimg alt=\"Rust\" src=\"https://img.shields.io/badge/rust-1.85-blue\"\u003e\n    \u003c/a\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://developer.nvidia.com/cuda-downloads\"\u003e\n    \u003cimg alt=\"CUDA\" src=\"https://img.shields.io/badge/CUDA-12.6.1-green?style=flat\u0026logo=nvidia\"\u003e\n    \u003c/a\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/spaceandtimelabs/blitzar-rs/actions/workflows/release.yml\"\u003e\n    \u003cimg alt=\"Build State\" src=\"https://github.com/spaceandtimelabs/blitzar-rs/actions/workflows/release.yml/badge.svg\"\u003e\n  \u003c/a\u003e\n\n  \u003cp align=\"center\"\u003e\n    High-Level Rust wrapper for the blitzar-sys crate.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/spaceandtimelabs/blitzar-rs/issues\"\u003eReport Bug\u003c/a\u003e\n    |\n    \u003ca href=\"https://github.com/spaceandtimelabs/blitzar-rs/issues\"\u003eRequest a Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n#### Background\nBlitzar was created by the core cryptography team at [Space and Time](https://www.spaceandtime.io/) to accelerate Proof of SQL, a novel zero-knowledge proof for SQL operations. After surveying our options for a GPU acceleration framework, we realized that Proof of SQL needed something better… so we built Blitzar. Now, Proof of SQL runs with a 3.2 second proving time against a million-row table on a single GPU, and it’s only getting faster.\n\nWe’ve open-sourced Blitzar to provide the Web3 community with a faster and more\nrobust framework for building GPU-accelerated ZK proofs. We’re excited to open\nthe project to community contributions to expand the scope of Blitzar and lay\nthe foundation for the next wave of lightning fast ZK proofs.\n\n#### Overview\nBlitzar-rs is a High-Level rust wrapper for the [blitzar-sys crate](https://github.com/spaceandtimelabs/blitzar/tree/main/rust/blitzar-sys) for accelerating cryptographic zero-knowledge proof algorithms on the CPU and GPU.\n\u003e **Note**\n\u003e This repo contains the high-Level rust wrapper for the blitzar-sys crate. If you are using C++, use the code from the companion repo here: https://github.com/spaceandtimelabs/blitzar.\n\nThe crate provides\n\n* Functions for doing group operations on [Curve-25519](https://en.wikipedia.org/wiki/Curve25519), [Ristretto25519](https://ristretto.group/), [bls12-381 G1](https://electriccoin.co/blog/new-snark-curve/), [bn254 G1](https://hackmd.io/@jpw/bn254) and [Grumpkin](https://hackmd.io/@aztec-network/B19AA8812#Curve-cycles) elements.\n* An implementation of [Inner Product Argument Protocol](https://eprint.iacr.org/2017/1066.pdf) for producing and verifying a compact proof of the inner product of two vectors.\n\n**WARNING**: This project has not undergone a security audit and is NOT ready\nfor production use.\n\n#### Computational Backends\nAlthough the primary goal of this library is to provide GPU acceleration for cryptographic ZK proof algorithms, the library also provides CPU support for the sake of testing. The following backends are supported:\n\n| Backend            | Implementation                                             | Target Hardware             |\n| :---               | :---                                                       | :---                        |\n| `cpu`             | Serial      | x86 capable CPUs |\n| `gpu`             | Parallel   | Nvidia CUDA capable GPUs\n\n\n## Cryptographic Primitives\n\n#### Multi-Scalar Multiplication (MSM) / Generalized Pedersen Commitment / Multiexponentiation\n\nBlitzar provides an implementation of Multi-Scalar Multiplication (i.e. generalized Pedersen commitments). Mathematical details behind MSM are outlined in the [Blitzar Github repository](https://github.com/spaceandtimelabs/blitzar#multi-scalar-multiplication-msm--generalized-pedersen-commitment--multiexponentiation).\n\nNote: we interchangeably use the terms \"multi-scalar multiplication\" and \"multiexponentiation\" to refer to the this operation because when the group is written additively, the operation is a multi-scalar multiplication, and when the group is written multiplicatively, the operation is a multiexponentiation.\n\nThe Blitzar implementation allows for computation of multiple, potentially different length, MSMs simultaneously. Additionally, either built-in, precomputed, generators can be used, or they can be provided as needed.\n\nCurrently, Blitzar supports Curve25519 and bls12-381 G1 as groups. We're always working to expand the curves that we support, so check back for updates.\n\n#### Inner Product Argument\n\nBlitzar provides a modified implementation of an inner product argument (e.g. [Bulletproofs](https://eprint.iacr.org/2017/1066.pdf) and [Halo2](https://zcash.github.io/halo2/background/pc-ipa.html)). Mathematical details of the modified inner product argument are outlined in the [Blitzar Github repository](https://github.com/spaceandtimelabs/blitzar#inner-product-argument).\n\n#### Other Features to Come\n\nIf there is a particular feature that you would like to see, please [reach out](https://github.com/spaceandtimelabs/blitzar/issues). Blitzar is a community-first project, and we want to hear from you.\n\n## Getting Started\n\nTo get a local copy up and running, consider the following steps.\n\n### Prerequisites to build from source\n\n\u003cdetails open\u003e\n\u003csummary\u003eGPU backend prerequisites:\u003c/summary\u003e\n\n* [Rust 1.85](https://www.rust-lang.org/tools/install)\n* `x86_64` Linux instance.\n* NVIDIA driver version \u003e= 560.35.03 (check the [compatibility list here](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html)).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCPU backend prerequisites:\u003c/summary\u003e\n\nYou'll need the following requirements to run the environment:\n\n* [Rust 1.85](https://www.rust-lang.org/tools/install)\n* `x86_64` Linux instance.\n\n\u003c/details\u003e\n\n## Usage\n\n### Add to your project\n\nTo add this library to your project, update your `Cargo.toml` file with the following line:\n\n```\n[dependencies]\nblitzar = \u003cversion_number\u003e\n```\n\n### Feature Flags\n\n| Feature            | Default? | Description |\n| :---               |  :---:   | :---        |\n| `cpu`          |    x     | Enables the CPU backend. |\n| `gpu`            |    ✓     | Enables the GPU Backend. |\n\n### Tests\n\n```bash\ncargo test\n```\n\n### Documentation\n\n```bash\ncargo doc --no-deps --open\n```\n\n### Examples\n\nCheck [EXAMPLES](docs/EXAMPLES.md) file.\n\n### Running benchmarks:\n\nBenchmarks are run using [criterion.rs](https://github.com/bheisler/criterion.rs):\n```\ncargo bench --features \u003ccpu | gpu\u003e\n```\nTo run individual tests:\n```\ncargo bench --features \u003ccpu | gpu\u003e --bench \u003cbenchmark_name\u003e\n```\nand replace the `benchmark_name` with one of the following available benchmarks\n- `arkworks_halo2_interop_benchmarks`\n- `blitzar_bls12_381_benchmarks`\n- `blitzar_bn254_benchmarks`\n- `blitzar_curve25519_benchmarks`\n- `blitzar_halo2_bn256_benchmarks`\n- `blitzar_grumpkin_benchmarks`\n- `packed_msm_benchmarks`\n\nAdditionally [Jaeger tracing](https://www.jaegertracing.io/) is supported. For more information on how to run the benchmarks, see the [/benches/jaeger_benches.rs](benches/jaeger_benches.rs) file.\n\n## Development Process\n\nThe main branch is regularly built and tested, being the only source of truth. [Tags](https://github.com/spaceandtimelabs/blitzar-rs/tags) are created regularly from automated semantic release executions. \n\n## Contributing\n\nWe're excited to open Blitzar-rs to the community, but are not accepting community Pull Requests yet due to logistic reasons. However, feel free to contribute with any suggestion, idea, or bugfix on our [Issues](https://github.com/spaceandtimelabs/blitzar-rs/issues) panel. Also, see [contribution guide](CONTRIBUTING.md).\n\n## Community \u0026 support\n\nJoin our [Discord server](https://discord.com/invite/SpaceandTimeDB) to ask questions, discuss features, and for general chat.\n\n## License\n\nThis project is released under the [Apache 2 License](LICENSE).\n  \n## C++ code\n\nThis repo contains the high-Level rust wrapper for the blitzar-sys crate. If you are using C++, use the code from the companion repo here: https://github.com/spaceandtimelabs/blitzar.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaceandtimefdn%2Fblitzar-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspaceandtimefdn%2Fblitzar-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspaceandtimefdn%2Fblitzar-rs/lists"}