Minimal 4844 version of c-kzg
Go to file
Justin Traglia 1d3558cec2
Update rust bindings (#143)
* Update rust bindings

* Remove old test vectors

* Add #[must_use] in C_KZG_RET to avoid future missing retval checks

* Replace expect with unwrap

* Fix generate_random_commitment()

* Turn some camels to snakes

* Capitalize some consts

* Improve a bench loop

* Kill a useless extern

---------

Co-authored-by: George Kadianakis <desnacked@riseup.net>
2023-02-22 18:33:15 +02:00
.github/workflows Update csharp bindings (#146) 2023-02-21 09:57:25 -06:00
bindings Update rust bindings (#143) 2023-02-22 18:33:15 +02:00
blst@ca03e11a3f Upgrade blst & remove sha256 patch (#85) 2023-01-25 20:07:15 +00:00
inc Use BYTES_PER_FIELD_ELEMENT 2022-11-04 11:44:57 -07:00
lib Insert lib/ directory and update Readme 2021-02-02 11:36:36 +00:00
src Add more unit tests (#137) 2023-02-22 08:42:57 -06:00
tests Add test files (#141) 2023-02-20 16:04:10 +00:00
.gitignore Add c_kzg_calloc function (#130) 2023-02-12 21:29:29 +00:00
.gitmodules Upgrade blst & remove sha256 patch (#85) 2023-01-25 20:07:15 +00:00
LICENSE Initial commit 2021-02-01 20:15:45 +00:00
README.md Interface changes to free the blobs (#123) 2023-02-20 15:52:12 +00:00
go.mod Move go.mod & go.sum to repo root (#88) 2023-01-26 22:42:56 +00:00
go.sum Move go.mod & go.sum to repo root (#88) 2023-01-26 22:42:56 +00:00

README.md

C-KZG-4844: A minimal library for EIP-4844 Polynomial Commitments

This is a copy of C-KZG stripped-down to support the Polynomial Commitments API:

  • blob_to_kzg_commitment
  • compute_kzg_proof
  • verify_kzg_proof
  • compute_blob_kzg_proof
  • verify_blob_kzg_proof
  • verify_blob_kzg_proof_batch

We also provide functions for loading/freeing the trusted setup:

  • load_trusted_setup
  • load_trusted_setup_file
  • free_trusted_setup

Installation

Initialize the blst submodule:

git submodule update --init

Build blst:

cd src
make blst

Build the C-KZG code:

cd src
make