Boost logo

Boost :

Subject: Re: [boost] boost::random, header-only, boost::uuids::detail::seed_rng, and UWP development
From: degski (degski_at_[hidden])
Date: 2017-09-12 13:27:50


On 12 September 2017 at 15:40, James E. King, III via Boost <
boost_at_[hidden]> wrote:

> The older WinCrypt calls are not available in some Windows platforms going
> forward, so this is
> going to become a problem pretty quickly for the community.
>

You worry too much, just call rand_s
<https://msdn.microsoft.com/en-us/library/sxtz2fa8.aspx> (the same thing
under the hood, but taking care of any WinCrypt BCrypt, whatever issues).

In the boostorg/uuid library there is a seed_rng class which is doing
> similar things (however providing more entropy) and the library is
> header-only.

The rand_s function uses the operating system to generate cryptographically
secure random numbers. It doesn't get better than that, maybe a call to
RdRand <https://en.wikipedia.org/wiki/RdRand#RDSEED> on a current Intel
CPU, which would use thermal noise (but you'll have to take Intel's word
for it and just cross your fingers they didn't sell you out to a 3-letter
agency).

degski

-- 
"*Ihre sogenannte Religion wirkt bloß wie ein Opiat reizend, betäubend,
Schmerzen aus Schwäche stillend.*" - Novalis 1798

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