├── .github └── workflows │ ├── release-plz.yml │ └── rust.yml ├── .gitignore ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── build.rs ├── rust-toolchain.toml ├── src ├── consts.rs ├── dtypes.rs ├── enums.rs ├── kzg_proof.rs ├── lib.rs ├── pairings.rs ├── trusted_setup.rs └── trusted_setup.txt └── tests ├── verify_blob_kzg_proof ├── verify_blob_kzg_proof_case_correct_proof_0951cfd9ab47a8d3 │ └── data.yaml ├── verify_blob_kzg_proof_case_correct_proof_19b3f3f8c98ea31e │ └── data.yaml ├── verify_blob_kzg_proof_case_correct_proof_84d8089232bc23a8 │ └── data.yaml ├── verify_blob_kzg_proof_case_correct_proof_a87a4e636e0f58fb │ └── data.yaml ├── verify_blob_kzg_proof_case_correct_proof_c40b9b515df8721b │ └── data.yaml ├── verify_blob_kzg_proof_case_correct_proof_cdb3e6d49eb12307 │ └── data.yaml ├── verify_blob_kzg_proof_case_correct_proof_fb324bc819407148 │ └── data.yaml ├── verify_blob_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly │ └── data.yaml ├── verify_blob_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly │ └── data.yaml ├── verify_blob_kzg_proof_case_incorrect_proof_0951cfd9ab47a8d3 │ └── data.yaml ├── verify_blob_kzg_proof_case_incorrect_proof_19b3f3f8c98ea31e │ └── data.yaml ├── verify_blob_kzg_proof_case_incorrect_proof_84d8089232bc23a8 │ └── data.yaml ├── verify_blob_kzg_proof_case_incorrect_proof_a87a4e636e0f58fb │ └── data.yaml ├── verify_blob_kzg_proof_case_incorrect_proof_c40b9b515df8721b │ └── data.yaml ├── verify_blob_kzg_proof_case_incorrect_proof_cdb3e6d49eb12307 │ └── data.yaml ├── verify_blob_kzg_proof_case_incorrect_proof_fb324bc819407148 │ └── data.yaml ├── verify_blob_kzg_proof_case_incorrect_proof_point_at_infinity │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_blob_59d64ff6b4648fad │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_blob_635fb2de5b0dc429 │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_blob_a3b9ff28507767f8 │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_blob_d3afbd98123a3434 │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_commitment_1a68c47b68148e78 │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_commitment_24b932fb4dec5b2d │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_commitment_3a6eb616efae0627 │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_commitment_d070689c3e15444c │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_proof_1a68c47b68148e78 │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_proof_24b932fb4dec5b2d │ └── data.yaml ├── verify_blob_kzg_proof_case_invalid_proof_3a6eb616efae0627 │ └── data.yaml └── verify_blob_kzg_proof_case_invalid_proof_d070689c3e15444c │ └── data.yaml ├── verify_blob_kzg_proof_batch ├── verify_blob_kzg_proof_batch_case_0951cfd9ab47a8d3 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_0f3f1d3f48f71495 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_12c097d7ca0261e3 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_2ef482373a81e34e │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_a271b78b8e869d69 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_blob_length_different │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_cb3c3279a1afddcf │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_commitment_length_different │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_e61aafba051ddf79 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_incorrect_proof_add_one │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_incorrect_proof_point_at_infinity │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_blob_59d64ff6b4648fad │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_blob_635fb2de5b0dc429 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_blob_a3b9ff28507767f8 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_blob_d3afbd98123a3434 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_commitment_1a68c47b68148e78 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_commitment_24b932fb4dec5b2d │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_commitment_3a6eb616efae0627 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_commitment_d070689c3e15444c │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_proof_1a68c47b68148e78 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_proof_24b932fb4dec5b2d │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_proof_3a6eb616efae0627 │ └── data.yaml ├── verify_blob_kzg_proof_batch_case_invalid_proof_d070689c3e15444c │ └── data.yaml └── verify_blob_kzg_proof_batch_case_proof_length_different │ └── data.yaml └── verify_kzg_proof ├── verify_kzg_proof_case_correct_proof_02e696ada7d4631d └── data.yaml ├── verify_kzg_proof_case_correct_proof_05c1f3685f3393f0 └── data.yaml ├── verify_kzg_proof_case_correct_proof_08f9e2f1cb3d39db └── data.yaml ├── verify_kzg_proof_case_correct_proof_0cf79b17cb5f4ea2 └── data.yaml ├── verify_kzg_proof_case_correct_proof_177b58dc7a46b08f └── data.yaml ├── verify_kzg_proof_case_correct_proof_1ce8e4f69d5df899 └── data.yaml ├── verify_kzg_proof_case_correct_proof_26b753dec0560daa └── data.yaml ├── verify_kzg_proof_case_correct_proof_2b76dc9e3abf42f3 └── data.yaml ├── verify_kzg_proof_case_correct_proof_31ebd010e6098750 └── data.yaml ├── verify_kzg_proof_case_correct_proof_3208425794224c3f └── data.yaml ├── verify_kzg_proof_case_correct_proof_36817bfd67de97a8 └── data.yaml ├── verify_kzg_proof_case_correct_proof_392169c16a2e5ef6 └── data.yaml ├── verify_kzg_proof_case_correct_proof_395cf6d697d1a743 └── data.yaml ├── verify_kzg_proof_case_correct_proof_3ac8dc31e9aa6a70 └── data.yaml ├── verify_kzg_proof_case_correct_proof_3c1e8b38219e3e12 └── data.yaml ├── verify_kzg_proof_case_correct_proof_3c87ec986c2656c2 └── data.yaml ├── verify_kzg_proof_case_correct_proof_3cd183d0bab85fb7 └── data.yaml ├── verify_kzg_proof_case_correct_proof_420f2a187ce77035 └── data.yaml ├── verify_kzg_proof_case_correct_proof_444b73ff54a19b44 └── data.yaml ├── verify_kzg_proof_case_correct_proof_53a9bdf4f75196da └── data.yaml ├── verify_kzg_proof_case_correct_proof_585454b31673dd62 └── data.yaml ├── verify_kzg_proof_case_correct_proof_7db4f140a955dd1a └── data.yaml ├── verify_kzg_proof_case_correct_proof_83e53423a2dd93fe └── data.yaml ├── verify_kzg_proof_case_correct_proof_9b24f8997145435c └── data.yaml ├── verify_kzg_proof_case_correct_proof_9b754afb690c47e1 └── data.yaml ├── verify_kzg_proof_case_correct_proof_a0be66af9a97ea52 └── data.yaml ├── verify_kzg_proof_case_correct_proof_af669445747d2585 └── data.yaml ├── verify_kzg_proof_case_correct_proof_af8b75f664ed7d43 └── data.yaml ├── verify_kzg_proof_case_correct_proof_b6cb6698327d9835 └── data.yaml ├── verify_kzg_proof_case_correct_proof_b6ec3736f9ff2c62 └── data.yaml ├── verify_kzg_proof_case_correct_proof_becf2e1641bbd4e6 └── data.yaml ├── verify_kzg_proof_case_correct_proof_c3d4322ec17fe7cd └── data.yaml ├── verify_kzg_proof_case_correct_proof_c5e1490d672d026d └── data.yaml ├── verify_kzg_proof_case_correct_proof_cae5d3491190b777 └── data.yaml ├── verify_kzg_proof_case_correct_proof_d0992bc0387790a4 └── data.yaml ├── verify_kzg_proof_case_correct_proof_d736268229bd87ec └── data.yaml ├── verify_kzg_proof_case_correct_proof_e68d7111a2364a49 └── data.yaml ├── verify_kzg_proof_case_correct_proof_ed6b180ec759bcf6 └── data.yaml ├── verify_kzg_proof_case_correct_proof_f0ed3dc11cdeb130 └── data.yaml ├── verify_kzg_proof_case_correct_proof_f47eb9fc139f6bfd └── data.yaml ├── verify_kzg_proof_case_correct_proof_f7f44e1e864aa967 └── data.yaml ├── verify_kzg_proof_case_correct_proof_ffa6e97b97146517 └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_05c1f3685f3393f0 └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_177b58dc7a46b08f └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_2b76dc9e3abf42f3 └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_395cf6d697d1a743 └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_585454b31673dd62 └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_a0be66af9a97ea52 └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_02e696ada7d4631d └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_0cf79b17cb5f4ea2 └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_3208425794224c3f └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_3ac8dc31e9aa6a70 └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_c3d4322ec17fe7cd └── data.yaml ├── verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_ffa6e97b97146517 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_02e696ada7d4631d └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_05c1f3685f3393f0 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_08f9e2f1cb3d39db └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_0cf79b17cb5f4ea2 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_177b58dc7a46b08f └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_1ce8e4f69d5df899 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_26b753dec0560daa └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_2b76dc9e3abf42f3 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_31ebd010e6098750 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_3208425794224c3f └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_36817bfd67de97a8 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_392169c16a2e5ef6 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_395cf6d697d1a743 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_3ac8dc31e9aa6a70 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_3c1e8b38219e3e12 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_3c87ec986c2656c2 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_3cd183d0bab85fb7 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_420f2a187ce77035 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_444b73ff54a19b44 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_53a9bdf4f75196da └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_585454b31673dd62 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_7db4f140a955dd1a └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_83e53423a2dd93fe └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_9b24f8997145435c └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_9b754afb690c47e1 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_a0be66af9a97ea52 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_af669445747d2585 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_af8b75f664ed7d43 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_b6cb6698327d9835 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_b6ec3736f9ff2c62 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_becf2e1641bbd4e6 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_c3d4322ec17fe7cd └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_c5e1490d672d026d └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_cae5d3491190b777 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_d0992bc0387790a4 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_d736268229bd87ec └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_e68d7111a2364a49 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_ed6b180ec759bcf6 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_f0ed3dc11cdeb130 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_f47eb9fc139f6bfd └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_f7f44e1e864aa967 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_ffa6e97b97146517 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_point_at_infinity_392169c16a2e5ef6 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_point_at_infinity_3c1e8b38219e3e12 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_point_at_infinity_3c87ec986c2656c2 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_point_at_infinity_420f2a187ce77035 └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_point_at_infinity_83e53423a2dd93fe └── data.yaml ├── verify_kzg_proof_case_incorrect_proof_point_at_infinity_ed6b180ec759bcf6 └── data.yaml ├── verify_kzg_proof_case_invalid_commitment_1b44e341d56c757d └── data.yaml ├── verify_kzg_proof_case_invalid_commitment_32afa9561a4b3b91 └── data.yaml ├── verify_kzg_proof_case_invalid_commitment_3e55802a5ed3c757 └── data.yaml ├── verify_kzg_proof_case_invalid_commitment_e9d3e9ec16fbc15f └── data.yaml ├── verify_kzg_proof_case_invalid_proof_1b44e341d56c757d └── data.yaml ├── verify_kzg_proof_case_invalid_proof_32afa9561a4b3b91 └── data.yaml ├── verify_kzg_proof_case_invalid_proof_3e55802a5ed3c757 └── data.yaml ├── verify_kzg_proof_case_invalid_proof_e9d3e9ec16fbc15f └── data.yaml ├── verify_kzg_proof_case_invalid_y_35d08d612aad2197 └── data.yaml ├── verify_kzg_proof_case_invalid_y_4aa6def8c35c9097 └── data.yaml ├── verify_kzg_proof_case_invalid_y_4e51cef08a61606f └── data.yaml ├── verify_kzg_proof_case_invalid_y_64b9ff2b8f7dddee └── data.yaml ├── verify_kzg_proof_case_invalid_y_b358a2e763727b70 └── data.yaml ├── verify_kzg_proof_case_invalid_y_eb0601fec84cc5e9 └── data.yaml ├── verify_kzg_proof_case_invalid_z_35d08d612aad2197 └── data.yaml ├── verify_kzg_proof_case_invalid_z_4aa6def8c35c9097 └── data.yaml ├── verify_kzg_proof_case_invalid_z_4e51cef08a61606f └── data.yaml ├── verify_kzg_proof_case_invalid_z_64b9ff2b8f7dddee └── data.yaml ├── verify_kzg_proof_case_invalid_z_b358a2e763727b70 └── data.yaml └── verify_kzg_proof_case_invalid_z_eb0601fec84cc5e9 └── data.yaml /.github/workflows/release-plz.yml: -------------------------------------------------------------------------------- 1 | name: Release-plz 2 | 3 | permissions: 4 | pull-requests: write 5 | contents: write 6 | 7 | on: 8 | push: 9 | branches: 10 | - master 11 | 12 | jobs: 13 | 14 | # Release unpublished packages. 15 | release-plz-release: 16 | name: Release-plz release 17 | runs-on: ubuntu-latest 18 | permissions: 19 | contents: write 20 | steps: 21 | - name: Checkout repository 22 | uses: actions/checkout@v4 23 | with: 24 | fetch-depth: 0 25 | - name: Install Rust toolchain 26 | uses: dtolnay/rust-toolchain@stable 27 | - name: Run release-plz 28 | uses: release-plz/action@v0.5 29 | with: 30 | command: release 31 | env: 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 | CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} 34 | 35 | # Create a PR with the new versions and changelog, preparing the next release. 36 | release-plz-pr: 37 | name: Release-plz PR 38 | runs-on: ubuntu-latest 39 | permissions: 40 | contents: write 41 | pull-requests: write 42 | concurrency: 43 | group: release-plz-${{ github.ref }} 44 | cancel-in-progress: false 45 | steps: 46 | - name: Checkout repository 47 | uses: actions/checkout@v4 48 | with: 49 | fetch-depth: 0 50 | - name: Install Rust toolchain 51 | uses: dtolnay/rust-toolchain@stable 52 | - name: Run release-plz 53 | uses: release-plz/action@v0.5 54 | with: 55 | command: release-pr 56 | env: 57 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 58 | CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/rust.yml: -------------------------------------------------------------------------------- 1 | name: Rust 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build: 14 | runs-on: 15 | - runs-on 16 | - runner=4cpu-linux-x64 17 | - run-id=${{ github.run_id }} 18 | steps: 19 | - uses: actions/checkout@v4 20 | - uses: dtolnay/rust-toolchain@stable 21 | - name: Clippy 22 | run: cargo clippy --all-targets -- -D warnings 23 | - name: Build 24 | run: cargo build --verbose --no-default-features 25 | - name: Run tests 26 | run: cargo test --verbose 27 | test-no-std: 28 | name: test no_std 29 | runs-on: ubuntu-latest 30 | timeout-minutes: 30 31 | steps: 32 | - uses: actions/checkout@v3 33 | - uses: dtolnay/rust-toolchain@stable 34 | with: 35 | targets: riscv32imac-unknown-none-elf 36 | - run: cargo check --target riscv32imac-unknown-none-elf --no-default-features -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .DS_Store # OS X Finder metadata 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | ## [Unreleased] 9 | 10 | ## [0.2.7](https://github.com/succinctlabs/kzg-rs/compare/v0.2.6...v0.2.7) - 2025-05-30 11 | 12 | ### Other 13 | 14 | - bump sp1_bls12_381 to patch-0.8.0-sp1-5.0.0 15 | 16 | ## [0.2.6](https://github.com/succinctlabs/kzg-rs/compare/v0.2.5...v0.2.6) - 2025-04-15 17 | 18 | ### Added 19 | 20 | - Add `rkyv` `Serialize`, `Deserialize`, `Archive` ([#19](https://github.com/succinctlabs/kzg-rs/pull/19)) 21 | - Implement (de)-serialize on `define_bytes_type` ([#18](https://github.com/succinctlabs/kzg-rs/pull/18)) 22 | 23 | ### Other 24 | 25 | - add release-plz ([#21](https://github.com/succinctlabs/kzg-rs/pull/21)) 26 | - expose fns ([#20](https://github.com/succinctlabs/kzg-rs/pull/20)) 27 | - Bump SP1 `bls` crate ([#17](https://github.com/succinctlabs/kzg-rs/pull/17)) 28 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addchain" 7 | version = "0.2.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "3b2e69442aa5628ea6951fa33e24efe8313f4321a91bd729fc2f75bdfc858570" 10 | dependencies = [ 11 | "num-bigint 0.3.3", 12 | "num-integer", 13 | "num-traits", 14 | ] 15 | 16 | [[package]] 17 | name = "arrayref" 18 | version = "0.3.9" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" 21 | 22 | [[package]] 23 | name = "arrayvec" 24 | version = "0.7.6" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 27 | 28 | [[package]] 29 | name = "autocfg" 30 | version = "1.3.0" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 33 | 34 | [[package]] 35 | name = "bincode" 36 | version = "1.3.3" 37 | source = "registry+https://github.com/rust-lang/crates.io-index" 38 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 39 | dependencies = [ 40 | "serde", 41 | ] 42 | 43 | [[package]] 44 | name = "blake3" 45 | version = "1.8.2" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" 48 | dependencies = [ 49 | "arrayref", 50 | "arrayvec", 51 | "cc", 52 | "cfg-if", 53 | "constant_time_eq", 54 | ] 55 | 56 | [[package]] 57 | name = "block-buffer" 58 | version = "0.10.4" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 61 | dependencies = [ 62 | "generic-array", 63 | ] 64 | 65 | [[package]] 66 | name = "bytecheck" 67 | version = "0.8.1" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "50690fb3370fb9fe3550372746084c46f2ac8c9685c583d2be10eefd89d3d1a3" 70 | dependencies = [ 71 | "bytecheck_derive", 72 | "ptr_meta", 73 | "rancor", 74 | "simdutf8", 75 | ] 76 | 77 | [[package]] 78 | name = "bytecheck_derive" 79 | version = "0.8.1" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "efb7846e0cb180355c2dec69e721edafa36919850f1a9f52ffba4ebc0393cb71" 82 | dependencies = [ 83 | "proc-macro2", 84 | "quote", 85 | "syn 2.0.96", 86 | ] 87 | 88 | [[package]] 89 | name = "byteorder" 90 | version = "1.5.0" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 93 | 94 | [[package]] 95 | name = "bytes" 96 | version = "1.10.1" 97 | source = "registry+https://github.com/rust-lang/crates.io-index" 98 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 99 | 100 | [[package]] 101 | name = "cc" 102 | version = "1.2.25" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" 105 | dependencies = [ 106 | "shlex", 107 | ] 108 | 109 | [[package]] 110 | name = "cfg-if" 111 | version = "1.0.0" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 114 | 115 | [[package]] 116 | name = "constant_time_eq" 117 | version = "0.3.1" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" 120 | 121 | [[package]] 122 | name = "cpufeatures" 123 | version = "0.2.13" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" 126 | dependencies = [ 127 | "libc", 128 | ] 129 | 130 | [[package]] 131 | name = "crypto-common" 132 | version = "0.1.6" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 135 | dependencies = [ 136 | "generic-array", 137 | "typenum", 138 | ] 139 | 140 | [[package]] 141 | name = "digest" 142 | version = "0.10.7" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 145 | dependencies = [ 146 | "block-buffer", 147 | "crypto-common", 148 | ] 149 | 150 | [[package]] 151 | name = "either" 152 | version = "1.13.0" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 155 | 156 | [[package]] 157 | name = "equivalent" 158 | version = "1.0.1" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 161 | 162 | [[package]] 163 | name = "ff" 164 | version = "0.13.0" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" 167 | dependencies = [ 168 | "byteorder", 169 | "ff_derive", 170 | "rand_core", 171 | "subtle", 172 | ] 173 | 174 | [[package]] 175 | name = "ff_derive" 176 | version = "0.13.0" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" 179 | dependencies = [ 180 | "addchain", 181 | "cfg-if", 182 | "num-bigint 0.3.3", 183 | "num-integer", 184 | "num-traits", 185 | "proc-macro2", 186 | "quote", 187 | "syn 1.0.109", 188 | ] 189 | 190 | [[package]] 191 | name = "gcd" 192 | version = "2.3.0" 193 | source = "registry+https://github.com/rust-lang/crates.io-index" 194 | checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" 195 | 196 | [[package]] 197 | name = "generic-array" 198 | version = "0.14.7" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 201 | dependencies = [ 202 | "typenum", 203 | "version_check", 204 | ] 205 | 206 | [[package]] 207 | name = "getrandom" 208 | version = "0.2.15" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 211 | dependencies = [ 212 | "cfg-if", 213 | "libc", 214 | "wasi", 215 | ] 216 | 217 | [[package]] 218 | name = "group" 219 | version = "0.13.0" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" 222 | dependencies = [ 223 | "ff", 224 | "rand_core", 225 | "subtle", 226 | ] 227 | 228 | [[package]] 229 | name = "hashbrown" 230 | version = "0.14.5" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 233 | 234 | [[package]] 235 | name = "hashbrown" 236 | version = "0.15.2" 237 | source = "registry+https://github.com/rust-lang/crates.io-index" 238 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 239 | 240 | [[package]] 241 | name = "hex" 242 | version = "0.4.3" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 245 | 246 | [[package]] 247 | name = "indexmap" 248 | version = "2.4.0" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" 251 | dependencies = [ 252 | "equivalent", 253 | "hashbrown 0.14.5", 254 | ] 255 | 256 | [[package]] 257 | name = "itertools" 258 | version = "0.12.1" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" 261 | dependencies = [ 262 | "either", 263 | ] 264 | 265 | [[package]] 266 | name = "itoa" 267 | version = "1.0.11" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 270 | 271 | [[package]] 272 | name = "kzg-rs" 273 | version = "0.2.7" 274 | dependencies = [ 275 | "ff", 276 | "hex", 277 | "rkyv", 278 | "serde", 279 | "serde_arrays", 280 | "serde_derive", 281 | "serde_yaml", 282 | "sha2", 283 | "sp1_bls12_381", 284 | "spin", 285 | ] 286 | 287 | [[package]] 288 | name = "lazy_static" 289 | version = "1.5.0" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 292 | 293 | [[package]] 294 | name = "libc" 295 | version = "0.2.158" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" 298 | 299 | [[package]] 300 | name = "munge" 301 | version = "0.4.3" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "a0091202c98cf06da46c279fdf50cccb6b1c43b4521abdf6a27b4c7e71d5d9d7" 304 | dependencies = [ 305 | "munge_macro", 306 | ] 307 | 308 | [[package]] 309 | name = "munge_macro" 310 | version = "0.4.3" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "734799cf91479720b2f970c61a22850940dd91e27d4f02b1c6fc792778df2459" 313 | dependencies = [ 314 | "proc-macro2", 315 | "quote", 316 | "syn 2.0.96", 317 | ] 318 | 319 | [[package]] 320 | name = "num-bigint" 321 | version = "0.3.3" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" 324 | dependencies = [ 325 | "autocfg", 326 | "num-integer", 327 | "num-traits", 328 | ] 329 | 330 | [[package]] 331 | name = "num-bigint" 332 | version = "0.4.6" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 335 | dependencies = [ 336 | "num-integer", 337 | "num-traits", 338 | ] 339 | 340 | [[package]] 341 | name = "num-integer" 342 | version = "0.1.46" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 345 | dependencies = [ 346 | "num-traits", 347 | ] 348 | 349 | [[package]] 350 | name = "num-traits" 351 | version = "0.2.19" 352 | source = "registry+https://github.com/rust-lang/crates.io-index" 353 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 354 | dependencies = [ 355 | "autocfg", 356 | ] 357 | 358 | [[package]] 359 | name = "once_cell" 360 | version = "1.20.2" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 363 | 364 | [[package]] 365 | name = "p3-baby-bear" 366 | version = "0.2.3-succinct" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "7521838ecab2ddf4f7bc4ceebad06ec02414729598485c1ada516c39900820e8" 369 | dependencies = [ 370 | "num-bigint 0.4.6", 371 | "p3-field", 372 | "p3-mds", 373 | "p3-poseidon2", 374 | "p3-symmetric", 375 | "rand", 376 | "serde", 377 | ] 378 | 379 | [[package]] 380 | name = "p3-dft" 381 | version = "0.2.3-succinct" 382 | source = "registry+https://github.com/rust-lang/crates.io-index" 383 | checksum = "46414daedd796f1eefcdc1811c0484e4bced5729486b6eaba9521c572c76761a" 384 | dependencies = [ 385 | "p3-field", 386 | "p3-matrix", 387 | "p3-maybe-rayon", 388 | "p3-util", 389 | "tracing", 390 | ] 391 | 392 | [[package]] 393 | name = "p3-field" 394 | version = "0.2.3-succinct" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | checksum = "48948a0516b349e9d1cdb95e7236a6ee010c44e68c5cc78b4b92bf1c4022a0d9" 397 | dependencies = [ 398 | "itertools", 399 | "num-bigint 0.4.6", 400 | "num-traits", 401 | "p3-util", 402 | "rand", 403 | "serde", 404 | ] 405 | 406 | [[package]] 407 | name = "p3-matrix" 408 | version = "0.2.3-succinct" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "3e4de3f373589477cb735ea58e125898ed20935e03664b4614c7fac258b3c42f" 411 | dependencies = [ 412 | "itertools", 413 | "p3-field", 414 | "p3-maybe-rayon", 415 | "p3-util", 416 | "rand", 417 | "serde", 418 | "tracing", 419 | ] 420 | 421 | [[package]] 422 | name = "p3-maybe-rayon" 423 | version = "0.2.3-succinct" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "c3968ad1160310296eb04f91a5f4edfa38fe1d6b2b8cd6b5c64e6f9b7370979e" 426 | 427 | [[package]] 428 | name = "p3-mds" 429 | version = "0.2.3-succinct" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "2356b1ed0add6d5dfbf7a338ce534a6fde827374394a52cec16a0840af6e97c9" 432 | dependencies = [ 433 | "itertools", 434 | "p3-dft", 435 | "p3-field", 436 | "p3-matrix", 437 | "p3-symmetric", 438 | "p3-util", 439 | "rand", 440 | ] 441 | 442 | [[package]] 443 | name = "p3-poseidon2" 444 | version = "0.2.3-succinct" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "7da1eec7e1b6900581bedd95e76e1ef4975608dd55be9872c9d257a8a9651c3a" 447 | dependencies = [ 448 | "gcd", 449 | "p3-field", 450 | "p3-mds", 451 | "p3-symmetric", 452 | "rand", 453 | "serde", 454 | ] 455 | 456 | [[package]] 457 | name = "p3-symmetric" 458 | version = "0.2.3-succinct" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | checksum = "edb439bea1d822623b41ff4b51e3309e80d13cadf8b86d16ffd5e6efb9fdc360" 461 | dependencies = [ 462 | "itertools", 463 | "p3-field", 464 | "serde", 465 | ] 466 | 467 | [[package]] 468 | name = "p3-util" 469 | version = "0.2.3-succinct" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | checksum = "b6c2c2010678b9332b563eaa38364915b585c1a94b5ca61e2c7541c087ddda5c" 472 | dependencies = [ 473 | "serde", 474 | ] 475 | 476 | [[package]] 477 | name = "pairing" 478 | version = "0.23.0" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" 481 | dependencies = [ 482 | "group", 483 | ] 484 | 485 | [[package]] 486 | name = "pin-project-lite" 487 | version = "0.2.16" 488 | source = "registry+https://github.com/rust-lang/crates.io-index" 489 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 490 | 491 | [[package]] 492 | name = "ppv-lite86" 493 | version = "0.2.20" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" 496 | dependencies = [ 497 | "zerocopy", 498 | ] 499 | 500 | [[package]] 501 | name = "proc-macro2" 502 | version = "1.0.93" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" 505 | dependencies = [ 506 | "unicode-ident", 507 | ] 508 | 509 | [[package]] 510 | name = "ptr_meta" 511 | version = "0.3.0" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "fe9e76f66d3f9606f44e45598d155cb13ecf09f4a28199e48daf8c8fc937ea90" 514 | dependencies = [ 515 | "ptr_meta_derive", 516 | ] 517 | 518 | [[package]] 519 | name = "ptr_meta_derive" 520 | version = "0.3.0" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | checksum = "ca414edb151b4c8d125c12566ab0d74dc9cdba36fb80eb7b848c15f495fd32d1" 523 | dependencies = [ 524 | "proc-macro2", 525 | "quote", 526 | "syn 2.0.96", 527 | ] 528 | 529 | [[package]] 530 | name = "quote" 531 | version = "1.0.37" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 534 | dependencies = [ 535 | "proc-macro2", 536 | ] 537 | 538 | [[package]] 539 | name = "rancor" 540 | version = "0.1.0" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "caf5f7161924b9d1cea0e4cabc97c372cea92b5f927fc13c6bca67157a0ad947" 543 | dependencies = [ 544 | "ptr_meta", 545 | ] 546 | 547 | [[package]] 548 | name = "rand" 549 | version = "0.8.5" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 552 | dependencies = [ 553 | "libc", 554 | "rand_chacha", 555 | "rand_core", 556 | ] 557 | 558 | [[package]] 559 | name = "rand_chacha" 560 | version = "0.3.1" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 563 | dependencies = [ 564 | "ppv-lite86", 565 | "rand_core", 566 | ] 567 | 568 | [[package]] 569 | name = "rand_core" 570 | version = "0.6.4" 571 | source = "registry+https://github.com/rust-lang/crates.io-index" 572 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 573 | dependencies = [ 574 | "getrandom", 575 | ] 576 | 577 | [[package]] 578 | name = "rend" 579 | version = "0.5.2" 580 | source = "registry+https://github.com/rust-lang/crates.io-index" 581 | checksum = "a35e8a6bf28cd121053a66aa2e6a2e3eaffad4a60012179f0e864aa5ffeff215" 582 | dependencies = [ 583 | "bytecheck", 584 | ] 585 | 586 | [[package]] 587 | name = "rkyv" 588 | version = "0.8.10" 589 | source = "registry+https://github.com/rust-lang/crates.io-index" 590 | checksum = "1e147371c75553e1e2fcdb483944a8540b8438c31426279553b9a8182a9b7b65" 591 | dependencies = [ 592 | "bytecheck", 593 | "bytes", 594 | "hashbrown 0.15.2", 595 | "indexmap", 596 | "munge", 597 | "ptr_meta", 598 | "rancor", 599 | "rend", 600 | "rkyv_derive", 601 | "tinyvec", 602 | "uuid", 603 | ] 604 | 605 | [[package]] 606 | name = "rkyv_derive" 607 | version = "0.8.10" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "246b40ac189af6c675d124b802e8ef6d5246c53e17367ce9501f8f66a81abb7a" 610 | dependencies = [ 611 | "proc-macro2", 612 | "quote", 613 | "syn 2.0.96", 614 | ] 615 | 616 | [[package]] 617 | name = "ryu" 618 | version = "1.0.18" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 621 | 622 | [[package]] 623 | name = "serde" 624 | version = "1.0.209" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" 627 | dependencies = [ 628 | "serde_derive", 629 | ] 630 | 631 | [[package]] 632 | name = "serde_arrays" 633 | version = "0.2.0" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "94a16b99c5ea4fe3daccd14853ad260ec00ea043b2708d1fd1da3106dcd8d9df" 636 | dependencies = [ 637 | "serde", 638 | ] 639 | 640 | [[package]] 641 | name = "serde_derive" 642 | version = "1.0.209" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" 645 | dependencies = [ 646 | "proc-macro2", 647 | "quote", 648 | "syn 2.0.96", 649 | ] 650 | 651 | [[package]] 652 | name = "serde_yaml" 653 | version = "0.9.34+deprecated" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" 656 | dependencies = [ 657 | "indexmap", 658 | "itoa", 659 | "ryu", 660 | "serde", 661 | "unsafe-libyaml", 662 | ] 663 | 664 | [[package]] 665 | name = "sha2" 666 | version = "0.10.8" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 669 | dependencies = [ 670 | "cfg-if", 671 | "cpufeatures", 672 | "digest", 673 | ] 674 | 675 | [[package]] 676 | name = "shlex" 677 | version = "1.3.0" 678 | source = "registry+https://github.com/rust-lang/crates.io-index" 679 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 680 | 681 | [[package]] 682 | name = "simdutf8" 683 | version = "0.1.5" 684 | source = "registry+https://github.com/rust-lang/crates.io-index" 685 | checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" 686 | 687 | [[package]] 688 | name = "sp1-lib" 689 | version = "5.0.0" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | checksum = "03046db52868c1b60e8acffa0777ef6dc11ec1bbbb10b9eb612a871f69c8d3f6" 692 | dependencies = [ 693 | "bincode", 694 | "serde", 695 | "sp1-primitives", 696 | ] 697 | 698 | [[package]] 699 | name = "sp1-primitives" 700 | version = "5.0.0" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "6939d6b2f63e54e5fbd208a0293027608f22511741b62fe32b6f67f6c144e0c0" 703 | dependencies = [ 704 | "bincode", 705 | "blake3", 706 | "cfg-if", 707 | "hex", 708 | "lazy_static", 709 | "num-bigint 0.4.6", 710 | "p3-baby-bear", 711 | "p3-field", 712 | "p3-poseidon2", 713 | "p3-symmetric", 714 | "serde", 715 | "sha2", 716 | ] 717 | 718 | [[package]] 719 | name = "sp1_bls12_381" 720 | version = "0.8.0-sp1-5.0.0" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "ac255e1704ebcdeec5e02f6a0ebc4d2e9e6b802161938330b6810c13a610c583" 723 | dependencies = [ 724 | "cfg-if", 725 | "ff", 726 | "group", 727 | "pairing", 728 | "rand_core", 729 | "sp1-lib", 730 | "subtle", 731 | ] 732 | 733 | [[package]] 734 | name = "spin" 735 | version = "0.9.8" 736 | source = "registry+https://github.com/rust-lang/crates.io-index" 737 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 738 | 739 | [[package]] 740 | name = "subtle" 741 | version = "2.6.1" 742 | source = "registry+https://github.com/rust-lang/crates.io-index" 743 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 744 | 745 | [[package]] 746 | name = "syn" 747 | version = "1.0.109" 748 | source = "registry+https://github.com/rust-lang/crates.io-index" 749 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 750 | dependencies = [ 751 | "proc-macro2", 752 | "quote", 753 | "unicode-ident", 754 | ] 755 | 756 | [[package]] 757 | name = "syn" 758 | version = "2.0.96" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" 761 | dependencies = [ 762 | "proc-macro2", 763 | "quote", 764 | "unicode-ident", 765 | ] 766 | 767 | [[package]] 768 | name = "tinyvec" 769 | version = "1.9.0" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" 772 | dependencies = [ 773 | "tinyvec_macros", 774 | ] 775 | 776 | [[package]] 777 | name = "tinyvec_macros" 778 | version = "0.1.1" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 781 | 782 | [[package]] 783 | name = "tracing" 784 | version = "0.1.41" 785 | source = "registry+https://github.com/rust-lang/crates.io-index" 786 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 787 | dependencies = [ 788 | "pin-project-lite", 789 | "tracing-attributes", 790 | "tracing-core", 791 | ] 792 | 793 | [[package]] 794 | name = "tracing-attributes" 795 | version = "0.1.28" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 798 | dependencies = [ 799 | "proc-macro2", 800 | "quote", 801 | "syn 2.0.96", 802 | ] 803 | 804 | [[package]] 805 | name = "tracing-core" 806 | version = "0.1.33" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 809 | dependencies = [ 810 | "once_cell", 811 | ] 812 | 813 | [[package]] 814 | name = "typenum" 815 | version = "1.17.0" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 818 | 819 | [[package]] 820 | name = "unicode-ident" 821 | version = "1.0.12" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 824 | 825 | [[package]] 826 | name = "unsafe-libyaml" 827 | version = "0.2.11" 828 | source = "registry+https://github.com/rust-lang/crates.io-index" 829 | checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" 830 | 831 | [[package]] 832 | name = "uuid" 833 | version = "1.16.0" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" 836 | 837 | [[package]] 838 | name = "version_check" 839 | version = "0.9.5" 840 | source = "registry+https://github.com/rust-lang/crates.io-index" 841 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 842 | 843 | [[package]] 844 | name = "wasi" 845 | version = "0.11.0+wasi-snapshot-preview1" 846 | source = "registry+https://github.com/rust-lang/crates.io-index" 847 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 848 | 849 | [[package]] 850 | name = "zerocopy" 851 | version = "0.7.35" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 854 | dependencies = [ 855 | "byteorder", 856 | "zerocopy-derive", 857 | ] 858 | 859 | [[package]] 860 | name = "zerocopy-derive" 861 | version = "0.7.35" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 864 | dependencies = [ 865 | "proc-macro2", 866 | "quote", 867 | "syn 2.0.96", 868 | ] 869 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | authors = ["Bhargav Annem "] 3 | description = "Rust implementation of KZG point evaluation" 4 | edition = "2021" 5 | license = "MIT" 6 | name = "kzg-rs" 7 | version = "0.2.7" 8 | repository = "https://github.com/succinctlabs/kzg-rs" 9 | 10 | [dependencies] 11 | hex = { version = "0.4.3", default-features = false, features = ["alloc"] } 12 | 13 | bls12_381 = { version = "=0.8.0-sp1-5.0.0", package = "sp1_bls12_381", default-features = false, features = [ 14 | "groups", 15 | "pairings", 16 | "alloc", 17 | ] } 18 | sha2 = { version = "0.10.8", default-features = false } 19 | ff = { version = "0.13.0", default-features = false, features = ["derive"] } 20 | spin = { version = "0.9.8", default-features = false, features = ["once"] } 21 | serde = { version = "^1.0", default-features = false, features = [ 22 | "derive", 23 | ], optional = true } 24 | serde_arrays = "0.2.0" 25 | rkyv = { version = "0.8.10", optional = true } 26 | 27 | [dev-dependencies] 28 | hex = "0.4.3" 29 | serde_yaml = "0.9" 30 | serde_derive = "1.0" 31 | serde = { version = "^1.0", features = ["derive"] } 32 | 33 | [build-dependencies] 34 | bls12_381 = { version = "=0.8.0-sp1-5.0.0", package = "sp1_bls12_381", default-features = false, features = [ 35 | "groups", 36 | "pairings", 37 | "alloc", 38 | ] } 39 | hex = "0.4.3" 40 | 41 | [features] 42 | rkyv = ["dep:rkyv"] 43 | serde = ["dep:serde"] 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Bhargav Annem 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # kzg-rs [![Rust](https://github.com/0xWOLAND/kzg-rs/actions/workflows/rust.yml/badge.svg?branch=master)](https://github.com/0xWOLAND/kzg-rs/actions/workflows/rust.yml) 2 | 3 | An endpoint for `verify_kzg_proof` in [c-kzg-4844](https://github.com/ethereum/c-kzg-4844) using [bls12_381](https://github.com/zkcrypto/bls12_381/). Passes all of the `verify_kzg_proof` tests in [c-kzg-4844/verify_kzg_proof](https://github.com/ethereum/c-kzg-4844/tree/main/tests/verify_kzg_proof/kzg-mainnet). 4 | 5 | ## Cycle Counts in SP1 6 | | Test | Cycle Count | 7 | | -------------------------------------- | ----------- | 8 | | Verify blob KZG proof | 27,166,173 | 9 | | Verify blob KZG proof batch (10 blobs) | 196,571,578 | 10 | | Evaluate polynomial in evaluation form | 59,370,556 | 11 | | Compute challenge | 57,341,532 | 12 | | Verify KZG proof | 9,390,640 | 13 | 14 | This crate has been used in a [fork of SP1's patch of `revm`](https://github.com/0xWOLAND/revm/tree/patch-v5.0.0), which passes all tests. `kzg-rs` is based on [this](https://github.com/sp1-patches/bls12_381/tree/patch-v0.8.0) slightly modified fork of `bls12_381`. This crate works in `[no_std]` mode. 15 | 16 | ## Usage 17 | ```sh 18 | cargo add kzg-rs 19 | ``` 20 | Or add 21 | ```toml 22 | kzg-rs = "0.2.3" 23 | ``` 24 | 25 | You can rebuild `roots_of_unity.bin`, `g1.bin`, and `g2.bin` by running 26 | 27 | ```sh 28 | cargo build 29 | ``` 30 | -------------------------------------------------------------------------------- /build.rs: -------------------------------------------------------------------------------- 1 | const TRUSTED_SETUP_FILE: &str = include_str!("src/trusted_setup.txt"); 2 | 3 | include!("src/enums.rs"); 4 | include!("src/consts.rs"); 5 | include!("src/pairings.rs"); 6 | 7 | #[cfg(not(any(target_arch = "riscv32", doc)))] 8 | fn main() { 9 | use std::{env, fs, io::Write, path::Path}; 10 | #[derive(Debug, Clone, PartialEq, Eq)] 11 | pub struct KzgSettingsOwned { 12 | pub roots_of_unity: [Scalar; NUM_ROOTS_OF_UNITY], 13 | pub g1_points: [G1Affine; NUM_G1_POINTS], 14 | pub g2_points: [G2Affine; NUM_G2_POINTS], 15 | } 16 | 17 | fn hex_to_bytes(hex_str: &str) -> Result, KzgError> { 18 | let trimmed_str = hex_str.strip_prefix("0x").unwrap_or(hex_str); 19 | hex::decode(trimmed_str) 20 | .map_err(|e| KzgError::InvalidHexFormat(format!("Failed to decode hex: {}", e))) 21 | } 22 | 23 | pub fn load_trusted_setup_file_brute() -> Result { 24 | let trusted_setup_file: Vec = TRUSTED_SETUP_FILE 25 | .split('\n') 26 | .map(|x| x.to_string()) 27 | .collect(); 28 | 29 | let num_g1_points = trusted_setup_file[0].parse::().unwrap(); 30 | let num_g2_points = trusted_setup_file[1].parse::().unwrap(); 31 | let g1_points_idx = num_g1_points + 2; 32 | let g2_points_idx = g1_points_idx + num_g2_points; 33 | 34 | let _g1_points: Vec<[u8; BYTES_PER_G1_POINT]> = 35 | hex_to_bytes(&trusted_setup_file[2..g1_points_idx].join("")) 36 | .unwrap() 37 | .chunks_exact(BYTES_PER_G1_POINT) 38 | .map(|chunk| { 39 | let mut array = [0u8; BYTES_PER_G1_POINT]; 40 | array.copy_from_slice(chunk); 41 | array 42 | }) 43 | .collect(); 44 | let _g2_points: Vec<[u8; BYTES_PER_G2_POINT]> = 45 | hex_to_bytes(&trusted_setup_file[g1_points_idx..g2_points_idx].join("")) 46 | .unwrap() 47 | .chunks_exact(BYTES_PER_G2_POINT) 48 | .map(|chunk| { 49 | let mut array = [0u8; BYTES_PER_G2_POINT]; 50 | array.copy_from_slice(chunk); 51 | array 52 | }) 53 | .collect(); 54 | 55 | assert_eq!(_g1_points.len(), num_g1_points); 56 | assert_eq!(_g2_points.len(), num_g2_points); 57 | 58 | let mut max_scale = 0; 59 | while (1 << max_scale) < _g1_points.len() { 60 | max_scale += 1; 61 | } 62 | 63 | let roots_of_unity = compute_roots_of_unity(max_scale)?; 64 | let mut g1_points: [G1Affine; NUM_G1_POINTS] = [G1Affine::identity(); NUM_G1_POINTS]; 65 | let mut g2_points: [G2Affine; NUM_G2_POINTS] = [G2Affine::identity(); NUM_G2_POINTS]; 66 | 67 | _g1_points.iter().enumerate().for_each(|(i, bytes)| { 68 | g1_points[i] = G1Affine::from_compressed_unchecked(bytes) 69 | .expect("load_trusted_setup Invalid g1 bytes"); 70 | }); 71 | 72 | _g2_points.iter().enumerate().for_each(|(i, bytes)| { 73 | g2_points[i] = G2Affine::from_compressed_unchecked(bytes) 74 | .expect("load_trusted_setup Invalid g2 bytes"); 75 | }); 76 | 77 | let _ = is_trusted_setup_in_lagrange_form(&g1_points, &g2_points); 78 | 79 | let bit_reversed_permutation = bit_reversal_permutation(&g1_points)?; 80 | let g1_points = bit_reversed_permutation; 81 | 82 | Ok(KzgSettingsOwned { 83 | roots_of_unity, 84 | g1_points, 85 | g2_points, 86 | }) 87 | } 88 | 89 | fn bit_reversal_permutation(array: &[T]) -> Result<[T; N], KzgError> 90 | where 91 | T: Default + Copy, 92 | { 93 | let n = array.len(); 94 | assert!(n.is_power_of_two(), "n must be a power of 2"); 95 | 96 | let mut bit_reversed_permutation = [T::default(); N]; 97 | let unused_bit_len = array.len().leading_zeros(); 98 | 99 | for (i, item) in array.iter().enumerate().take(n) { 100 | let r = i.reverse_bits() >> (unused_bit_len + 1); 101 | bit_reversed_permutation[r] = *item; 102 | } 103 | 104 | Ok(bit_reversed_permutation) 105 | } 106 | 107 | fn is_trusted_setup_in_lagrange_form( 108 | g1_points: &[G1Affine], 109 | g2_points: &[G2Affine], 110 | ) -> Result<(), KzgError> { 111 | let n1 = g1_points.len(); 112 | let n2 = g2_points.len(); 113 | 114 | if n1 < 2 || n2 < 2 { 115 | return Err(KzgError::BadArgs("invalid args".to_string())); 116 | } 117 | 118 | let a1 = g1_points[1]; 119 | let a2 = g2_points[0]; 120 | let b1 = g1_points[0]; 121 | let b2 = g2_points[1]; 122 | 123 | let is_monomial_form = pairings_verify(a1, a2, b1, b2); 124 | if !is_monomial_form { 125 | return Err(KzgError::BadArgs("not in monomial form".to_string())); 126 | } 127 | 128 | Ok(()) 129 | } 130 | 131 | fn compute_roots_of_unity(max_scale: usize) -> Result<[Scalar; N], KzgError> { 132 | if max_scale >= SCALE2_ROOT_OF_UNITY.len() { 133 | return Err(KzgError::BadArgs(format!( 134 | "The max scale should be lower than {}", 135 | SCALE2_ROOT_OF_UNITY.len() 136 | ))); 137 | } 138 | 139 | let root_of_unity = Scalar::from_raw(SCALE2_ROOT_OF_UNITY[max_scale]); 140 | let mut expanded_roots = expand_root_of_unity(root_of_unity, N)?; 141 | let _ = expanded_roots.pop(); 142 | 143 | bit_reversal_permutation(&expanded_roots) 144 | } 145 | 146 | fn expand_root_of_unity(root: Scalar, width: usize) -> Result, KzgError> { 147 | if width < 2 { 148 | return Err(KzgError::BadArgs( 149 | "The width must be greater or equal to 2".to_string(), 150 | )); 151 | } 152 | 153 | let mut expanded = vec![Scalar::one(), root]; 154 | 155 | for _ in 2..=width { 156 | let current = expanded.last().unwrap() * root; 157 | expanded.push(current); 158 | if current == Scalar::one() { 159 | break; 160 | } 161 | } 162 | 163 | if expanded.last().unwrap() != &Scalar::one() { 164 | return Err(KzgError::InvalidBytesLength( 165 | "The last element value should be equal to 1".to_string(), 166 | )); 167 | } 168 | 169 | Ok(expanded) 170 | } 171 | 172 | let out_dir = env::var("OUT_DIR").unwrap(); 173 | let g1_path = Path::new(&out_dir).join("g1.bin"); 174 | let g2_path = Path::new(&out_dir).join("g2.bin"); 175 | let roots_of_unity_path = Path::new(&out_dir).join("roots_of_unity.bin"); 176 | 177 | let g1_exists = g1_path.exists(); 178 | let g2_exists = g2_path.exists(); 179 | let roots_of_unity_exists = roots_of_unity_path.exists(); 180 | 181 | if g1_exists && g2_exists && roots_of_unity_exists { 182 | println!("cargo:rerun-if-changed=src/trusted_setup.rs"); // Re-run this build script if the `g1.bin`,`g2.bin`, or `roots_of_unity.bin` files are changed 183 | } 184 | 185 | let KzgSettingsOwned { 186 | roots_of_unity, 187 | g1_points, 188 | g2_points, 189 | } = load_trusted_setup_file_brute().unwrap(); 190 | 191 | let mut roots_of_unity_bytes: Vec = Vec::new(); 192 | let mut g1_bytes: Vec = Vec::new(); 193 | let mut g2_bytes: Vec = Vec::new(); 194 | 195 | roots_of_unity.iter().for_each(|&v| { 196 | roots_of_unity_bytes 197 | .extend_from_slice(unsafe { &std::mem::transmute::(v) }); 198 | }); 199 | 200 | g1_points.iter().for_each(|&v| { 201 | g1_bytes.extend_from_slice(unsafe { &std::mem::transmute::(v) }); 202 | }); 203 | 204 | g2_points.iter().for_each(|&v| { 205 | g2_bytes.extend_from_slice(unsafe { &std::mem::transmute::(v) }); 206 | }); 207 | 208 | let mut roots_of_unity_file = fs::OpenOptions::new() 209 | .create(true) 210 | .truncate(true) 211 | .write(true) 212 | .open(&roots_of_unity_path) 213 | .unwrap(); 214 | 215 | roots_of_unity_file 216 | .write_all(&roots_of_unity_bytes) 217 | .unwrap(); 218 | 219 | let mut g1_file = fs::OpenOptions::new() 220 | .create(true) 221 | .truncate(true) 222 | .write(true) 223 | .open(&g1_path) 224 | .unwrap(); 225 | 226 | g1_file.write_all(&g1_bytes).unwrap(); 227 | 228 | let mut g2_file = fs::OpenOptions::new() 229 | .create(true) 230 | .truncate(true) 231 | .write(true) 232 | .open(&g2_path) 233 | .unwrap(); 234 | 235 | g2_file.write_all(&g2_bytes).unwrap(); 236 | } 237 | 238 | #[cfg(any(target_arch = "riscv32", doc))] 239 | fn main() { 240 | // Binaries cannot be built in a RISC-V environment or when building docs 241 | } 242 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "stable" 3 | components = ["llvm-tools", "rustc-dev"] -------------------------------------------------------------------------------- /src/consts.rs: -------------------------------------------------------------------------------- 1 | pub const BYTES_PER_G1_POINT: usize = 48; 2 | pub const BYTES_PER_G2_POINT: usize = 96; 3 | pub const BYTES_PER_FIELD_ELEMENT: usize = 32; 4 | pub const NUM_G1_POINTS: usize = 4096; 5 | pub const NUM_G2_POINTS: usize = 65; 6 | pub const NUM_ROOTS_OF_UNITY: usize = 4096; 7 | pub const NUM_FIELD_ELEMENTS_PER_BLOB: usize = 4096; 8 | pub const BYTES_PER_BLOB: usize = NUM_FIELD_ELEMENTS_PER_BLOB * BYTES_PER_FIELD_ELEMENT; 9 | pub const BYTES_PER_COMMITMENT: usize = 48; 10 | pub const BYTES_PER_PROOF: usize = 48; 11 | pub const DOMAIN_STR_LENGTH: usize = 16; 12 | pub const CHALLENGE_INPUT_SIZE: usize = 13 | DOMAIN_STR_LENGTH + 16 + BYTES_PER_BLOB + BYTES_PER_COMMITMENT; 14 | pub const FIAT_SHAMIR_PROTOCOL_DOMAIN: &str = "FSBLOBVERIFY_V1_"; 15 | pub const RANDOM_CHALLENGE_KZG_BATCH_DOMAIN: &str = "RCKZGBATCH___V1_"; 16 | 17 | pub const SCALE2_ROOT_OF_UNITY: [[u64; 4]; 32] = [ 18 | [ 19 | 0x0000000000000001, 20 | 0x0000000000000000, 21 | 0x0000000000000000, 22 | 0x0000000000000000, 23 | ], 24 | [ 25 | 0xffffffff00000000, 26 | 0x53bda402fffe5bfe, 27 | 0x3339d80809a1d805, 28 | 0x73eda753299d7d48, 29 | ], 30 | [ 31 | 0x0001000000000000, 32 | 0xec03000276030000, 33 | 0x8d51ccce760304d0, 34 | 0x0000000000000000, 35 | ], 36 | [ 37 | 0x7228fd3397743f7a, 38 | 0xb38b21c28713b700, 39 | 0x8c0625cd70d77ce2, 40 | 0x345766f603fa66e7, 41 | ], 42 | [ 43 | 0x53ea61d87742bcce, 44 | 0x17beb312f20b6f76, 45 | 0xdd1c0af834cec32c, 46 | 0x20b1ce9140267af9, 47 | ], 48 | [ 49 | 0x360c60997369df4e, 50 | 0xbf6e88fb4c38fb8a, 51 | 0xb4bcd40e22f55448, 52 | 0x50e0903a157988ba, 53 | ], 54 | [ 55 | 0x8140d032f0a9ee53, 56 | 0x2d967f4be2f95155, 57 | 0x14a1e27164d8fdbd, 58 | 0x45af6345ec055e4d, 59 | ], 60 | [ 61 | 0x5130c2c1660125be, 62 | 0x98d0caac87f5713c, 63 | 0xb7c68b4d7fdd60d0, 64 | 0x6898111413588742, 65 | ], 66 | [ 67 | 0x4935bd2f817f694b, 68 | 0x0a0865a899e8deff, 69 | 0x6b368121ac0cf4ad, 70 | 0x4f9b4098e2e9f12e, 71 | ], 72 | [ 73 | 0x4541b8ff2ee0434e, 74 | 0xd697168a3a6000fe, 75 | 0x39feec240d80689f, 76 | 0x095166525526a654, 77 | ], 78 | [ 79 | 0x3c28d666a5c2d854, 80 | 0xea437f9626fc085e, 81 | 0x8f4de02c0f776af3, 82 | 0x325db5c3debf77a1, 83 | ], 84 | [ 85 | 0x4a838b5d59cd79e5, 86 | 0x55ea6811be9c622d, 87 | 0x09f1ca610a08f166, 88 | 0x6d031f1b5c49c834, 89 | ], 90 | [ 91 | 0xe206da11a5d36306, 92 | 0x0ad1347b378fbf96, 93 | 0xfc3e8acfe0f8245f, 94 | 0x564c0a11a0f704f4, 95 | ], 96 | [ 97 | 0x6fdd00bfc78c8967, 98 | 0x146b58bc434906ac, 99 | 0x2ccddea2972e89ed, 100 | 0x485d512737b1da3d, 101 | ], 102 | [ 103 | 0x034d2ff22a5ad9e1, 104 | 0xae4622f6a9152435, 105 | 0xdc86b01c0d477fa6, 106 | 0x56624634b500a166, 107 | ], 108 | [ 109 | 0xfbd047e11279bb6e, 110 | 0xc8d5f51db3f32699, 111 | 0x483405417a0cbe39, 112 | 0x3291357ee558b50d, 113 | ], 114 | [ 115 | 0xd7118f85cd96b8ad, 116 | 0x67a665ae1fcadc91, 117 | 0x88f39a78f1aeb578, 118 | 0x2155379d12180caa, 119 | ], 120 | [ 121 | 0x08692405f3b70f10, 122 | 0xcd7f2bd6d0711b7d, 123 | 0x473a2eef772c33d6, 124 | 0x224262332d8acbf4, 125 | ], 126 | [ 127 | 0x6f421a7d8ef674fb, 128 | 0xbb97a3bf30ce40fd, 129 | 0x652f717ae1c34bb0, 130 | 0x2d3056a530794f01, 131 | ], 132 | [ 133 | 0x194e8c62ecb38d9d, 134 | 0xad8e16e84419c750, 135 | 0xdf625e80d0adef90, 136 | 0x520e587a724a6955, 137 | ], 138 | [ 139 | 0xfece7e0e39898d4b, 140 | 0x2f69e02d265e09d9, 141 | 0xa57a6e07cb98de4a, 142 | 0x03e1c54bcb947035, 143 | ], 144 | [ 145 | 0xcd3979122d3ea03a, 146 | 0x46b3105f04db5844, 147 | 0xc70d0874b0691d4e, 148 | 0x47c8b5817018af4f, 149 | ], 150 | [ 151 | 0xc6e7a6ffb08e3363, 152 | 0xe08fec7c86389bee, 153 | 0xf2d38f10fbb8d1bb, 154 | 0x0abe6a5e5abcaa32, 155 | ], 156 | [ 157 | 0x5616c57de0ec9eae, 158 | 0xc631ffb2585a72db, 159 | 0x5121af06a3b51e3c, 160 | 0x73560252aa0655b2, 161 | ], 162 | [ 163 | 0x92cf4deb77bd779c, 164 | 0x72cf6a8029b7d7bc, 165 | 0x6e0bcd91ee762730, 166 | 0x291cf6d68823e687, 167 | ], 168 | [ 169 | 0xce32ef844e11a51e, 170 | 0xc0ba12bb3da64ca5, 171 | 0x0454dc1edc61a1a3, 172 | 0x019fe632fd328739, 173 | ], 174 | [ 175 | 0x531a11a0d2d75182, 176 | 0x02c8118402867ddc, 177 | 0x116168bffbedc11d, 178 | 0x0a0a77a3b1980c0d, 179 | ], 180 | [ 181 | 0xe2d0a7869f0319ed, 182 | 0xb94f1101b1d7a628, 183 | 0xece8ea224f31d25d, 184 | 0x23397a9300f8f98b, 185 | ], 186 | [ 187 | 0xd7b688830a4f2089, 188 | 0x6558e9e3f6ac7b41, 189 | 0x99e276b571905a7d, 190 | 0x52dd465e2f094256, 191 | ], 192 | [ 193 | 0x474650359d8e211b, 194 | 0x84d37b826214abc6, 195 | 0x8da40c1ef2bb4598, 196 | 0x0c83ea7744bf1bee, 197 | ], 198 | [ 199 | 0x694341f608c9dd56, 200 | 0xed3a181fabb30adc, 201 | 0x1339a815da8b398f, 202 | 0x2c6d4e4511657e1e, 203 | ], 204 | [ 205 | 0x63e7cb4906ffc93f, 206 | 0xf070bb00e28a193d, 207 | 0xad1715b02e5713b5, 208 | 0x4b5371495990693f, 209 | ], 210 | ]; 211 | 212 | /// Constant representing the modulus 213 | /// q = 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001 214 | pub const MODULUS: [u64; 4] = [ 215 | 0xffff_ffff_0000_0001, 216 | 0x53bd_a402_fffe_5bfe, 217 | 0x3339_d808_09a1_d805, 218 | 0x73ed_a753_299d_7d48, 219 | ]; 220 | -------------------------------------------------------------------------------- /src/dtypes.rs: -------------------------------------------------------------------------------- 1 | use crate::enums::KzgError; 2 | use crate::kzg_proof::safe_scalar_affine_from_bytes; 3 | use crate::{BYTES_PER_BLOB, BYTES_PER_FIELD_ELEMENT}; 4 | use alloc::{string::ToString, vec::Vec}; 5 | use bls12_381::Scalar; 6 | 7 | macro_rules! define_bytes_type { 8 | ($name:ident, $size:expr) => { 9 | #[cfg_attr( 10 | feature = "rkyv", 11 | derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize) 12 | )] 13 | #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 14 | #[derive(Debug, Clone)] 15 | pub struct $name( 16 | #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))] pub [u8; $size], 17 | ); 18 | 19 | impl $name { 20 | pub fn from_slice(slice: &[u8]) -> Result { 21 | if slice.len() != $size { 22 | return Err(KzgError::InvalidBytesLength( 23 | "Invalid slice length".to_string(), 24 | )); 25 | } 26 | let mut bytes = [0u8; $size]; 27 | bytes.copy_from_slice(slice); 28 | Ok($name(bytes)) 29 | } 30 | 31 | pub fn as_slice(&self) -> &[u8] { 32 | &self.0 33 | } 34 | } 35 | 36 | impl From<$name> for [u8; $size] { 37 | fn from(value: $name) -> [u8; $size] { 38 | value.0 39 | } 40 | } 41 | }; 42 | } 43 | 44 | define_bytes_type!(Bytes32, 32); 45 | define_bytes_type!(Bytes48, 48); 46 | define_bytes_type!(Blob, BYTES_PER_BLOB); 47 | 48 | impl Blob { 49 | pub fn as_polynomial(&self) -> Result, KzgError> { 50 | self.0 51 | .chunks(BYTES_PER_FIELD_ELEMENT) 52 | .map(|slice| { 53 | Bytes32::from_slice(slice).and_then(|bytes| safe_scalar_affine_from_bytes(&bytes)) 54 | }) 55 | .collect() 56 | } 57 | } 58 | 59 | #[cfg(test)] 60 | mod tests { 61 | #[test] 62 | fn test_bytes32() { 63 | let bytes = crate::dtypes::Bytes32::from_slice(&[0u8; 32]).unwrap(); 64 | assert_eq!(bytes.0.len(), 32); 65 | } 66 | 67 | #[test] 68 | fn test_bytes48() { 69 | let bytes = crate::dtypes::Bytes48::from_slice(&[0u8; 48]).unwrap(); 70 | assert_eq!(bytes.0.len(), 48); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/enums.rs: -------------------------------------------------------------------------------- 1 | extern crate alloc; 2 | 3 | use alloc::string::String; 4 | use core::fmt; 5 | 6 | #[derive(Debug, Clone)] 7 | pub enum KzgError { 8 | /// The supplied data is invalid in some way. 9 | BadArgs(String), 10 | /// Internal error - this should never occur. 11 | InternalError, 12 | /// The provided bytes are of incorrect length. 13 | InvalidBytesLength(String), 14 | /// Error when converting from hex to bytes. 15 | InvalidHexFormat(String), 16 | /// The provided trusted setup params are invalid. 17 | InvalidTrustedSetup(String), 18 | } 19 | 20 | impl fmt::Display for KzgError { 21 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 22 | match self { 23 | Self::BadArgs(s) 24 | | Self::InvalidBytesLength(s) 25 | | Self::InvalidHexFormat(s) 26 | | Self::InvalidTrustedSetup(s) => f.write_str(s), 27 | Self::InternalError => f.write_str("Internal error"), 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/kzg_proof.rs: -------------------------------------------------------------------------------- 1 | use core::num::NonZeroUsize; 2 | use core::ops::Mul; 3 | 4 | use crate::enums::KzgError; 5 | use crate::trusted_setup::KzgSettings; 6 | use crate::{ 7 | dtypes::*, pairings_verify, BYTES_PER_BLOB, BYTES_PER_COMMITMENT, BYTES_PER_FIELD_ELEMENT, 8 | BYTES_PER_PROOF, CHALLENGE_INPUT_SIZE, DOMAIN_STR_LENGTH, FIAT_SHAMIR_PROTOCOL_DOMAIN, MODULUS, 9 | NUM_FIELD_ELEMENTS_PER_BLOB, RANDOM_CHALLENGE_KZG_BATCH_DOMAIN, 10 | }; 11 | 12 | use alloc::{string::ToString, vec::Vec}; 13 | use bls12_381::{G1Affine, G1Projective, G2Affine, G2Projective, Scalar}; 14 | use ff::derive::sbb; 15 | use sha2::{Digest, Sha256}; 16 | 17 | pub fn safe_g1_affine_from_bytes(bytes: &Bytes48) -> Result { 18 | let g1 = G1Affine::from_compressed(&(bytes.clone().into())); 19 | if g1.is_none().into() { 20 | return Err(KzgError::BadArgs( 21 | "Failed to parse G1Affine from bytes".to_string(), 22 | )); 23 | } 24 | Ok(g1.unwrap()) 25 | } 26 | 27 | pub fn safe_scalar_affine_from_bytes(bytes: &Bytes32) -> Result { 28 | let lendian: [u8; 32] = Into::<[u8; 32]>::into(bytes.clone()) 29 | .iter() 30 | .rev() 31 | .copied() 32 | .collect::>() 33 | .try_into() 34 | .unwrap(); 35 | 36 | let scalar = Scalar::from_bytes(&lendian); 37 | if scalar.is_none().into() { 38 | return Err(KzgError::BadArgs( 39 | "Failed to parse G1Affine from bytes".to_string(), 40 | )); 41 | } 42 | Ok(scalar.unwrap()) 43 | } 44 | 45 | /// Return the Fiat-Shamir challenge required to verify `blob` and `commitment`. 46 | pub fn compute_challenge(blob: &Blob, commitment: &G1Affine) -> Result { 47 | let mut bytes = [0_u8; CHALLENGE_INPUT_SIZE]; 48 | let mut offset = 0_usize; 49 | // Copy domain separator 50 | bytes[offset..DOMAIN_STR_LENGTH].copy_from_slice(FIAT_SHAMIR_PROTOCOL_DOMAIN.as_bytes()); 51 | offset += DOMAIN_STR_LENGTH; 52 | // Copy polynomial degree (16-bytes, big-endian) 53 | bytes[offset..offset + 8].copy_from_slice(&0_u64.to_be_bytes()); 54 | offset += 8; 55 | bytes[offset..offset + 8].copy_from_slice(&(NUM_FIELD_ELEMENTS_PER_BLOB as u64).to_be_bytes()); 56 | offset += 8; 57 | // Copy blob 58 | bytes[offset..offset + BYTES_PER_BLOB].copy_from_slice(blob.as_slice()); 59 | offset += BYTES_PER_BLOB; 60 | // Copy commitment 61 | bytes[offset..offset + BYTES_PER_COMMITMENT].copy_from_slice(&commitment.to_compressed()); 62 | offset += BYTES_PER_COMMITMENT; 63 | /* Make sure we wrote the entire buffer */ 64 | if offset != CHALLENGE_INPUT_SIZE { 65 | return Err(KzgError::InvalidBytesLength(format!( 66 | "The challenge should be {} length, but was {}", 67 | CHALLENGE_INPUT_SIZE, offset, 68 | ))); 69 | } 70 | let evaluation: [u8; 32] = Sha256::digest(bytes).into(); 71 | Ok(scalar_from_bytes_unchecked(evaluation)) 72 | } 73 | 74 | pub fn scalar_from_bytes_unchecked(bytes: [u8; 32]) -> Scalar { 75 | scalar_from_u64_array_unchecked([ 76 | u64::from_be_bytes(<[u8; 8]>::try_from(&bytes[0..8]).unwrap()), 77 | u64::from_be_bytes(<[u8; 8]>::try_from(&bytes[8..16]).unwrap()), 78 | u64::from_be_bytes(<[u8; 8]>::try_from(&bytes[16..24]).unwrap()), 79 | u64::from_be_bytes(<[u8; 8]>::try_from(&bytes[24..32]).unwrap()), 80 | ]) 81 | } 82 | 83 | pub fn scalar_from_u64_array_unchecked(array: [u64; 4]) -> Scalar { 84 | // Try to subtract the modulus 85 | let (_, borrow) = sbb(array[0], MODULUS[0], 0); 86 | let (_, borrow) = sbb(array[1], MODULUS[1], borrow); 87 | let (_, borrow) = sbb(array[2], MODULUS[2], borrow); 88 | let (_, _borrow) = sbb(array[3], MODULUS[3], borrow); 89 | 90 | Scalar::from_raw([array[3], array[2], array[1], array[0]]) 91 | } 92 | 93 | /// Evaluates a polynomial in evaluation form at a given point 94 | pub fn evaluate_polynomial_in_evaluation_form( 95 | polynomial: Vec, 96 | x: Scalar, 97 | kzg_settings: &KzgSettings, 98 | ) -> Result { 99 | if polynomial.len() != NUM_FIELD_ELEMENTS_PER_BLOB { 100 | return Err(KzgError::InvalidBytesLength( 101 | "The polynomial length is incorrect".to_string(), 102 | )); 103 | } 104 | 105 | let mut inverses_in = vec![Scalar::default(); NUM_FIELD_ELEMENTS_PER_BLOB]; 106 | let mut inverses = vec![Scalar::default(); NUM_FIELD_ELEMENTS_PER_BLOB]; 107 | let roots_of_unity = kzg_settings.roots_of_unity; 108 | for i in 0..NUM_FIELD_ELEMENTS_PER_BLOB { 109 | if x == roots_of_unity[i] { 110 | return Ok(polynomial[i]); 111 | } 112 | inverses_in[i] = x - roots_of_unity[i]; 113 | } 114 | 115 | batch_inversion( 116 | &mut inverses, 117 | &inverses_in, 118 | NonZeroUsize::new(NUM_FIELD_ELEMENTS_PER_BLOB).unwrap(), 119 | )?; 120 | 121 | let mut out = Scalar::zero(); 122 | 123 | for i in 0..NUM_FIELD_ELEMENTS_PER_BLOB { 124 | out += (inverses[i] * roots_of_unity[i]) * polynomial[i]; 125 | } 126 | 127 | out *= Scalar::from(NUM_FIELD_ELEMENTS_PER_BLOB as u64) 128 | .invert() 129 | .unwrap(); 130 | out *= x.pow(&[NUM_FIELD_ELEMENTS_PER_BLOB as u64, 0, 0, 0]) - Scalar::one(); 131 | 132 | Ok(out) 133 | } 134 | 135 | /// Montgomery batch inversion in a finite field 136 | /// Given a list of elements \( x_1, x_2, \dots, x_n \) from a finite field \( F \), Montgomery batch inversion computes the inverses \( x_1^{-1}, x_2^{-1}, \dots, x_n^{-1} \) as follows: 137 | /// 138 | /// Let's consider three elements \( a \), \( b \), and \( c \) in a finite field \( F \). The steps are as follows: 139 | /// 140 | /// 1. **Product Accumulation**: 141 | /// ```text 142 | /// P = a × b × c 143 | /// ``` 144 | /// 145 | /// 2. **Single Inversion**: 146 | /// ```text 147 | /// P⁻¹ = inverse(P) 148 | /// ``` 149 | /// 150 | /// 3. **Backward Substitution**: 151 | /// - a⁻¹ = P⁻¹ × (b × c) 152 | /// - b⁻¹ = P⁻¹ × (a × c) 153 | /// - c⁻¹ = P⁻¹ × (a × b) 154 | /// 155 | pub fn batch_inversion( 156 | out: &mut [Scalar], 157 | a: &[Scalar], 158 | len: NonZeroUsize, 159 | ) -> Result<(), KzgError> { 160 | if a == out { 161 | return Err(KzgError::BadArgs( 162 | "Destination is the same as source".to_string(), 163 | )); 164 | } 165 | 166 | // Compute the product of all the elements: 167 | // 168 | // \[ 169 | // P = x_1 \times x_2 \times \dots \times x_n 170 | // \] 171 | 172 | let mut accumulator = Scalar::one(); 173 | 174 | for i in 0..len.into() { 175 | out[i] = accumulator; 176 | accumulator = accumulator.mul(&a[i]); 177 | } 178 | 179 | if accumulator == Scalar::zero() { 180 | return Err(KzgError::BadArgs("Zero input".to_string())); 181 | } 182 | 183 | // Compute the inverse of the product \( P \): 184 | // 185 | // \[ 186 | // P^{-1} = \text{inverse}(P) 187 | // \] 188 | accumulator = accumulator.invert().unwrap(); 189 | 190 | // Compute the inverse of each element \( x_i^{-1} \) by using the precomputed product and its inverse: 191 | // 192 | // \[ 193 | // x_i^{-1} = P^{-1} \times \left(\prod_{j \neq i} x_j \right) 194 | // \] 195 | for i in (0..len.into()).rev() { 196 | out[i] *= accumulator; 197 | accumulator *= a[i]; 198 | } 199 | 200 | Ok(()) 201 | } 202 | 203 | pub fn verify_kzg_proof_impl( 204 | commitment: G1Affine, 205 | z: Scalar, 206 | y: Scalar, 207 | proof: G1Affine, 208 | kzg_settings: &KzgSettings, 209 | ) -> Result { 210 | let x = G2Projective::generator() * z; 211 | let x_minus_z = kzg_settings.g2_points[1] - x; 212 | 213 | let y = G1Projective::generator() * y; 214 | let p_minus_y = commitment - y; 215 | 216 | // Verify: P - y = Q * (X - z) 217 | Ok(pairings_verify( 218 | p_minus_y.into(), 219 | G2Projective::generator().into(), 220 | proof, 221 | x_minus_z.into(), 222 | )) 223 | } 224 | 225 | pub fn validate_batched_input( 226 | commitment: &[G1Affine], 227 | proofs: &[G1Affine], 228 | ) -> Result<(), KzgError> { 229 | // Check if any commitment is invalid (not on curve or identity) 230 | let invalid_commitment = commitment.iter().any(|commitment| { 231 | !bool::from(commitment.is_identity()) && !bool::from(commitment.is_on_curve()) 232 | }); 233 | 234 | // Check if any proof is invalid (not on curve or identity) 235 | let invalid_proof = proofs 236 | .iter() 237 | .any(|proof| !bool::from(proof.is_identity()) && !bool::from(proof.is_on_curve())); 238 | 239 | // Return error if any invalid commitment is found 240 | if invalid_commitment { 241 | return Err(KzgError::BadArgs("Invalid commitment".to_string())); 242 | } 243 | // Return error if any invalid proof is found 244 | if invalid_proof { 245 | return Err(KzgError::BadArgs("Invalid proof".to_string())); 246 | } 247 | 248 | Ok(()) // Return Ok if all commitments and proofs are valid 249 | } 250 | 251 | pub fn compute_challenges_and_evaluate_polynomial( 252 | blobs: Vec, 253 | commitment: &[G1Affine], 254 | kzg_settings: &KzgSettings, 255 | ) -> Result<(Vec, Vec), KzgError> { 256 | // Initialize vectors to store evaluation challenges and polynomial evaluations 257 | let mut evaluation_challenges = Vec::with_capacity(blobs.len()); 258 | let mut ys = Vec::with_capacity(blobs.len()); 259 | 260 | // Iterate over each blob to compute its polynomial evaluation 261 | for i in 0..blobs.len() { 262 | // Convert the blob to its polynomial representation 263 | let polynomial = blobs[i].as_polynomial()?; 264 | // Compute the Fiat-Shamir challenge for the current blob and its commitment 265 | let evaluation_challenge = compute_challenge(&blobs[i], &commitment[i])?; 266 | // Evaluate the polynomial at the computed challenge 267 | let y = 268 | evaluate_polynomial_in_evaluation_form(polynomial, evaluation_challenge, kzg_settings)?; 269 | 270 | // Store the evaluation challenge and the polynomial evaluation 271 | evaluation_challenges.push(evaluation_challenge); 272 | ys.push(y); 273 | } 274 | 275 | // Return the vectors of evaluation challenges and polynomial evaluations 276 | Ok((evaluation_challenges, ys)) 277 | } 278 | 279 | pub fn compute_powers(base: &Scalar, num_powers: usize) -> Vec { 280 | let mut powers = vec![Scalar::default(); num_powers]; 281 | if num_powers == 0 { 282 | return powers; 283 | } 284 | powers[0] = Scalar::one(); 285 | for i in 1..num_powers { 286 | powers[i] = powers[i - 1].mul(base); 287 | } 288 | powers 289 | } 290 | 291 | pub fn compute_r_powers( 292 | commitment: &[G1Affine], 293 | zs: &[Scalar], 294 | ys: &[Scalar], 295 | proofs: &[G1Affine], 296 | ) -> Result, KzgError> { 297 | let n = commitment.len(); 298 | let input_size = 299 | 32 + n * (BYTES_PER_COMMITMENT + 2 * BYTES_PER_FIELD_ELEMENT + BYTES_PER_PROOF); 300 | 301 | let mut bytes: Vec = vec![0; input_size]; 302 | 303 | // Copy domain separator 304 | bytes[..16].copy_from_slice(RANDOM_CHALLENGE_KZG_BATCH_DOMAIN.as_bytes()); 305 | 306 | bytes[16..24].copy_from_slice(&(NUM_FIELD_ELEMENTS_PER_BLOB as u64).to_be_bytes()); 307 | 308 | let mut n_bytes = n.to_be_bytes().to_vec(); 309 | n_bytes.resize(8, 0); 310 | bytes[24..32].copy_from_slice(&n_bytes); 311 | 312 | let mut offset = 32; 313 | 314 | for i in 0..n { 315 | // Copy commitment 316 | let v = commitment[i].to_compressed(); 317 | bytes[offset..(v.len() + offset)].copy_from_slice(&v[..]); 318 | offset += BYTES_PER_COMMITMENT; 319 | 320 | // Copy evaluation challenge 321 | let v = zs[i].to_bytes(); 322 | bytes[offset..(v.len() + offset)].copy_from_slice(&v[..]); 323 | offset += BYTES_PER_FIELD_ELEMENT; 324 | 325 | // Copy polynomial's evaluation value 326 | let v = ys[i].to_bytes(); 327 | bytes[offset..(v.len() + offset)].copy_from_slice(&v[..]); 328 | offset += BYTES_PER_FIELD_ELEMENT; 329 | 330 | // Copy proof 331 | let v = proofs[i].to_compressed(); 332 | bytes[offset..(v.len() + offset)].copy_from_slice(&v[..]); 333 | offset += BYTES_PER_PROOF; 334 | } 335 | 336 | // Make sure we wrote the entire buffer 337 | if offset != input_size { 338 | return Err(KzgError::InvalidBytesLength( 339 | "Error while copying commitments".to_string(), 340 | )); 341 | } 342 | 343 | // Now let's create the challenge! 344 | let evaluation: [u8; 32] = Sha256::digest(bytes).into(); 345 | let r = scalar_from_bytes_unchecked(evaluation); 346 | 347 | Ok(compute_powers(&r, n)) 348 | } 349 | 350 | pub struct KzgProof {} 351 | 352 | impl KzgProof { 353 | pub fn verify_kzg_proof( 354 | commitment_bytes: &Bytes48, 355 | z_bytes: &Bytes32, 356 | y_bytes: &Bytes32, 357 | proof_bytes: &Bytes48, 358 | kzg_settings: &KzgSettings, 359 | ) -> Result { 360 | let z = match safe_scalar_affine_from_bytes(z_bytes) { 361 | Ok(z) => z, 362 | Err(e) => { 363 | return Err(e); 364 | } 365 | }; 366 | let y = match safe_scalar_affine_from_bytes(y_bytes) { 367 | Ok(y) => y, 368 | Err(e) => { 369 | return Err(e); 370 | } 371 | }; 372 | let commitment = match safe_g1_affine_from_bytes(commitment_bytes) { 373 | Ok(g1) => g1, 374 | Err(e) => { 375 | return Err(e); 376 | } 377 | }; 378 | let proof = match safe_g1_affine_from_bytes(proof_bytes) { 379 | Ok(g1) => g1, 380 | Err(e) => { 381 | return Err(e); 382 | } 383 | }; 384 | 385 | let g2_x = G2Affine::generator() * z; 386 | let x_minus_z = kzg_settings.g2_points[1] - g2_x; 387 | 388 | let g1_y = G1Affine::generator() * y; 389 | let p_minus_y = commitment - g1_y; 390 | 391 | Ok(pairings_verify( 392 | p_minus_y.into(), 393 | G2Affine::generator(), 394 | proof, 395 | x_minus_z.into(), 396 | )) 397 | } 398 | 399 | pub fn verify_kzg_proof_batch( 400 | commitments: &[G1Affine], 401 | zs: &[Scalar], 402 | ys: &[Scalar], 403 | proofs: &[G1Affine], 404 | kzg_settings: &KzgSettings, 405 | ) -> Result { 406 | let n = commitments.len(); 407 | 408 | // Initialize vectors to store intermediate values 409 | let mut c_minus_y: Vec = Vec::with_capacity(n); 410 | let mut r_times_z: Vec = Vec::with_capacity(n); 411 | 412 | // Compute r powers 413 | let r_powers = compute_r_powers(commitments, zs, ys, proofs)?; 414 | 415 | // Convert proofs to G1Projective 416 | let proofs = proofs.iter().map(Into::into).collect::>(); 417 | 418 | // Compute proof linear combination 419 | let proof_lincomb = G1Projective::msm_variable_base(&proofs, &r_powers); 420 | 421 | // Compute c_minus_y and r_times_z 422 | for i in 0..n { 423 | let ys_encrypted = G1Affine::generator() * ys[i]; 424 | c_minus_y.push(commitments[i] - ys_encrypted); 425 | r_times_z.push(r_powers[i] * zs[i]); 426 | } 427 | 428 | // Compute proof_z_lincomb and c_minus_y_lincomb 429 | let proof_z_lincomb = G1Projective::msm_variable_base(&proofs, &r_times_z); 430 | let c_minus_y_lincomb = G1Projective::msm_variable_base(&c_minus_y, &r_powers); 431 | 432 | // Compute rhs_g1 433 | let rhs_g1 = c_minus_y_lincomb + proof_z_lincomb; 434 | 435 | // Verify the pairing equation 436 | let result = pairings_verify( 437 | proof_lincomb.into(), 438 | kzg_settings.g2_points[1], 439 | rhs_g1.into(), 440 | G2Affine::generator(), 441 | ); 442 | 443 | Ok(result) 444 | } 445 | 446 | pub fn verify_blob_kzg_proof( 447 | blob: Blob, 448 | commitment_bytes: &Bytes48, 449 | proof_bytes: &Bytes48, 450 | kzg_settings: &KzgSettings, 451 | ) -> Result { 452 | // Convert commitment bytes to G1Affine 453 | let commitment = safe_g1_affine_from_bytes(commitment_bytes)?; 454 | 455 | // Convert blob to polynomial 456 | let polynomial = blob.as_polynomial()?; 457 | 458 | // Convert proof bytes to G1Affine 459 | let proof = safe_g1_affine_from_bytes(proof_bytes)?; 460 | 461 | // Compute the evaluation challenge for the blob and commitment 462 | let evaluation_challenge = compute_challenge(&blob, &commitment)?; 463 | 464 | // Evaluate the polynomial in evaluation form 465 | let y = 466 | evaluate_polynomial_in_evaluation_form(polynomial, evaluation_challenge, kzg_settings)?; 467 | 468 | // Verify the KZG proof 469 | verify_kzg_proof_impl(commitment, evaluation_challenge, y, proof, kzg_settings) 470 | } 471 | 472 | pub fn verify_blob_kzg_proof_batch( 473 | blobs: Vec, 474 | commitments_bytes: Vec, 475 | proofs_bytes: Vec, 476 | kzg_settings: &KzgSettings, 477 | ) -> Result { 478 | if blobs.is_empty() { 479 | return Ok(true); 480 | } 481 | 482 | if blobs.len() == 1 { 483 | return Self::verify_blob_kzg_proof( 484 | blobs[0].clone(), 485 | &commitments_bytes[0], 486 | &proofs_bytes[0], 487 | kzg_settings, 488 | ); 489 | } 490 | 491 | if blobs.len() != commitments_bytes.len() { 492 | return Err(KzgError::InvalidBytesLength( 493 | "Invalid commitments length".to_string(), 494 | )); 495 | } 496 | 497 | if blobs.len() != proofs_bytes.len() { 498 | return Err(KzgError::InvalidBytesLength( 499 | "Invalid proofs length".to_string(), 500 | )); 501 | } 502 | 503 | let commitments = commitments_bytes 504 | .iter() 505 | .map(safe_g1_affine_from_bytes) 506 | .collect::, _>>()?; 507 | 508 | let proofs = proofs_bytes 509 | .iter() 510 | .map(safe_g1_affine_from_bytes) 511 | .collect::, _>>()?; 512 | 513 | validate_batched_input(&commitments, &proofs)?; 514 | 515 | let (evaluation_challenges, ys) = 516 | compute_challenges_and_evaluate_polynomial(blobs, &commitments, kzg_settings)?; 517 | 518 | Self::verify_kzg_proof_batch( 519 | &commitments, 520 | &evaluation_challenges, 521 | &ys, 522 | &proofs, 523 | kzg_settings, 524 | ) 525 | } 526 | } 527 | 528 | #[cfg(test)] 529 | pub mod tests { 530 | use super::*; 531 | use crate::test_files::{ 532 | VERIFY_BLOB_KZG_PROOF_BATCH_TESTS, VERIFY_BLOB_KZG_PROOF_TESTS, VERIFY_KZG_PROOF_TESTS, 533 | }; 534 | use serde_derive::Deserialize; 535 | 536 | trait FromHex { 537 | fn from_hex(hex: &str) -> Result 538 | where 539 | Self: Sized; 540 | } 541 | 542 | fn hex_to_bytes(hex_str: &str) -> Result, KzgError> { 543 | let trimmed_str = hex_str.strip_prefix("0x").unwrap_or(hex_str); 544 | hex::decode(trimmed_str) 545 | .map_err(|e| KzgError::InvalidHexFormat(format!("Failed to decode hex: {}", e))) 546 | } 547 | 548 | impl FromHex for Bytes48 { 549 | fn from_hex(hex_str: &str) -> Result { 550 | Self::from_slice(&hex_to_bytes(hex_str).unwrap()) 551 | } 552 | } 553 | 554 | impl FromHex for Bytes32 { 555 | fn from_hex(hex_str: &str) -> Result { 556 | Self::from_slice(&hex_to_bytes(hex_str).unwrap()) 557 | } 558 | } 559 | 560 | impl FromHex for Blob { 561 | fn from_hex(hex_str: &str) -> Result { 562 | Self::from_slice(&hex_to_bytes(hex_str).unwrap()) 563 | } 564 | } 565 | 566 | #[derive(Debug, Deserialize)] 567 | pub struct Input<'a> { 568 | commitment: &'a str, 569 | z: &'a str, 570 | y: &'a str, 571 | proof: &'a str, 572 | } 573 | 574 | impl Input<'_> { 575 | pub fn get_commitment(&self) -> Result { 576 | Bytes48::from_hex(self.commitment) 577 | } 578 | 579 | pub fn get_z(&self) -> Result { 580 | Bytes32::from_hex(self.z) 581 | } 582 | 583 | pub fn get_y(&self) -> Result { 584 | Bytes32::from_hex(self.y) 585 | } 586 | 587 | pub fn get_proof(&self) -> Result { 588 | Bytes48::from_hex(self.proof) 589 | } 590 | } 591 | 592 | #[derive(Debug, Deserialize)] 593 | pub struct Test { 594 | pub input: I, 595 | output: Option, 596 | } 597 | 598 | impl Test { 599 | pub fn get_output(&self) -> Option { 600 | self.output 601 | } 602 | } 603 | 604 | #[test] 605 | pub fn test_verify_kzg_proof() { 606 | let kzg_settings = KzgSettings::load_trusted_setup_file().unwrap(); 607 | let test_files = VERIFY_KZG_PROOF_TESTS; 608 | 609 | for (_test_file, data) in test_files { 610 | let test: Test = serde_yaml::from_str(data).unwrap(); 611 | let (Ok(commitment), Ok(z), Ok(y), Ok(proof)) = ( 612 | test.input.get_commitment(), 613 | test.input.get_z(), 614 | test.input.get_y(), 615 | test.input.get_proof(), 616 | ) else { 617 | assert!(test.get_output().is_none()); 618 | continue; 619 | }; 620 | 621 | let result = KzgProof::verify_kzg_proof(&commitment, &z, &y, &proof, &kzg_settings); 622 | match result { 623 | Ok(result) => { 624 | assert_eq!(result, test.get_output().unwrap_or(false)); 625 | } 626 | Err(_) => { 627 | assert!(test.get_output().is_none()); 628 | } 629 | } 630 | } 631 | } 632 | 633 | #[derive(Debug, Deserialize)] 634 | pub struct BlobInput<'a> { 635 | blob: &'a str, 636 | commitment: &'a str, 637 | proof: &'a str, 638 | } 639 | 640 | impl BlobInput<'_> { 641 | pub fn get_blob(&self) -> Result { 642 | Blob::from_hex(self.blob) 643 | } 644 | 645 | pub fn get_commitment(&self) -> Result { 646 | Bytes48::from_hex(self.commitment) 647 | } 648 | 649 | pub fn get_proof(&self) -> Result { 650 | Bytes48::from_hex(self.proof) 651 | } 652 | } 653 | 654 | #[test] 655 | pub fn test_verify_blob_kzg_proof() { 656 | let kzg_settings = KzgSettings::load_trusted_setup_file().unwrap(); 657 | let test_files = VERIFY_BLOB_KZG_PROOF_TESTS; 658 | 659 | for (_test_file, data) in test_files { 660 | let test: Test = serde_yaml::from_str(data).unwrap(); 661 | let (Ok(blob), Ok(commitment), Ok(proof)) = ( 662 | test.input.get_blob(), 663 | test.input.get_commitment(), 664 | test.input.get_proof(), 665 | ) else { 666 | assert!(test.get_output().is_none()); 667 | continue; 668 | }; 669 | 670 | let result = KzgProof::verify_blob_kzg_proof(blob, &commitment, &proof, &kzg_settings); 671 | match result { 672 | Ok(result) => { 673 | assert_eq!(result, test.get_output().unwrap_or(false)); 674 | } 675 | Err(_) => { 676 | assert!(test.get_output().is_none()); 677 | } 678 | } 679 | } 680 | } 681 | 682 | #[derive(Debug, Deserialize)] 683 | struct BlobBatchInput<'a> { 684 | #[serde(borrow)] 685 | blob: &'a str, 686 | #[serde(borrow)] 687 | commitment: &'a str, 688 | #[serde(borrow)] 689 | proof: &'a str, 690 | } 691 | 692 | impl BlobBatchInput<'_> { 693 | pub fn get_blobs(&self) -> Result { 694 | Blob::from_hex(self.blob) 695 | } 696 | 697 | pub fn get_commitments(&self) -> Result { 698 | Bytes48::from_hex(self.commitment) 699 | } 700 | 701 | pub fn get_proofs(&self) -> Result { 702 | Bytes48::from_hex(self.proof) 703 | } 704 | } 705 | 706 | #[test] 707 | pub fn test_verify_blob_kzg_proof_batch() { 708 | let test_files = VERIFY_BLOB_KZG_PROOF_BATCH_TESTS; 709 | let kzg_settings = KzgSettings::load_trusted_setup_file().unwrap(); 710 | 711 | for (_test_file, data) in test_files { 712 | let test: Test = serde_yaml::from_str(data).unwrap(); 713 | let (Ok(blobs), Ok(commitments), Ok(proofs)) = ( 714 | test.input.get_blobs(), 715 | test.input.get_commitments(), 716 | test.input.get_proofs(), 717 | ) else { 718 | assert!(test.get_output().is_none()); 719 | continue; 720 | }; 721 | 722 | let result = KzgProof::verify_blob_kzg_proof_batch( 723 | vec![blobs], 724 | vec![commitments], 725 | vec![proofs], 726 | &kzg_settings, 727 | ); 728 | match result { 729 | Ok(result) => { 730 | assert_eq!(result, test.get_output().unwrap_or(false)); 731 | } 732 | Err(_) => { 733 | assert!(test.get_output().is_none()); 734 | } 735 | } 736 | } 737 | } 738 | 739 | #[test] 740 | pub fn test_compute_challenge() { 741 | let data = include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_fb324bc819407148/data.yaml"); 742 | 743 | let test: Test = serde_yaml::from_str(data).unwrap(); 744 | let blob = test.input.get_blob().unwrap(); 745 | let commitment = safe_g1_affine_from_bytes(&test.input.get_commitment().unwrap()).unwrap(); 746 | 747 | let evaluation_challenge = compute_challenge(&blob, &commitment).unwrap(); 748 | 749 | assert_eq!( 750 | format!("{evaluation_challenge}"), 751 | "0x4f00eef944a21cb9f3ac3390702621e4bbf1198767c43c0fb9c8e9923bfbb31a" 752 | ) 753 | } 754 | 755 | #[test] 756 | pub fn test_evaluate_polynomial_in_evaluation_form() { 757 | let data = include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_19b3f3f8c98ea31e/data.yaml"); 758 | 759 | let test: Test = serde_yaml::from_str(data).unwrap(); 760 | let kzg_settings = KzgSettings::load_trusted_setup_file().unwrap(); 761 | let blob = test.input.get_blob().unwrap(); 762 | let polynomial = blob.as_polynomial().unwrap(); 763 | 764 | let evaluation_challenge = scalar_from_bytes_unchecked( 765 | Bytes32::from_hex("0x637c904d316955b7282f980433d5cd9f40d0533c45d0a233c009bc7fe28b92e3") 766 | .unwrap() 767 | .into(), 768 | ); 769 | 770 | let y = 771 | evaluate_polynomial_in_evaluation_form(polynomial, evaluation_challenge, &kzg_settings) 772 | .unwrap(); 773 | 774 | assert_eq!( 775 | format!("{y}"), 776 | "0x1bdfc5da40334b9c51220e8cbea1679c20a7f32dd3d7f3c463149bb4b41a7d18" 777 | ); 778 | } 779 | } 780 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(not(test), no_std)] 2 | #[macro_use] 3 | extern crate alloc; 4 | 5 | pub mod consts; 6 | pub mod dtypes; 7 | pub mod enums; 8 | pub mod kzg_proof; 9 | pub mod pairings; 10 | pub mod trusted_setup; 11 | 12 | pub use consts::*; 13 | pub use dtypes::*; 14 | pub use kzg_proof::KzgProof; 15 | pub use pairings::pairings_verify; 16 | pub use trusted_setup::*; 17 | 18 | pub use enums::KzgError; 19 | 20 | #[cfg(test)] 21 | mod test_files { 22 | // Tests 23 | pub const VERIFY_KZG_PROOF_TESTS: [(&str, &str); 122] = [ 24 | ( 25 | "verify_kzg_proof_case_correct_proof_02e696ada7d4631d", 26 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_02e696ada7d4631d/data.yaml"), 27 | ), 28 | ( 29 | "verify_kzg_proof_case_correct_proof_05c1f3685f3393f0", 30 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_05c1f3685f3393f0/data.yaml"), 31 | ), 32 | ( 33 | "verify_kzg_proof_case_correct_proof_08f9e2f1cb3d39db", 34 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_08f9e2f1cb3d39db/data.yaml"), 35 | ), 36 | ( 37 | "verify_kzg_proof_case_correct_proof_0cf79b17cb5f4ea2", 38 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_0cf79b17cb5f4ea2/data.yaml"), 39 | ), 40 | ( 41 | "verify_kzg_proof_case_correct_proof_177b58dc7a46b08f", 42 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_177b58dc7a46b08f/data.yaml"), 43 | ), 44 | ( 45 | "verify_kzg_proof_case_correct_proof_1ce8e4f69d5df899", 46 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_1ce8e4f69d5df899/data.yaml"), 47 | ), 48 | ( 49 | "verify_kzg_proof_case_correct_proof_26b753dec0560daa", 50 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_26b753dec0560daa/data.yaml"), 51 | ), 52 | ( 53 | "verify_kzg_proof_case_correct_proof_2b76dc9e3abf42f3", 54 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_2b76dc9e3abf42f3/data.yaml"), 55 | ), 56 | ( 57 | "verify_kzg_proof_case_correct_proof_31ebd010e6098750", 58 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_31ebd010e6098750/data.yaml"), 59 | ), 60 | ( 61 | "verify_kzg_proof_case_correct_proof_3208425794224c3f", 62 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3208425794224c3f/data.yaml"), 63 | ), 64 | ( 65 | "verify_kzg_proof_case_correct_proof_36817bfd67de97a8", 66 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_36817bfd67de97a8/data.yaml"), 67 | ), 68 | ( 69 | "verify_kzg_proof_case_correct_proof_392169c16a2e5ef6", 70 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_392169c16a2e5ef6/data.yaml"), 71 | ), 72 | ( 73 | "verify_kzg_proof_case_correct_proof_395cf6d697d1a743", 74 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_395cf6d697d1a743/data.yaml"), 75 | ), 76 | ( 77 | "verify_kzg_proof_case_correct_proof_3ac8dc31e9aa6a70", 78 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3ac8dc31e9aa6a70/data.yaml"), 79 | ), 80 | ( 81 | "verify_kzg_proof_case_correct_proof_3c1e8b38219e3e12", 82 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3c1e8b38219e3e12/data.yaml"), 83 | ), 84 | ( 85 | "verify_kzg_proof_case_correct_proof_3c87ec986c2656c2", 86 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3c87ec986c2656c2/data.yaml"), 87 | ), 88 | ( 89 | "verify_kzg_proof_case_correct_proof_3cd183d0bab85fb7", 90 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3cd183d0bab85fb7/data.yaml"), 91 | ), 92 | ( 93 | "verify_kzg_proof_case_correct_proof_420f2a187ce77035", 94 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_420f2a187ce77035/data.yaml"), 95 | ), 96 | ( 97 | "verify_kzg_proof_case_correct_proof_444b73ff54a19b44", 98 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_444b73ff54a19b44/data.yaml"), 99 | ), 100 | ( 101 | "verify_kzg_proof_case_correct_proof_53a9bdf4f75196da", 102 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_53a9bdf4f75196da/data.yaml"), 103 | ), 104 | ( 105 | "verify_kzg_proof_case_correct_proof_585454b31673dd62", 106 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_585454b31673dd62/data.yaml"), 107 | ), 108 | ( 109 | "verify_kzg_proof_case_correct_proof_7db4f140a955dd1a", 110 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_7db4f140a955dd1a/data.yaml"), 111 | ), 112 | ( 113 | "verify_kzg_proof_case_correct_proof_83e53423a2dd93fe", 114 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_83e53423a2dd93fe/data.yaml"), 115 | ), 116 | ( 117 | "verify_kzg_proof_case_correct_proof_9b24f8997145435c", 118 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_9b24f8997145435c/data.yaml"), 119 | ), 120 | ( 121 | "verify_kzg_proof_case_correct_proof_9b754afb690c47e1", 122 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_9b754afb690c47e1/data.yaml"), 123 | ), 124 | ( 125 | "verify_kzg_proof_case_correct_proof_a0be66af9a97ea52", 126 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_a0be66af9a97ea52/data.yaml"), 127 | ), 128 | ( 129 | "verify_kzg_proof_case_correct_proof_af669445747d2585", 130 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_af669445747d2585/data.yaml"), 131 | ), 132 | ( 133 | "verify_kzg_proof_case_correct_proof_af8b75f664ed7d43", 134 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_af8b75f664ed7d43/data.yaml"), 135 | ), 136 | ( 137 | "verify_kzg_proof_case_correct_proof_b6cb6698327d9835", 138 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_b6cb6698327d9835/data.yaml"), 139 | ), 140 | ( 141 | "verify_kzg_proof_case_correct_proof_b6ec3736f9ff2c62", 142 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_b6ec3736f9ff2c62/data.yaml"), 143 | ), 144 | ( 145 | "verify_kzg_proof_case_correct_proof_becf2e1641bbd4e6", 146 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_becf2e1641bbd4e6/data.yaml"), 147 | ), 148 | ( 149 | "verify_kzg_proof_case_correct_proof_c3d4322ec17fe7cd", 150 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_c3d4322ec17fe7cd/data.yaml"), 151 | ), 152 | ( 153 | "verify_kzg_proof_case_correct_proof_c5e1490d672d026d", 154 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_c5e1490d672d026d/data.yaml"), 155 | ), 156 | ( 157 | "verify_kzg_proof_case_correct_proof_cae5d3491190b777", 158 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_cae5d3491190b777/data.yaml"), 159 | ), 160 | ( 161 | "verify_kzg_proof_case_correct_proof_d0992bc0387790a4", 162 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_d0992bc0387790a4/data.yaml"), 163 | ), 164 | ( 165 | "verify_kzg_proof_case_correct_proof_d736268229bd87ec", 166 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_d736268229bd87ec/data.yaml"), 167 | ), 168 | ( 169 | "verify_kzg_proof_case_correct_proof_e68d7111a2364a49", 170 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_e68d7111a2364a49/data.yaml"), 171 | ), 172 | ( 173 | "verify_kzg_proof_case_correct_proof_ed6b180ec759bcf6", 174 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_ed6b180ec759bcf6/data.yaml"), 175 | ), 176 | ( 177 | "verify_kzg_proof_case_correct_proof_f0ed3dc11cdeb130", 178 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_f0ed3dc11cdeb130/data.yaml"), 179 | ), 180 | ( 181 | "verify_kzg_proof_case_correct_proof_f47eb9fc139f6bfd", 182 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_f47eb9fc139f6bfd/data.yaml"), 183 | ), 184 | ( 185 | "verify_kzg_proof_case_correct_proof_f7f44e1e864aa967", 186 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_f7f44e1e864aa967/data.yaml"), 187 | ), 188 | ( 189 | "verify_kzg_proof_case_correct_proof_ffa6e97b97146517", 190 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_ffa6e97b97146517/data.yaml"), 191 | ), 192 | ( 193 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_05c1f3685f3393f0", 194 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_05c1f3685f3393f0/data.yaml"), 195 | ), 196 | ( 197 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_177b58dc7a46b08f", 198 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_177b58dc7a46b08f/data.yaml"), 199 | ), 200 | ( 201 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_2b76dc9e3abf42f3", 202 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_2b76dc9e3abf42f3/data.yaml"), 203 | ), 204 | ( 205 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_395cf6d697d1a743", 206 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_395cf6d697d1a743/data.yaml"), 207 | ), 208 | ( 209 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_585454b31673dd62", 210 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_585454b31673dd62/data.yaml"), 211 | ), 212 | ( 213 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_a0be66af9a97ea52", 214 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_a0be66af9a97ea52/data.yaml"), 215 | ), 216 | ( 217 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_02e696ada7d4631d", 218 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_02e696ada7d4631d/data.yaml"), 219 | ), 220 | ( 221 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_0cf79b17cb5f4ea2", 222 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_0cf79b17cb5f4ea2/data.yaml"), 223 | ), 224 | ( 225 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_3208425794224c3f", 226 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_3208425794224c3f/data.yaml"), 227 | ), 228 | ( 229 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_3ac8dc31e9aa6a70", 230 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_3ac8dc31e9aa6a70/data.yaml"), 231 | ), 232 | ( 233 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_c3d4322ec17fe7cd", 234 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_c3d4322ec17fe7cd/data.yaml"), 235 | ), 236 | ( 237 | "verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_ffa6e97b97146517", 238 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_ffa6e97b97146517/data.yaml"), 239 | ), 240 | ( 241 | "verify_kzg_proof_case_incorrect_proof_02e696ada7d4631d", 242 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_02e696ada7d4631d/data.yaml"), 243 | ), 244 | ( 245 | "verify_kzg_proof_case_incorrect_proof_05c1f3685f3393f0", 246 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_05c1f3685f3393f0/data.yaml"), 247 | ), 248 | ( 249 | "verify_kzg_proof_case_incorrect_proof_08f9e2f1cb3d39db", 250 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_08f9e2f1cb3d39db/data.yaml"), 251 | ), 252 | ( 253 | "verify_kzg_proof_case_incorrect_proof_0cf79b17cb5f4ea2", 254 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_0cf79b17cb5f4ea2/data.yaml"), 255 | ), 256 | ( 257 | "verify_kzg_proof_case_incorrect_proof_177b58dc7a46b08f", 258 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_177b58dc7a46b08f/data.yaml"), 259 | ), 260 | ( 261 | "verify_kzg_proof_case_incorrect_proof_1ce8e4f69d5df899", 262 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_1ce8e4f69d5df899/data.yaml"), 263 | ), 264 | ( 265 | "verify_kzg_proof_case_incorrect_proof_26b753dec0560daa", 266 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_26b753dec0560daa/data.yaml"), 267 | ), 268 | ( 269 | "verify_kzg_proof_case_incorrect_proof_2b76dc9e3abf42f3", 270 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_2b76dc9e3abf42f3/data.yaml"), 271 | ), 272 | ( 273 | "verify_kzg_proof_case_incorrect_proof_31ebd010e6098750", 274 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_31ebd010e6098750/data.yaml"), 275 | ), 276 | ( 277 | "verify_kzg_proof_case_incorrect_proof_3208425794224c3f", 278 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3208425794224c3f/data.yaml"), 279 | ), 280 | ( 281 | "verify_kzg_proof_case_incorrect_proof_36817bfd67de97a8", 282 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_36817bfd67de97a8/data.yaml"), 283 | ), 284 | ( 285 | "verify_kzg_proof_case_incorrect_proof_392169c16a2e5ef6", 286 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_392169c16a2e5ef6/data.yaml"), 287 | ), 288 | ( 289 | "verify_kzg_proof_case_incorrect_proof_395cf6d697d1a743", 290 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_395cf6d697d1a743/data.yaml"), 291 | ), 292 | ( 293 | "verify_kzg_proof_case_incorrect_proof_3ac8dc31e9aa6a70", 294 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3ac8dc31e9aa6a70/data.yaml"), 295 | ), 296 | ( 297 | "verify_kzg_proof_case_incorrect_proof_3c1e8b38219e3e12", 298 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3c1e8b38219e3e12/data.yaml"), 299 | ), 300 | ( 301 | "verify_kzg_proof_case_incorrect_proof_3c87ec986c2656c2", 302 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3c87ec986c2656c2/data.yaml"), 303 | ), 304 | ( 305 | "verify_kzg_proof_case_incorrect_proof_3cd183d0bab85fb7", 306 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3cd183d0bab85fb7/data.yaml"), 307 | ), 308 | ( 309 | "verify_kzg_proof_case_incorrect_proof_420f2a187ce77035", 310 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_420f2a187ce77035/data.yaml"), 311 | ), 312 | ( 313 | "verify_kzg_proof_case_incorrect_proof_444b73ff54a19b44", 314 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_444b73ff54a19b44/data.yaml"), 315 | ), 316 | ( 317 | "verify_kzg_proof_case_incorrect_proof_53a9bdf4f75196da", 318 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_53a9bdf4f75196da/data.yaml"), 319 | ), 320 | ( 321 | "verify_kzg_proof_case_incorrect_proof_585454b31673dd62", 322 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_585454b31673dd62/data.yaml"), 323 | ), 324 | ( 325 | "verify_kzg_proof_case_incorrect_proof_7db4f140a955dd1a", 326 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_7db4f140a955dd1a/data.yaml"), 327 | ), 328 | ( 329 | "verify_kzg_proof_case_incorrect_proof_83e53423a2dd93fe", 330 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_83e53423a2dd93fe/data.yaml"), 331 | ), 332 | ( 333 | "verify_kzg_proof_case_incorrect_proof_9b24f8997145435c", 334 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_9b24f8997145435c/data.yaml"), 335 | ), 336 | ( 337 | "verify_kzg_proof_case_incorrect_proof_9b754afb690c47e1", 338 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_9b754afb690c47e1/data.yaml"), 339 | ), 340 | ( 341 | "verify_kzg_proof_case_incorrect_proof_a0be66af9a97ea52", 342 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_a0be66af9a97ea52/data.yaml"), 343 | ), 344 | ( 345 | "verify_kzg_proof_case_incorrect_proof_af669445747d2585", 346 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_af669445747d2585/data.yaml"), 347 | ), 348 | ( 349 | "verify_kzg_proof_case_incorrect_proof_af8b75f664ed7d43", 350 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_af8b75f664ed7d43/data.yaml"), 351 | ), 352 | ( 353 | "verify_kzg_proof_case_incorrect_proof_b6cb6698327d9835", 354 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_b6cb6698327d9835/data.yaml"), 355 | ), 356 | ( 357 | "verify_kzg_proof_case_incorrect_proof_b6ec3736f9ff2c62", 358 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_b6ec3736f9ff2c62/data.yaml"), 359 | ), 360 | ( 361 | "verify_kzg_proof_case_incorrect_proof_becf2e1641bbd4e6", 362 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_becf2e1641bbd4e6/data.yaml"), 363 | ), 364 | ( 365 | "verify_kzg_proof_case_incorrect_proof_c3d4322ec17fe7cd", 366 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_c3d4322ec17fe7cd/data.yaml"), 367 | ), 368 | ( 369 | "verify_kzg_proof_case_incorrect_proof_c5e1490d672d026d", 370 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_c5e1490d672d026d/data.yaml"), 371 | ), 372 | ( 373 | "verify_kzg_proof_case_incorrect_proof_cae5d3491190b777", 374 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_cae5d3491190b777/data.yaml"), 375 | ), 376 | ( 377 | "verify_kzg_proof_case_incorrect_proof_d0992bc0387790a4", 378 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_d0992bc0387790a4/data.yaml"), 379 | ), 380 | ( 381 | "verify_kzg_proof_case_incorrect_proof_d736268229bd87ec", 382 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_d736268229bd87ec/data.yaml"), 383 | ), 384 | ( 385 | "verify_kzg_proof_case_incorrect_proof_e68d7111a2364a49", 386 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_e68d7111a2364a49/data.yaml"), 387 | ), 388 | ( 389 | "verify_kzg_proof_case_incorrect_proof_ed6b180ec759bcf6", 390 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_ed6b180ec759bcf6/data.yaml"), 391 | ), 392 | ( 393 | "verify_kzg_proof_case_incorrect_proof_f0ed3dc11cdeb130", 394 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_f0ed3dc11cdeb130/data.yaml"), 395 | ), 396 | ( 397 | "verify_kzg_proof_case_incorrect_proof_f47eb9fc139f6bfd", 398 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_f47eb9fc139f6bfd/data.yaml"), 399 | ), 400 | ( 401 | "verify_kzg_proof_case_incorrect_proof_f7f44e1e864aa967", 402 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_f7f44e1e864aa967/data.yaml"), 403 | ), 404 | ( 405 | "verify_kzg_proof_case_incorrect_proof_ffa6e97b97146517", 406 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_ffa6e97b97146517/data.yaml"), 407 | ), 408 | ( 409 | "verify_kzg_proof_case_incorrect_proof_point_at_infinity_392169c16a2e5ef6", 410 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_392169c16a2e5ef6/data.yaml"), 411 | ), 412 | ( 413 | "verify_kzg_proof_case_incorrect_proof_point_at_infinity_3c1e8b38219e3e12", 414 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_3c1e8b38219e3e12/data.yaml"), 415 | ), 416 | ( 417 | "verify_kzg_proof_case_incorrect_proof_point_at_infinity_3c87ec986c2656c2", 418 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_3c87ec986c2656c2/data.yaml"), 419 | ), 420 | ( 421 | "verify_kzg_proof_case_incorrect_proof_point_at_infinity_420f2a187ce77035", 422 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_420f2a187ce77035/data.yaml"), 423 | ), 424 | ( 425 | "verify_kzg_proof_case_incorrect_proof_point_at_infinity_83e53423a2dd93fe", 426 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_83e53423a2dd93fe/data.yaml"), 427 | ), 428 | ( 429 | "verify_kzg_proof_case_incorrect_proof_point_at_infinity_ed6b180ec759bcf6", 430 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_ed6b180ec759bcf6/data.yaml"), 431 | ), 432 | ( 433 | "verify_kzg_proof_case_invalid_commitment_1b44e341d56c757d", 434 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_commitment_1b44e341d56c757d/data.yaml"), 435 | ), 436 | ( 437 | "verify_kzg_proof_case_invalid_commitment_32afa9561a4b3b91", 438 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_commitment_32afa9561a4b3b91/data.yaml"), 439 | ), 440 | ( 441 | "verify_kzg_proof_case_invalid_commitment_3e55802a5ed3c757", 442 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_commitment_3e55802a5ed3c757/data.yaml"), 443 | ), 444 | ( 445 | "verify_kzg_proof_case_invalid_commitment_e9d3e9ec16fbc15f", 446 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_commitment_e9d3e9ec16fbc15f/data.yaml"), 447 | ), 448 | ( 449 | "verify_kzg_proof_case_invalid_proof_1b44e341d56c757d", 450 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_proof_1b44e341d56c757d/data.yaml"), 451 | ), 452 | ( 453 | "verify_kzg_proof_case_invalid_proof_32afa9561a4b3b91", 454 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_proof_32afa9561a4b3b91/data.yaml"), 455 | ), 456 | ( 457 | "verify_kzg_proof_case_invalid_proof_3e55802a5ed3c757", 458 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_proof_3e55802a5ed3c757/data.yaml"), 459 | ), 460 | ( 461 | "verify_kzg_proof_case_invalid_proof_e9d3e9ec16fbc15f", 462 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_proof_e9d3e9ec16fbc15f/data.yaml"), 463 | ), 464 | ( 465 | "verify_kzg_proof_case_invalid_y_35d08d612aad2197", 466 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_35d08d612aad2197/data.yaml"), 467 | ), 468 | ( 469 | "verify_kzg_proof_case_invalid_y_4aa6def8c35c9097", 470 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_4aa6def8c35c9097/data.yaml"), 471 | ), 472 | ( 473 | "verify_kzg_proof_case_invalid_y_4e51cef08a61606f", 474 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_4e51cef08a61606f/data.yaml"), 475 | ), 476 | ( 477 | "verify_kzg_proof_case_invalid_y_64b9ff2b8f7dddee", 478 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_64b9ff2b8f7dddee/data.yaml"), 479 | ), 480 | ( 481 | "verify_kzg_proof_case_invalid_y_b358a2e763727b70", 482 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_b358a2e763727b70/data.yaml"), 483 | ), 484 | ( 485 | "verify_kzg_proof_case_invalid_y_eb0601fec84cc5e9", 486 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_eb0601fec84cc5e9/data.yaml"), 487 | ), 488 | ( 489 | "verify_kzg_proof_case_invalid_z_35d08d612aad2197", 490 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_35d08d612aad2197/data.yaml"), 491 | ), 492 | ( 493 | "verify_kzg_proof_case_invalid_z_4aa6def8c35c9097", 494 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_4aa6def8c35c9097/data.yaml"), 495 | ), 496 | ( 497 | "verify_kzg_proof_case_invalid_z_4e51cef08a61606f", 498 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_4e51cef08a61606f/data.yaml"), 499 | ), 500 | ( 501 | "verify_kzg_proof_case_invalid_z_64b9ff2b8f7dddee", 502 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_64b9ff2b8f7dddee/data.yaml"), 503 | ), 504 | ( 505 | "verify_kzg_proof_case_invalid_z_b358a2e763727b70", 506 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_b358a2e763727b70/data.yaml"), 507 | ), 508 | ( 509 | "verify_kzg_proof_case_invalid_z_eb0601fec84cc5e9", 510 | include_str!("../tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_eb0601fec84cc5e9/data.yaml"), 511 | ), 512 | ]; 513 | 514 | pub const VERIFY_BLOB_KZG_PROOF_BATCH_TESTS: [(&str, &str); 27] = [ 515 | ( 516 | "verify_blob_kzg_proof_case_correct_proof_0951cfd9ab47a8d3", 517 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_0951cfd9ab47a8d3/data.yaml"), 518 | ), 519 | ( 520 | "verify_blob_kzg_proof_case_correct_proof_19b3f3f8c98ea31e", 521 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_19b3f3f8c98ea31e/data.yaml"), 522 | ), 523 | ( 524 | "verify_blob_kzg_proof_case_correct_proof_84d8089232bc23a8", 525 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_84d8089232bc23a8/data.yaml"), 526 | ), 527 | ( 528 | "verify_blob_kzg_proof_case_correct_proof_a87a4e636e0f58fb", 529 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_a87a4e636e0f58fb/data.yaml"), 530 | ), 531 | ( 532 | "verify_blob_kzg_proof_case_correct_proof_c40b9b515df8721b", 533 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_c40b9b515df8721b/data.yaml"), 534 | ), 535 | ( 536 | "verify_blob_kzg_proof_case_correct_proof_cdb3e6d49eb12307", 537 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_cdb3e6d49eb12307/data.yaml"), 538 | ), 539 | ( 540 | "verify_blob_kzg_proof_case_correct_proof_fb324bc819407148", 541 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_fb324bc819407148/data.yaml"), 542 | ), 543 | ( 544 | "verify_blob_kzg_proof_case_incorrect_proof_0951cfd9ab47a8d3", 545 | include_str!( 546 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_0951cfd9ab47a8d3/data.yaml" 547 | ), 548 | ), 549 | ( 550 | "verify_blob_kzg_proof_case_incorrect_proof_19b3f3f8c98ea31e", 551 | include_str!( 552 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_19b3f3f8c98ea31e/data.yaml" 553 | ), 554 | ), 555 | ( 556 | "verify_blob_kzg_proof_case_incorrect_proof_84d8089232bc23a8", 557 | include_str!( 558 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_84d8089232bc23a8/data.yaml" 559 | ), 560 | ), 561 | ( 562 | "verify_blob_kzg_proof_case_incorrect_proof_a87a4e636e0f58fb", 563 | include_str!( 564 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_a87a4e636e0f58fb/data.yaml" 565 | ), 566 | ), 567 | ( 568 | "verify_blob_kzg_proof_case_incorrect_proof_c40b9b515df8721b", 569 | include_str!( 570 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_c40b9b515df8721b/data.yaml" 571 | ), 572 | ), 573 | ( 574 | "verify_blob_kzg_proof_case_incorrect_proof_cdb3e6d49eb12307", 575 | include_str!( 576 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_cdb3e6d49eb12307/data.yaml" 577 | ), 578 | ), 579 | ( 580 | "verify_blob_kzg_proof_case_incorrect_proof_fb324bc819407148", 581 | include_str!( 582 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_fb324bc819407148/data.yaml" 583 | ), 584 | ), 585 | ( 586 | "verify_blob_kzg_proof_case_incorrect_proof_point_at_infinity", 587 | include_str!( 588 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_point_at_infinity/data.yaml" 589 | ), 590 | ), 591 | ( 592 | "verify_blob_kzg_proof_case_invalid_blob_59d64ff6b4648fad", 593 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_blob_59d64ff6b4648fad/data.yaml"), 594 | ), 595 | ( 596 | "verify_blob_kzg_proof_case_invalid_blob_635fb2de5b0dc429", 597 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_blob_635fb2de5b0dc429/data.yaml"), 598 | ), 599 | ( 600 | "verify_blob_kzg_proof_case_invalid_blob_a3b9ff28507767f8", 601 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_blob_a3b9ff28507767f8/data.yaml"), 602 | ), 603 | ( 604 | "verify_blob_kzg_proof_case_invalid_blob_d3afbd98123a3434", 605 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_blob_d3afbd98123a3434/data.yaml"), 606 | ), 607 | ( 608 | "verify_blob_kzg_proof_case_invalid_commitment_1a68c47b68148e78", 609 | include_str!( 610 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_commitment_1a68c47b68148e78/data.yaml" 611 | ), 612 | ), 613 | ( 614 | "verify_blob_kzg_proof_case_invalid_commitment_24b932fb4dec5b2d", 615 | include_str!( 616 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_commitment_24b932fb4dec5b2d/data.yaml" 617 | ), 618 | ), 619 | ( 620 | "verify_blob_kzg_proof_case_invalid_commitment_3a6eb616efae0627", 621 | include_str!( 622 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_commitment_3a6eb616efae0627/data.yaml" 623 | ), 624 | ), 625 | ( 626 | "verify_blob_kzg_proof_case_invalid_commitment_d070689c3e15444c", 627 | include_str!( 628 | "../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_commitment_d070689c3e15444c/data.yaml" 629 | ), 630 | ), 631 | ( 632 | "verify_blob_kzg_proof_case_invalid_proof_1a68c47b68148e78", 633 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_proof_1a68c47b68148e78/data.yaml"), 634 | ), 635 | ( 636 | "verify_blob_kzg_proof_case_invalid_proof_24b932fb4dec5b2d", 637 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_proof_24b932fb4dec5b2d/data.yaml"), 638 | ), 639 | ( 640 | "verify_blob_kzg_proof_case_invalid_proof_3a6eb616efae0627", 641 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_proof_3a6eb616efae0627/data.yaml"), 642 | ), 643 | ( 644 | "verify_blob_kzg_proof_case_invalid_proof_d070689c3e15444c", 645 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_proof_d070689c3e15444c/data.yaml"), 646 | ), 647 | ]; 648 | 649 | pub const VERIFY_BLOB_KZG_PROOF_TESTS: [(&str, &str); 29] = [ 650 | ( 651 | "verify_blob_kzg_proof_case_correct_proof_0951cfd9ab47a8d3", 652 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_0951cfd9ab47a8d3/data.yaml"), 653 | ), 654 | ( 655 | "verify_blob_kzg_proof_case_correct_proof_19b3f3f8c98ea31e", 656 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_19b3f3f8c98ea31e/data.yaml"), 657 | ), 658 | ( 659 | "verify_blob_kzg_proof_case_correct_proof_84d8089232bc23a8", 660 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_84d8089232bc23a8/data.yaml"), 661 | ), 662 | ( 663 | "verify_blob_kzg_proof_case_correct_proof_a87a4e636e0f58fb", 664 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_a87a4e636e0f58fb/data.yaml"), 665 | ), 666 | ( 667 | "verify_blob_kzg_proof_case_correct_proof_c40b9b515df8721b", 668 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_c40b9b515df8721b/data.yaml"), 669 | ), 670 | ( 671 | "verify_blob_kzg_proof_case_correct_proof_cdb3e6d49eb12307", 672 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_cdb3e6d49eb12307/data.yaml"), 673 | ), 674 | ( 675 | "verify_blob_kzg_proof_case_correct_proof_fb324bc819407148", 676 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_fb324bc819407148/data.yaml"), 677 | ), 678 | ( 679 | "verify_blob_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly", 680 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly/data.yaml"), 681 | ), 682 | ( 683 | "verify_blob_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly", 684 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly/data.yaml"), 685 | ), 686 | ( 687 | "verify_blob_kzg_proof_case_incorrect_proof_0951cfd9ab47a8d3", 688 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_0951cfd9ab47a8d3/data.yaml"), 689 | ), 690 | ( 691 | "verify_blob_kzg_proof_case_incorrect_proof_19b3f3f8c98ea31e", 692 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_19b3f3f8c98ea31e/data.yaml"), 693 | ), 694 | ( 695 | "verify_blob_kzg_proof_case_incorrect_proof_84d8089232bc23a8", 696 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_84d8089232bc23a8/data.yaml"), 697 | ), 698 | ( 699 | "verify_blob_kzg_proof_case_incorrect_proof_a87a4e636e0f58fb", 700 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_a87a4e636e0f58fb/data.yaml"), 701 | ), 702 | ( 703 | "verify_blob_kzg_proof_case_incorrect_proof_c40b9b515df8721b", 704 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_c40b9b515df8721b/data.yaml"), 705 | ), 706 | ( 707 | "verify_blob_kzg_proof_case_incorrect_proof_cdb3e6d49eb12307", 708 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_cdb3e6d49eb12307/data.yaml"), 709 | ), 710 | ( 711 | "verify_blob_kzg_proof_case_incorrect_proof_fb324bc819407148", 712 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_fb324bc819407148/data.yaml"), 713 | ), 714 | ( 715 | "verify_blob_kzg_proof_case_incorrect_proof_point_at_infinity", 716 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_incorrect_proof_point_at_infinity/data.yaml"), 717 | ), 718 | ( 719 | "verify_blob_kzg_proof_case_invalid_blob_59d64ff6b4648fad", 720 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_blob_59d64ff6b4648fad/data.yaml"), 721 | ), 722 | ( 723 | "verify_blob_kzg_proof_case_invalid_blob_635fb2de5b0dc429", 724 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_blob_635fb2de5b0dc429/data.yaml"), 725 | ), 726 | ( 727 | "verify_blob_kzg_proof_case_invalid_blob_a3b9ff28507767f8", 728 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_blob_a3b9ff28507767f8/data.yaml"), 729 | ), 730 | ( 731 | "verify_blob_kzg_proof_case_invalid_blob_d3afbd98123a3434", 732 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_blob_d3afbd98123a3434/data.yaml"), 733 | ), 734 | ( 735 | "verify_blob_kzg_proof_case_invalid_commitment_1a68c47b68148e78", 736 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_commitment_1a68c47b68148e78/data.yaml"), 737 | ), 738 | ( 739 | "verify_blob_kzg_proof_case_invalid_commitment_24b932fb4dec5b2d", 740 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_commitment_24b932fb4dec5b2d/data.yaml"), 741 | ), 742 | ( 743 | "verify_blob_kzg_proof_case_invalid_commitment_3a6eb616efae0627", 744 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_commitment_3a6eb616efae0627/data.yaml"), 745 | ), 746 | ( 747 | "verify_blob_kzg_proof_case_invalid_commitment_d070689c3e15444c", 748 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_commitment_d070689c3e15444c/data.yaml"), 749 | ), 750 | ( 751 | "verify_blob_kzg_proof_case_invalid_proof_1a68c47b68148e78", 752 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_proof_1a68c47b68148e78/data.yaml"), 753 | ), 754 | ( 755 | "verify_blob_kzg_proof_case_invalid_proof_24b932fb4dec5b2d", 756 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_proof_24b932fb4dec5b2d/data.yaml"), 757 | ), 758 | ( 759 | "verify_blob_kzg_proof_case_invalid_proof_3a6eb616efae0627", 760 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_proof_3a6eb616efae0627/data.yaml"), 761 | ), 762 | ( 763 | "verify_blob_kzg_proof_case_invalid_proof_d070689c3e15444c", 764 | include_str!("../tests/verify_blob_kzg_proof/verify_blob_kzg_proof_case_invalid_proof_d070689c3e15444c/data.yaml"), 765 | ), 766 | ]; 767 | } 768 | -------------------------------------------------------------------------------- /src/pairings.rs: -------------------------------------------------------------------------------- 1 | #[allow(unused_imports)] 2 | use bls12_381::{multi_miller_loop, G1Affine, G2Affine, G2Prepared, Gt, Scalar}; 3 | 4 | /// Verifies the pairing of two G1 and two G2 points are equivalent using the multi-miller loop 5 | pub fn pairings_verify(a1: G1Affine, a2: G2Affine, b1: G1Affine, b2: G2Affine) -> bool { 6 | multi_miller_loop(&[(&-a1, &G2Prepared::from(a2)), (&b1, &G2Prepared::from(b2))]) 7 | .final_exponentiation() 8 | == Gt::identity() 9 | } 10 | -------------------------------------------------------------------------------- /src/trusted_setup.rs: -------------------------------------------------------------------------------- 1 | use crate::{enums::KzgError, NUM_G1_POINTS, NUM_ROOTS_OF_UNITY}; 2 | 3 | use alloc::sync::Arc; 4 | use bls12_381::{G1Affine, G2Affine, Scalar}; 5 | use core::{ 6 | hash::{Hash, Hasher}, 7 | mem::transmute, 8 | slice, 9 | }; 10 | use spin::Once; 11 | 12 | pub fn get_roots_of_unity() -> &'static [Scalar] { 13 | static ROOTS_OF_UNITY: Once<&'static [Scalar]> = Once::new(); 14 | ROOTS_OF_UNITY.call_once(|| { 15 | let bytes = include_bytes!(concat!(env!("OUT_DIR"), "/roots_of_unity.bin")); 16 | unsafe { transmute(slice::from_raw_parts(bytes.as_ptr(), NUM_ROOTS_OF_UNITY)) } 17 | }) 18 | } 19 | 20 | pub fn get_g1_points() -> &'static [G1Affine] { 21 | static G1_POINTS: Once<&'static [G1Affine]> = Once::new(); 22 | G1_POINTS.call_once(|| { 23 | let bytes = include_bytes!(concat!(env!("OUT_DIR"), "/g1.bin")); 24 | unsafe { transmute(slice::from_raw_parts(bytes.as_ptr(), NUM_G1_POINTS)) } 25 | }) 26 | } 27 | 28 | pub fn get_g2_points() -> &'static [G2Affine] { 29 | static G2_POINTS: Once<&'static [G2Affine]> = Once::new(); 30 | G2_POINTS.call_once(|| { 31 | let bytes = include_bytes!(concat!(env!("OUT_DIR"), "/g2.bin")); 32 | unsafe { transmute(slice::from_raw_parts(bytes.as_ptr(), NUM_G1_POINTS)) } 33 | }) 34 | } 35 | 36 | pub fn get_kzg_settings() -> KzgSettings { 37 | KzgSettings { 38 | roots_of_unity: get_roots_of_unity(), 39 | g1_points: get_g1_points(), 40 | g2_points: get_g2_points(), 41 | } 42 | } 43 | 44 | #[derive(Debug, Clone, PartialEq, Eq)] 45 | #[repr(C, align(4))] 46 | pub struct KzgSettings { 47 | pub roots_of_unity: &'static [Scalar], 48 | pub g1_points: &'static [G1Affine], 49 | pub g2_points: &'static [G2Affine], 50 | } 51 | 52 | #[derive(Debug, Clone, Default, Eq)] 53 | pub enum EnvKzgSettings { 54 | #[default] 55 | Default, 56 | Custom(Arc), 57 | } 58 | 59 | impl PartialEq for EnvKzgSettings { 60 | fn eq(&self, other: &Self) -> bool { 61 | match (self, other) { 62 | (Self::Default, Self::Default) => true, 63 | (Self::Custom(a), Self::Custom(b)) => Arc::ptr_eq(a, b), 64 | _ => false, 65 | } 66 | } 67 | } 68 | 69 | impl Hash for EnvKzgSettings { 70 | fn hash(&self, state: &mut H) { 71 | core::mem::discriminant(self).hash(state); 72 | match self { 73 | Self::Default => {} 74 | Self::Custom(settings) => Arc::as_ptr(settings).hash(state), 75 | } 76 | } 77 | } 78 | 79 | impl EnvKzgSettings { 80 | pub fn get(&self) -> &KzgSettings { 81 | match self { 82 | Self::Default => { 83 | static DEFAULT: Once = Once::new(); 84 | DEFAULT.call_once(|| { 85 | KzgSettings::load_trusted_setup_file() 86 | .expect("failed to load default trusted setup") 87 | }) 88 | } 89 | Self::Custom(settings) => settings, 90 | } 91 | } 92 | } 93 | 94 | impl KzgSettings { 95 | pub fn load_trusted_setup_file() -> Result { 96 | Ok(get_kzg_settings()) 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /tests/verify_blob_kzg_proof_batch/verify_blob_kzg_proof_batch_case_a271b78b8e869d69/data.yaml: -------------------------------------------------------------------------------- 1 | input: 2 | blobs: [] 3 | commitments: [] 4 | proofs: [] 5 | output: true 6 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_02e696ada7d4631d/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_05c1f3685f3393f0/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_08f9e2f1cb3d39db/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_0cf79b17cb5f4ea2/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_177b58dc7a46b08f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_1ce8e4f69d5df899/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x92c51ff81dd71dab71cefecd79e8274b4b7ba36a0f40e2dc086bc4061c7f63249877db23297212991fd63e07b7ebc348'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_26b753dec0560daa/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x73e66878b46ae3705eb6a46a89213de7d3686828bfce5c19400fffff00100001', 3 | proof: '0xb82ded761997f2c6f1bb3db1e1dada2ef06d936551667c82f659b75f99d2da2068b81340823ee4e829a93c9fbed7810d'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_2b76dc9e3abf42f3/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_31ebd010e6098750/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x1522a4a7f34e1ea350ae07c29c96c7e79655aa926122e95fe69fcbd932ca49e9', 3 | proof: '0xa62ad71d14c5719385c0686f1871430475bf3a00f0aa3f7b8dd99a9abc2160744faf0070725e00b60ad9a026a15b1a8c'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3208425794224c3f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_36817bfd67de97a8/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_392169c16a2e5ef6/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x304962b3598a0adf33189fdfd9789feab1096ff40006900400000003fffffffc', 3 | proof: '0xaa86c458b3065e7ec244033a2ade91a7499561f482419a3a372c42a636dad98262a2ce926d142fd7cfe26ca148efe8b4'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_395cf6d697d1a743/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3ac8dc31e9aa6a70/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3c1e8b38219e3e12/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x50625ad853cc21ba40594f79591e5d35c445ecf9453014da6524c0cf6367c359', 3 | proof: '0xb72d80393dc39beea3857cb3719277138876b2b207f1d5e54dd62a14e3242d123b5a6db066181ff01a51c26c9d2f400b'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3c87ec986c2656c2/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x6d928e13fe443e957d82e3e71d48cb65d51028eb4483e719bf8efcdf12f7c321', 3 | proof: '0xa444d6bb5aadc3ceb615b50d6606bd54bfe529f59247987cd1ab848d19de599a9052f1835fb0d0d44cf70183e19a68c9'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_3cd183d0bab85fb7/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_420f2a187ce77035/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x2bf4e1f980eb94661a21affc4d7e6e56f214fe3e7dc4d20b98c66ffd43cabeb0', 3 | proof: '0x89012990b0ca02775bd9df8145f6c936444b83f54df1f5f274fb4312800a6505dd000ee8ec7b0ea6d72092a3daf0bffb'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_444b73ff54a19b44/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x443e7af5274b52214ea6c775908c54519fea957eecd98069165a8b771082fd51', 3 | proof: '0xa060b350ad63d61979b80b25258e7cc6caf781080222e0209b4a0b074decca874afc5c41de3313d8ed217d905e6ada43'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_53a9bdf4f75196da/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_585454b31673dd62/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_7db4f140a955dd1a/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x58cdc98c4c44791bb8ba7e58a80324ef8c021c79c68e253c430fa2663188f7f2', 3 | proof: '0x9506a8dc7f3f720a592a79a4e711e28d8596854bac66b9cb2d6d361704f1735442d47ea09fda5e0984f0928ce7d2f5f6'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_83e53423a2dd93fe/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0xb0c829a8d2d3405304fecbea193e6c67f7c3912a6adc7c3737ad3f8a3b750425c1531a7426f03033a3994bc82a10609f'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_9b24f8997145435c/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xb9241c6816af6388d1014cd4d7dd21662a6e3d47f96c0257bce642b70e8e375839a880864638669c6a709b414ab8bffc'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_9b754afb690c47e1/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_a0be66af9a97ea52/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_af669445747d2585/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x6c28d6edfea2f5e1638cb1a8be8197549d52e133fa9dae87e52abb45f7b192dd', 3 | proof: '0x8a46b67dcba4e3aa66f9952be69e1ecbc24e21d42b1df2bfe1c8e28431c6221a3f1d09808042f5624e857710cb24fb69'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_af8b75f664ed7d43/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x64d3b6baf69395bde2abd1d43f99be66bc64581234fd363e2ae3a0d419cfc3fc', 3 | proof: '0x893acd46552b81cc9e5ff6ca03dad873588f2c61031781367cfea2a2be4ef3090035623338711b3cf7eff4b4524df742'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_b6cb6698327d9835/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x6a75e4fe63e5e148c853462a680c3e3ccedea34719d28f19bf1b35ae4eea37d6', 3 | proof: '0xa38758fca85407078c0a7e5fd6d38b34340c809baa0e1fed9deaabb11aa503062acbbe23fcbe620a21b40a83bfa71b89'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_b6ec3736f9ff2c62/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xa256a681861974cdf6b116467044aa75c85b01076423a92c3335b93d10bf2fcb99b943a53adc1ab8feb6b475c4688948'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_becf2e1641bbd4e6/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_c3d4322ec17fe7cd/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_c5e1490d672d026d/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x24d25032e67a7e6a4910df5834b8fe70e6bcfeeac0352434196bdf4b2485d5a1', 3 | proof: '0x873033e038326e87ed3e1276fd140253fa08e9fc25fb2d9a98527fc22a2c9612fbeafdad446cbc7bcdbdcd780af2c16a'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_cae5d3491190b777/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x2c9ae4f1d6d08558d7027df9cc6b248c21290075d2c0df8a4084d02090b3fa14', 3 | proof: '0xb059c60125debbbf29d041bac20fd853951b64b5f31bfe2fa825e18ff49a259953e734b3d57119ae66f7bd79de3027f6'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_d0992bc0387790a4/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x4882cf0609af8c7cd4c256e63a35838c95a9ebbf6122540ab344b42fd66d32e1', 3 | proof: '0x987ea6df69bbe97c23e0dd948cf2d4490824ba7fea5af812721b2393354b0810a9dba2c231ea7ae30f26c412c7ea6e3a'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_d736268229bd87ec/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x5fd58150b731b4facfcdd89c0e393ff842f5f2071303eff99b51e103161cd233', 3 | proof: '0x94425f5cf336685a6a4e806ad4601f4b0d3707a655718f968c57e225f0e4b8d5fd61878234f25ec59d090c07ea725cf4'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_e68d7111a2364a49/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x549345dd3612e36fab0ab7baffe3faa5b820d56b71348c89ecaf63f7c4f85370', 3 | proof: '0xa35c4f136a09a33c6437c26dc0c617ce6548a14bc4af7127690a411f5e1cde2f73157365212dbcea6432e0e7869cb006'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_ed6b180ec759bcf6/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x5ee1e9a4a06a02ca6ea14b0ca73415a8ba0fba888f18dde56df499b480d4b9e0', 3 | proof: '0xa1fcd37a924af9ec04143b44853c26f6b0738f6e15a3e0755057e7d5460406c7e148adb0e2d608982140d0ae42fe0b3b'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_f0ed3dc11cdeb130/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x1ed7d14d1b3fb1a1890d67b81715531553ad798df2009b4311d9fe2bea6cb964', 3 | proof: '0xa71f21ca51b443ad35bb8a26d274223a690d88d9629927dc80b0856093e08a372820248df5b8a43b6d98fd52a62fa376'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_f47eb9fc139f6bfd/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x60f840641ec0d0c0d2b77b2d5a393b329442721fad05ab78c7b98f2aa3c20ec9', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_f7f44e1e864aa967/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x61157104410181bdc6eac224aa9436ac268bdcfeecb6badf71d228adda820af3', 3 | proof: '0x809adfa8b078b0921cdb8696ca017a0cc2d5337109016f36a766886eade28d32f205311ff5def247c3ddba91896fae97'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_ffa6e97b97146517/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_05c1f3685f3393f0/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_177b58dc7a46b08f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_2b76dc9e3abf42f3/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_395cf6d697d1a743/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_585454b31673dd62/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_twos_poly_a0be66af9a97ea52/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_02e696ada7d4631d/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_0cf79b17cb5f4ea2/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_3208425794224c3f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_3ac8dc31e9aa6a70/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_c3d4322ec17fe7cd/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_correct_proof_point_at_infinity_for_zero_poly_ffa6e97b97146517/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: true 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_02e696ada7d4631d/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_05c1f3685f3393f0/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_08f9e2f1cb3d39db/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_0cf79b17cb5f4ea2/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_177b58dc7a46b08f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_1ce8e4f69d5df899/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x9779b8337f00de6aeac881256198bd2db2fe95bc3127ad9e6440d9e4d1e785b455f55fcfe80a3434dc40f8e6df85be88'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_26b753dec0560daa/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x73e66878b46ae3705eb6a46a89213de7d3686828bfce5c19400fffff00100001', 3 | proof: '0x90f53a4837bbde6ab0838fef0c0be5339ab03a78342c221cf6b2d6e465d01a3d47585a808c9d8d25dee885007deeb107'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_2b76dc9e3abf42f3/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_31ebd010e6098750/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x1522a4a7f34e1ea350ae07c29c96c7e79655aa926122e95fe69fcbd932ca49e9', 3 | proof: '0xb9b65c2ebc89e669cf19e82fb178f0d1e9c958edbebe9ead62e97e95e2dcdc4972729fb9661f0cae3532b71b2664a8c1'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3208425794224c3f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_36817bfd67de97a8/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_392169c16a2e5ef6/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x304962b3598a0adf33189fdfd9789feab1096ff40006900400000003fffffffc', 3 | proof: '0xb08a5afbb1717334e08e05576b07bff58e8851d8cfd9ea71da1ab4233ad4217cffabd669dfa89c3ebf4c44f91694a2f4'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_395cf6d697d1a743/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3ac8dc31e9aa6a70/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3c1e8b38219e3e12/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x50625ad853cc21ba40594f79591e5d35c445ecf9453014da6524c0cf6367c359', 3 | proof: '0x90559bfd8e58f5d144588a1a959c93aba58607777e09893f088e404eb2dc47c0269ed8e47c1be79ea07ae726abd921a8'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3c87ec986c2656c2/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x6d928e13fe443e957d82e3e71d48cb65d51028eb4483e719bf8efcdf12f7c321', 3 | proof: '0x8d72dc4eec977090f452b412a6b0a3cdced2ea6b622ebb6e289c7e05d85cc715b93eca244123c84a60b3ecbf33373903'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_3cd183d0bab85fb7/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_420f2a187ce77035/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x2bf4e1f980eb94661a21affc4d7e6e56f214fe3e7dc4d20b98c66ffd43cabeb0', 3 | proof: '0x99c282db3a79a9ec1553306515e6a71dc43df1ddbd1dbd9d5b71f3c1798ef482f5e1fd84500b0e47c82f72a189ecd526'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_444b73ff54a19b44/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x443e7af5274b52214ea6c775908c54519fea957eecd98069165a8b771082fd51', 3 | proof: '0xa7de1e32bb336b85e42ff5028167042188317299333f091dd88675e84a550577bfa564b2f57cd2498e2acf875e0aaa40'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_53a9bdf4f75196da/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_585454b31673dd62/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_7db4f140a955dd1a/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x58cdc98c4c44791bb8ba7e58a80324ef8c021c79c68e253c430fa2663188f7f2', 3 | proof: '0xb0ac600174134691bf9d91fee448b4d58c127356567da1c456b9c38468909d4effe6b7faa11177e1f96ee5d2834df001'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_83e53423a2dd93fe/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0x8e3069b19e6e71aed9b7dc8fbba13e4217d91cfc59be47cfaa7d09ef626242517541992c0f76091ddabf271682cc7c2c'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_9b24f8997145435c/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xafc13cef6ed41f7abe142d32d7b5354e5664bd4b6d52080460dd404dc2cb26269c24826d2bcd0152d0b55ee0a9e90289'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_9b754afb690c47e1/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_a0be66af9a97ea52/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa572cbea904d67468808c8eb50a9450c9721db309128012543902d0ac358a62ae28f75bb8f1c7c42c39a8c5529bf0f4e', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x0000000000000000000000000000000000000000000000000000000000000002', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_af669445747d2585/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x6c28d6edfea2f5e1638cb1a8be8197549d52e133fa9dae87e52abb45f7b192dd', 3 | proof: '0xa88d68fe3ad0d09b07f4605b1364c8d4804bf7096dae003d821cc01c3b7d35c6d1fdae14e2db3c05e1cdcea7c7b7f262'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_af8b75f664ed7d43/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x64d3b6baf69395bde2abd1d43f99be66bc64581234fd363e2ae3a0d419cfc3fc', 3 | proof: '0xaf08cbca9deec336f2a56ca0b202995830f238fc3cb2ecdbdc0bbb6419e3e60507e823ff7dcbd17394cea55bc514716c'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_b6cb6698327d9835/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x6a75e4fe63e5e148c853462a680c3e3ccedea34719d28f19bf1b35ae4eea37d6', 3 | proof: '0x861a2aef7aa82db033bfa125b9f756afecaf1db28384925d5007bcf7dff1a53b72bdf522610303075aeecab41685d720'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_b6ec3736f9ff2c62/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x82f1cd05471ab6ff21bcfd5c3369cba05b03a872a10829236d184fe1872767c391c2aa7e3b85babb1e6093b7224e7732'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_becf2e1641bbd4e6/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb7f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_c3d4322ec17fe7cd/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_c5e1490d672d026d/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x24d25032e67a7e6a4910df5834b8fe70e6bcfeeac0352434196bdf4b2485d5a1', 3 | proof: '0xacd56791e0ab0d1b3802021862013418993da2646e87140e12631e2914d9e6c676466aa3adfc91b61f84255544cab544'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_cae5d3491190b777/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x2c9ae4f1d6d08558d7027df9cc6b248c21290075d2c0df8a4084d02090b3fa14', 3 | proof: '0xa4cc8c419ade0cf043cbf30f43c8f7ee6da3ab8d2c15070f323e5a13a8178fe07c8f89686e5fd16565247b520028251b'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_d0992bc0387790a4/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x4882cf0609af8c7cd4c256e63a35838c95a9ebbf6122540ab344b42fd66d32e1', 3 | proof: '0xb8f731ba6a52e419ffc843c50d2947d30e933e3a881b208de54149714ece74a599503f84c6249b5fd8a7c70189882a6b'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_d736268229bd87ec/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x93efc82d2017e9c57834a1246463e64774e56183bb247c8fc9dd98c56817e878d97b05f5c8d900acf1fbbbca6f146556', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x5fd58150b731b4facfcdd89c0e393ff842f5f2071303eff99b51e103161cd233', 3 | proof: '0x84c349506215a2d55f9d06f475b8229c6dedc08fd467f41fabae6bb042c2d0dbdbcd5f7532c475e479588eec5820fd37'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_e68d7111a2364a49/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x549345dd3612e36fab0ab7baffe3faa5b820d56b71348c89ecaf63f7c4f85370', 3 | proof: '0x94fce36bf7e9f0ed981728fcd829013de96f7d25f8b4fe885059ec24af36f801ffbf68ec4604ef6e5f5f800f5cf31238'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_ed6b180ec759bcf6/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x5ee1e9a4a06a02ca6ea14b0ca73415a8ba0fba888f18dde56df499b480d4b9e0', 3 | proof: '0xb3477fc9a5bfab5fdb5523251818ee5a6d52613c59502a3d2df58217f4e366cd9ef37dee55bf2c705a2b08e7808b6fa0'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_f0ed3dc11cdeb130/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xb49d88afcd7f6c61a8ea69eff5f609d2432b47e7e4cd50b02cdddb4e0c1460517e8df02e4e64dc55e3d8ca192d57193a', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x1ed7d14d1b3fb1a1890d67b81715531553ad798df2009b4311d9fe2bea6cb964', 3 | proof: '0x98e15cbf800b69b90bfcaf1d907a9889c7743f7e5a19ee4b557471c005600f56d78e3dd887b2f5b87d76405b80dd2115'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_f47eb9fc139f6bfd/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x60f840641ec0d0c0d2b77b2d5a393b329442721fad05ab78c7b98f2aa3c20ec9', 3 | proof: '0x98613e9e1b1ed52fc2fdc54e945b863ff52870e6565307ff9e32327196d7a03c428fc51a9abedc97de2a68daa1274b50'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_f7f44e1e864aa967/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x61157104410181bdc6eac224aa9436ac268bdcfeecb6badf71d228adda820af3', 3 | proof: '0xa1d8f2a5ab22acdfc1a9492ee2e1c2cbde681b51b312bf718821937e5088cd8ee002b718264027d10c5c5855dabe0353'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_ffa6e97b97146517/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x0000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_392169c16a2e5ef6/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000', y: '0x304962b3598a0adf33189fdfd9789feab1096ff40006900400000003fffffffc', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_3c1e8b38219e3e12/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000000', y: '0x50625ad853cc21ba40594f79591e5d35c445ecf9453014da6524c0cf6367c359', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_3c87ec986c2656c2/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d36306', y: '0x6d928e13fe443e957d82e3e71d48cb65d51028eb4483e719bf8efcdf12f7c321', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_420f2a187ce77035/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000002', y: '0x2bf4e1f980eb94661a21affc4d7e6e56f214fe3e7dc4d20b98c66ffd43cabeb0', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_83e53423a2dd93fe/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_incorrect_proof_point_at_infinity_ed6b180ec759bcf6/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x5eb7004fe57383e6c88b99d839937fddf3f99279353aaf8d5c9a75f91ce33c62', y: '0x5ee1e9a4a06a02ca6ea14b0ca73415a8ba0fba888f18dde56df499b480d4b9e0', 3 | proof: '0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'} 4 | output: false 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_commitment_1b44e341d56c757d/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0xb0c829a8d2d3405304fecbea193e6c67f7c3912a6adc7c3737ad3f8a3b750425c1531a7426f03033a3994bc82a10609f'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_commitment_32afa9561a4b3b91/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0xb0c829a8d2d3405304fecbea193e6c67f7c3912a6adc7c3737ad3f8a3b750425c1531a7426f03033a3994bc82a10609f'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_commitment_3e55802a5ed3c757/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb00', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0xb0c829a8d2d3405304fecbea193e6c67f7c3912a6adc7c3737ad3f8a3b750425c1531a7426f03033a3994bc82a10609f'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_commitment_e9d3e9ec16fbc15f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde0', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0xb0c829a8d2d3405304fecbea193e6c67f7c3912a6adc7c3737ad3f8a3b750425c1531a7426f03033a3994bc82a10609f'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_proof_1b44e341d56c757d/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_proof_32afa9561a4b3b91/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0x8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_proof_3e55802a5ed3c757/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0x97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb00'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_proof_e9d3e9ec16fbc15f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0xa421e229565952cfff4ef3517100a97da1d4fe57956fa50a442f92af03b1bf37adacc8ad4ed209b31287ea5bb94d9d06', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffffe', 3 | proof: '0x8123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde0'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_35d08d612aad2197/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_4aa6def8c35c9097/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0xffffffffffffffffffffffffffffffff00000000000000000000000000000000', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_4e51cef08a61606f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x00000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_64b9ff2b8f7dddee/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000002', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_b358a2e763727b70/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x000000000000000000000000000000000000000000000000000000000000000000', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_y_eb0601fec84cc5e9/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x0000000000000000000000000000000000000000000000000000000000000001', y: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_35d08d612aad2197/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', y: '0x60f840641ec0d0c0d2b77b2d5a393b329442721fad05ab78c7b98f2aa3c20ec9', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_4aa6def8c35c9097/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0xffffffffffffffffffffffffffffffff00000000000000000000000000000000', y: '0x60f840641ec0d0c0d2b77b2d5a393b329442721fad05ab78c7b98f2aa3c20ec9', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_4e51cef08a61606f/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x00000000000000000000000000000000000000000000000000000000000000', y: '0x60f840641ec0d0c0d2b77b2d5a393b329442721fad05ab78c7b98f2aa3c20ec9', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_64b9ff2b8f7dddee/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000002', y: '0x60f840641ec0d0c0d2b77b2d5a393b329442721fad05ab78c7b98f2aa3c20ec9', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_b358a2e763727b70/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x000000000000000000000000000000000000000000000000000000000000000000', y: '0x60f840641ec0d0c0d2b77b2d5a393b329442721fad05ab78c7b98f2aa3c20ec9', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | -------------------------------------------------------------------------------- /tests/verify_kzg_proof/verify_kzg_proof_case_invalid_z_eb0601fec84cc5e9/data.yaml: -------------------------------------------------------------------------------- 1 | input: {commitment: '0x8f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7', 2 | z: '0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001', y: '0x60f840641ec0d0c0d2b77b2d5a393b329442721fad05ab78c7b98f2aa3c20ec9', 3 | proof: '0xb30b3d1e4faccc380557792c9a0374d58fa286f5f75fea48870585393f890909cd3c53cfe4897e799fb211b4be531e43'} 4 | output: null 5 | --------------------------------------------------------------------------------