Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve FLP testing and add tooling to "test-util" #900

Merged
merged 2 commits into from
Jan 11, 2024
Merged

Conversation

cjpatton
Copy link
Collaborator

@cjpatton cjpatton commented Jan 11, 2024

Closes #898.

Implement a new struct, flp::test_util::FlpTest, for driving generic tests for FLPs. This tool subsumes most of the functionality of flp_validity_test(). The irregular length tests have been dropped such that the valid() is no longer required to do bounds checking itself.

Remove flp_validity_test() and replace each use with FlpTest.

@cjpatton cjpatton requested a review from a team as a code owner January 11, 2024 02:19
src/flp.rs Show resolved Hide resolved
src/flp.rs Show resolved Hide resolved
src/flp/types/fixedpoint_l2.rs Outdated Show resolved Hide resolved
src/flp.rs Outdated Show resolved Hide resolved
@cjpatton cjpatton force-pushed the cjpatton/898 branch 2 times, most recently from c1e3ff0 to 8cf7f2b Compare January 11, 2024 16:36
Implement a new struct, `flp::test_util::FlpTest`, for driving generic
tests for FLPs. This tool subsumes most of the functionality of
`flp_validity_test()`. The irregular length tests have been dropped such
that the `valid()` is no longer required to do bounds checking itself.

Remove `flp_validity_test()` and replace each use with `FlpTest`.
src/flp.rs Show resolved Hide resolved
@cjpatton
Copy link
Collaborator Author

cargo build --no-default-features was failing because it needed random_vector() to be in the empty feature set. This is currently only included with "crypto-dependencies". I decided to resolve this by re-implemnting this function with TurboSHAKE128.

@cjpatton cjpatton force-pushed the cjpatton/898 branch 2 times, most recently from 9247c8e to a1bc281 Compare January 11, 2024 18:57
src/prng.rs Outdated Show resolved Hide resolved
Re-implement `random_vector()` with `XofTurboShake128` so that we don't
have to enable the "crypto-dependencies" feature to use it. The current
implementation uses `SeedStreamAes128`, which is necessarily behind this
feature.
@cjpatton cjpatton merged commit 45b31ac into main Jan 11, 2024
6 checks passed
@cjpatton cjpatton deleted the cjpatton/898 branch January 11, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add flp_validity_test to test-utils
3 participants