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>
* Run static analysis in CI
* Remove analysis-report in make clean
* Add remark
* Remove the memory helper functions
* Revert "Remove the memory helper functions"
This reverts commit 364234aea02cca38ed40a5bce1bbc8f8eb02aee2.
* Remove swap file
* Start to add profiling
* Add include flags for macos
* Add profiling funcs for the other funcs
* Add profiling readme
* Move sentence
* Add warning section
* Make run_profiler phony
* Delete extra empty lines
* Add line about box size
* No more dropped nodes/edges
* Remove function focus
* Add sha256 benchmark
* Benchmark sha256 with different sizes
* Clean things up a little
* Cleanup the Makefile some
* Fix compiler error
* Fix compiler errors in tests
* Fix problems on Linux
* Add test_c_kzg_4844_cov to gitignore
* Add back closing brace for cpp
* Split clean rule into two lines
* Not echo commands when running them
* Allow other compilers to be used
* Update comment
* Only allow clang, actually
* Add test for compute_powers
* Remove extra blank line
* Make it better
* Run make format
* Make compute powers more efficient
* Use explicit memcpy
* Fix bug in my new implementation
* Slightly cleaner implementation
* Revert changes to compute_powers
* Run formatter
* Add some basic blob_to_kzg_commitment tests
* Rename field_element var
* Rephrase comment
* At point_at_infinity test case
* Update comments
* Use more descriptive test names
* Update comments
* Add sections
* Add "consistent_commitment" test
* Use Bytes* types
* Expose computeKzgProof
* Revert changes to bytes_to/from_bls_field
* Update comments
* Revert changes to bytes_from_bls_field
* Revert change to parameter name
* Add compute_kzg_proof to readme
* Refactor in support of asn's PR
* Clean up a little
* Fix param name doc
* Introduce Bytes32 type
* Update bindings
* Replaces bytes with b to match spec