-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
Lines 364 to 366 in d1e6bb8
std::random_device rng; | |
std::uniform_int_distribution<uint64_t> dist; | |
m_basis = m_field.FromSeed(dist(rng)); |
I noticed that minisketch is using std::uniform_int_distribution and std::random_device... might make sense to do seeding as an input parameter as std::random_device might, on some platforms, give you the same seed for every object made. Then users of the library can use their own high-quality entropy.
Also of note: std::uniform_int_distribution can be platform dependent (in case any tests against vectors or other behavior are supposed to rely on a specific value being generated). May be better to swap it for a custom implementation, or drop it entirely -- it should be possible to directly use e.g. FastRandomContext.rand64() for uniform over 64 bits.
Metadata
Metadata
Assignees
Labels
No labels