www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Any cryptographically secure pseudo-random number generator (CSPRNG)

reply "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
Hi,

Do you know any cryptographically secure pseudo-random number 
generator (CSPRNG) for D?

I know that we have std.random, but it is NOT cryptographically 
secure.

Thanks.
Aug 18 2013
parent reply "QAston" <qaston gmail.com> writes:
On Sunday, 18 August 2013 at 10:14:29 UTC, ilya-stromberg wrote:
 Hi,

 Do you know any cryptographically secure pseudo-random number 
 generator (CSPRNG) for D?

 I know that we have std.random, but it is NOT cryptographically 
 secure.

 Thanks.
You may be interested in https://github.com/D-Programming-Deimos/openssl - D bindings for openssl.
Aug 18 2013
next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/18/2013 12:32 PM, QAston wrote:
 On Sunday, 18 August 2013 at 10:14:29 UTC, ilya-stromberg wrote:
 Hi,

 Do you know any cryptographically secure pseudo-random number generator
 (CSPRNG) for D?

 I know that we have std.random, but it is NOT cryptographically secure.

 Thanks.
You may be interested in https://github.com/D-Programming-Deimos/openssl - D bindings for openssl.
I agree. I'd call a C one from D that is accepted by the crypto community as secure, rather than invent an insecure one.
Aug 18 2013
prev sibling parent reply "ilya-stromberg" <ilya-stromberg-2009 yandex.ru> writes:
On Sunday, 18 August 2013 at 19:32:50 UTC, QAston wrote:
 You may be interested in 
 https://github.com/D-Programming-Deimos/openssl - D bindings 
 for openssl.
How can I get access to the /dev/random or /dev/urandom (Linux only)? Like a file via std.file, or D have spesial function?
Aug 19 2013
next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 19 August 2013 at 15:56:04 UTC, ilya-stromberg wrote:
 On Sunday, 18 August 2013 at 19:32:50 UTC, QAston wrote:
 You may be interested in 
 https://github.com/D-Programming-Deimos/openssl - D bindings 
 for openssl.
How can I get access to the /dev/random or /dev/urandom (Linux only)? Like a file via std.file, or D have spesial function?
I don't know of any special function to access them.
Aug 19 2013
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 8/19/2013 8:56 AM, ilya-stromberg wrote:
 On Sunday, 18 August 2013 at 19:32:50 UTC, QAston wrote:
 You may be interested in https://github.com/D-Programming-Deimos/openssl - D
 bindings for openssl.
How can I get access to the /dev/random or /dev/urandom (Linux only)? Like a file via std.file, or D have spesial function?
Access using the usual file I/O functions.
Aug 19 2013