Minimal 4844 version of c-kzg
Go to file
Ben Edgington 7de3c29ab6 Insert lib/ directory and update Readme 2021-02-02 11:36:36 +00:00
inc Initial commit 2021-02-01 20:15:45 +00:00
lib Insert lib/ directory and update Readme 2021-02-02 11:36:36 +00:00
.gitignore Initial commit 2021-02-01 20:15:45 +00:00
LICENSE Initial commit 2021-02-01 20:15:45 +00:00
Makefile Split out testing utils to separate file 2021-02-02 11:18:43 +00:00
README.md Insert lib/ directory and update Readme 2021-02-02 11:36:36 +00:00
c-kzg.h Initial commit 2021-02-01 20:15:45 +00:00
fft_fr.c Split out testing utils to separate file 2021-02-02 11:18:43 +00:00
fft_fr.h Split out testing utils to separate file 2021-02-02 11:18:43 +00:00
fft_fr_test.c Split out testing utils to separate file 2021-02-02 11:18:43 +00:00
test_util.c Split out testing utils to separate file 2021-02-02 11:18:43 +00:00
test_util.h Split out testing utils to separate file 2021-02-02 11:18:43 +00:00

README.md

c-kzg - work in progress

The very beginnings of a simple implementation of KZG commitments in C, using the Blst library from Supranational for field and curve operations.

Initially, at least, this largely follows the go-kzg implementation.

Done so far:

  • Rough and ready FFT and inverse FFT over the finite field.

Installation

Build the Blst library following the instructions there. Then,

  1. Copy the resulting libblst.a file into the lib/ directory here.
  2. From Blst's bindings/ directory copy blst.h and blst_aux.h to inc/

That is,

cp ../blst/libblast.a lib/
cp ../blst/bindings/*.h inc/

There's no library to make here yet, but you can run the tests.

Run tests

make test

Thanks to Acutest for the unit test harness, which is used here under the MIT licence.

Prerequisites

  • Blst library (see above)
  • clang compiler. I'm using Clang 10.0.0. I'll likely add gcc options in future.
  • I'm developing on Ubuntu 20.04. Will check portability later.