lambdaworks
lambdaworks copied to clipboard
lambdaworks offers implementations for both SNARKs and STARKs provers, along with the flexibility to leverage their individual components for constructing customized SNARKs.
Fixed incorrect loop condition in `rand_fp4e()` and `rand_field_elements()` functions that used `result.capacity()` instead of `num` parameter, which could generate wrong number of test elements. Changes: - Replace `result.capacity()` with `num`...
Update sample_u64 to draw 8 bytes from advancing sources (DefaultTranscript: sample(); FeltTranscript/QuadFeltTranscript: sample(8)), ensuring subsequent calls produce different values without changing bias handling or adding new checks. What this fixes:...
The signature of [BN254AtePairing::compute_batch](https://github.com/lambdaclass/lambdaworks/blob/ad2a380641758cfbbe2de6f4a2d8e27684f0fed7/crates/math/src/elliptic_curve/short_weierstrass/curves/bn_254/pairing.rs#L156-L158) asks for a slice of tuples of references of its input. In Ethrex that means precompiles need to allocate an extra vector just to convert the...
1) Refactored resize_to_next_power_of_two to safely handle usize to u64 conversion with overflow fallback. 2) Added unit tests to validate resizing behavior and ensure data integrity.
# TITLE ## Description Description of the pull request changes and motivation. ## Type of change Please delete options that are not relevant. - [ ] New feature - [...
This commit updates the Pedersen hash benchmark to apply black_box to the input arguments (x and y) of the PedersenStarkCurve::hash function, rather than to its result. This change aligns with...
In https://github.com/lambdaclass/lambdaworks/blob/main/crates/math/src/errors.rs errors types are defined. But they implement neither Display, or Error. So they can't be use to bubble up seamlessly.