nmathewson / libottery

A fast secure userspace pseudorandom number generator
Other
82 stars 22 forks source link

Split all the global state into its own file #2

Closed zackw closed 11 years ago

zackw commented 11 years ago

I can imagine using this library in contexts where it's important that nobody ever uses the global-state version of the API. For instance, in a web browser, you have a bunch of different security principals ("origins") under the same roof, and each one needs its own, independent RNG seed, so that their random number streams are uncorrelated.

It looks like the library headers already distinguish the "provide your own state" API from the "global shared state" API, so what I'm asking is for the C code for the global API be moved to its own file so that it's easy to leave out.

nmathewson commented 11 years ago

Done; thanks!