Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-02-22 17:55:13


From: Jens Maurer <jmaurer_at_[hidden]>
> Greg Colvin wrote:
> > I've noticed that if your clock() function is fast enough you get
> > no entropy at all, no matter how high you set nbits, and if it's
> > slow enough you can get away with nbits < 8.
> [...]
> > I also made a Win32-specific version that has the virtue of not
> > tying up the CPU so much:
> [...]
>
> It looks like I have opened a can of worms with class random_device
> in random.hpp.

Not really. The version I posted can be tweaked with one paramater
to provide some entropy on most platforms. You can sometimes do
better on some particular platform, but so what.

> It looks like it's highly platform-dependent stuff. If it smells
> like cryptography, it may not be without legal restrictions in some
> countries.

The simple byte generator has no smell of crytography that I
can see. Once you start feeding its output to a cryptographic
hash algorithm that might be another story.

> All in all, I think I should remove it from random.hpp, copy the
> code & documentation over to a new docvault directory crypt_random
> and check out the Yarrow algorithm.

I wouldn't even call it crypt_random if you are worried about
the smell.

> However, I've only got Linux, so I am not very well suited for
> platform-specific development.

Between us all we cover lots of platforms.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk