{"id":15639418,"url":"https://github.com/protolambda/go-kzg","last_synced_at":"2025-05-05T18:46:21.803Z","repository":{"id":43747118,"uuid":"306421132","full_name":"protolambda/go-kzg","owner":"protolambda","description":"FFT, data-recovery and KZG commitments, a.k.a. Kate commitments, in Go - *super experimental*","archived":false,"fork":false,"pushed_at":"2023-11-29T21:02:34.000Z","size":1384,"stargazers_count":91,"open_issues_count":5,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T22:51:14.637Z","etag":null,"topics":["bls12-381","data-availability-sampling","data-recovery","eth2","fft","kate","kate-commitment","kate-proofs","kzg","kzg-commitment","kzg-proofs","ntt","polynomial-commitments"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/protolambda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-22T18:07:39.000Z","updated_at":"2025-03-21T06:11:54.000Z","dependencies_parsed_at":"2024-10-22T17:22:01.641Z","dependency_job_id":null,"html_url":"https://github.com/protolambda/go-kzg","commit_stats":null,"previous_names":["protolambda/go-verkle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolambda%2Fgo-kzg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolambda%2Fgo-kzg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolambda%2Fgo-kzg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protolambda%2Fgo-kzg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/protolambda","download_url":"https://codeload.github.com/protolambda/go-kzg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252555809,"owners_count":21767230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bls12-381","data-availability-sampling","data-recovery","eth2","fft","kate","kate-commitment","kate-proofs","kzg","kzg-commitment","kzg-proofs","ntt","polynomial-commitments"],"created_at":"2024-10-03T11:25:47.005Z","updated_at":"2025-05-05T18:46:21.775Z","avatar_url":"https://github.com/protolambda.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KZG and FFT utils\n\nThis repo is *super experimental*.\n\nThis is an implementation in Go, initially aimed at chunkification and extension of data, \nand building/verifying KZG proofs for the output data.\nThe KZG proofs, or Kate proofs, are built on top of BLS12-381.\n\nPart of a low-latency data-availability sampling network prototype for Eth2 Phase 1.\nSee https://github.com/protolambda/eth2-das\n\nCode is based on:\n- [KZG Data availability code by Dankrad](https://github.com/ethereum/research/tree/master/kzg_data_availability)\n- [Verkle and FFT code by Dankrad and Vitalik](https://github.com/ethereum/research/tree/master/verkle)\n- [Reed solomon erasure code recovery with FFTs by Vitalik](https://ethresear.ch/t/reed-solomon-erasure-code-recovery-in-n-log-2-n-time-with-ffts/3039)\n- [FFT explainer by Vitalik](https://vitalik.ca/general/2019/05/12/fft.html)\n- [Kate explainer by Dankrad](https://dankradfeist.de/ethereum/2020/06/16/kate-polynomial-commitments.html)\n- [Kate amortized paper by Dankrad and Dmitry](https://github.com/khovratovich/Kate/blob/master/Kate_amortized.pdf)\n\nFeatures:\n- (I)FFT on `F_r`\n- (I)FFT on `G1`\n- Specialized FFT for extension of `F_r` data\n- KZG\n  - commitments\n  - generate/verify proof for single point\n  - generate/verify proofs for multiple points\n  - generate/verify proofs for all points, using FK20\n  - generate/verify proofs for ranges (cosets) of points, using FK20\n- Data recovery: given an arbitrary subset of data (at least half), recover the rest\n- Optimized for Data-availability usage\n- Change Bignum / BLS with build tags.\n\n## BLS\n\nCurrently supported BLS implementations: Herumi BLS and Kilic BLS (default).\n\n## Field elements (Fr)\n\nThe BLS curve order is used for the modulo math, different libraries could be used to provide this functionality.\nNote: some of these libraries do not have full BLS functionality, only Bignum / uint256. The KZG code will be excluded when compiling with a non-BLS build tag.\n\nBuild tag options:\n- (no build tags, default): Use Kilic BLS library. Previously used by `bignum_kilic` build tag. [`kilic/bls12-381`](https://github.com/kilic/bls12-381)\n- `-tags bignum_hbls`: use Herumi BLS library. [`herumi/bls-eth-go-binary`](https://github.com/herumi/bls-eth-go-binary/)\n- `-tags bignum_hol256`: Use the uint256 code that Geth uses, [`holiman/uint256`](https://github.com/holiman/uint256)\n- `-tags bignum_pure`: Use the native Go Bignum implementation.\n\n\n## Benchmarks\n\nSee [`BENCH.md`](./BENCH.md) for benchmarks of FFT, FFT in G1, FFT-extension, zero polynomials, and sample recovery.\n\n## License\n\nMIT, see [`LICENSE`](./LICENSE) file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotolambda%2Fgo-kzg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotolambda%2Fgo-kzg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotolambda%2Fgo-kzg/lists"}