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

Uniform randomization for field elements #213

Conversation

hackaugusto
Copy link
Contributor

This enables uniform randomization for field elements, taking in consideration the field modulus so that every element has equal probability.

When compiled with the feature rand, this enables the following:

let a: CubeExtension<BaseElement> = rand::thread_rng().gen(); // <-- use of `gen()`
let expected = a * a;
assert_eq!(expected, a.square());

@hackaugusto hackaugusto deleted the hacka-uniform-randomization-for-field-elements branch October 27, 2023 13:14
@hackaugusto hackaugusto restored the hacka-uniform-randomization-for-field-elements branch October 27, 2023 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants