* Sanity check that trusted setup was loaded in Lagrange form
* fixup! Sanity check that trusted setup was loaded in Lagrange form
* Fix some nits
* Fix another nit
---------
Co-authored-by: Justin Traglia <jtraglia@pm.me>
* Replace g1 points with g1 lagrange points
* Swap out validate_kzg_g1 with blst funcs
* Update minimal preset too
* Fix java & nodejs bindings
* Put variables in smaller scope
* Update some comments
* Remove FFTSettings (#2)
* Fix issue when expanding roots of unity
* Fix formatting
* Revert back to using intermediate array
* Add missing c_kzg_free
* Fix some nits
* Replace free_kzg_settings with free_trusted_setup
* Add parens to NUM_ELEMENTS
Co-authored-by: George Kadianakis <desnacked@riseup.net>
* Move memcpy to the end
* Revert "Move memcpy to the end"
This reverts commit 5331c7feadc92e4b5dd5d4e7512e4be563d7f386.
* Add comment about free_trusted_setup
* Move check before alloc
* Add remark
* Delete unnecessary blank line
* Fix asn's nits
* Update comment for roots_of_unity in header
Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>
* Fix formatting
* Update comment about max_scale
Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>
---------
Co-authored-by: Suphanat Chunhapanya <haxx.pop@gmail.com>
Co-authored-by: George Kadianakis <desnacked@riseup.net>
Co-authored-by: Gottfried Herold <GottfriedHerold@users.noreply.github.com>
* Run C tests on all platforms
* Don't install llvm on mac & add windows define
* Update blst settings for windows
* Install msvc on windows
* Don't specify blst as a library
* Try including -lmingw32
* Clean up makefile & test setting target
* Try using gcc for windows
* Don't treat warnings as errors on windows
* Test upping stack size
* Ignore some tasks on windows
* Clean up some things
* Fix indentations
* Delete extra blank line
* More organization
* Remove windows check around sanitize
* Move XCRUN initialization back to top
* Move extra sanitize cflags out like the others
* Intentionally fail to compile with a FIELD_ELEMENTS_PER_BLOB value that is not a power of 2.
We do not want to support or maintain this case, so let us be explicit about it.
* Update src/c_kzg_4844.h
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
* Update src/c_kzg_4844.h
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
---------
Co-authored-by: George Kadianakis <desnacked@riseup.net>
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
VLA's are prone to cause (silent!) stack overflows and a potential cause of security vulns.
While the usage pattern is probably safe in our context, changing to a more robust solution seems prudent.
* Documentation update
* Documentation for division. Note that the doc says that the behaviour for a/0 is unspecified. Feel free to change.
* Add some Documentation. This fixes item #3 in https://hackmd.io/@6iQDuIePQjyYBqDChYw_jg/ByXAsi21h
* Moved documentation remark for doxygen @remark to in-code remark. The remark is not useful for API-documentation (it refers to a macro that is not part of the API).
* More verbose comment for bit_reversal_permutation.
* doxygen comment parameter name did not match variable name. Fix this.
* Remove parameter n from doxygen comment of compute_challenge, as there is no such argument.
This fixes#4 in https://hackmd.io/@6iQDuIePQjyYBqDChYw_jg/ByXAsi21h
* In compute_kzg_proof_impl, document the role of the m variable that is used to indicate whether the evaluation point is one of the interpolation points.
* Run `make format`
* Improve multiline comments from `make format` in middle of the code
---------
Co-authored-by: George Kadianakis <desnacked@riseup.net>
* Run clang sanitizers in CI + workflow cleanup
* Update makefile
* Update workflow names
* Simplify more
* Run go benchmarks in CI
* Fix indentation nits
* Initialize variable in fr_is_one
* Revert "Initialize variable in fr_is_one"
This reverts commit f4c2749e410c68479f83d78c9a1780efe191c7fe.
* Move .PHONY outside of condition
The previous statement was slightly wrong. Being a primite root does not mean r^( (q-1)/2) != 1.
If q=1 == 2^s * t, the latter is satisfied by e.g. t'th roots of unity, but those are not primitive roots by the usual definition.
Fortunately, the actual computation of 2^i'th roots of unity does not require a primitve root to start with, only a non-square.
* Update C files to new interface
* Switch CHALLENGE_INPUT_SIZE from a macro to a `const int`.
* Update README with the new public methods
---------
Co-authored-by: Justin Traglia <jtraglia@pm.me>