arkworks-rs / std

A standard library wrapper for use in the `arkworks` ecosystem
https://www.arkworks.rs
Apache License 2.0
37 stars 33 forks source link

Add method for randomly sampling non-zero elements #14

Open ValarDragon opened 3 years ago

ValarDragon commented 3 years ago

We should add a method either on UniformRand or on a trait thats auto-derivable for traits with UniformRand and Zero, in order to sample non-zero elements

_Originally posted by @ValarDragon in https://github.com/arkworks-rs/groth16/pull/16#discussion_r543727125_

burdges commented 3 years ago

You might glance at the distributions stuff from the rand crate, probably not quite right here but worth a quick look.