Re: unpredictableSeed

2013-03-04 Thread Andrea Fontana
On Monday, 4 March 2013 at 04:18:10 UTC, Rob T wrote: On Saturday, 2 March 2013 at 17:40:58 UTC, Joseph Rushton Wakeling wrote: Hello all, Can anyone advise on the theoretical basis for the unpredictableSeed method in std.random? I've tried googling around for the theory of good thread-safe

Re: unpredictableSeed

2013-03-04 Thread Joseph Rushton Wakeling
is statistically safe?, as there are lots of ways I can go about that. I'm concerned with the theoretical and practical justification for Phobos' existing unpredictableSeed, and possible superior alternatives that could reasonably be implemented _for Phobos_.

Re: unpredictableSeed

2013-03-04 Thread Rob T
-focus the discussion -- I'm not so much asking How do I ensure my own code is statistically safe?, as there are lots of ways I can go about that. I'm concerned with the theoretical and practical justification for Phobos' existing unpredictableSeed, and possible superior alternatives that could

Re: unpredictableSeed

2013-03-03 Thread Ivan Kazmenko
Can anyone advise on the theoretical basis for the unpredictableSeed method in std.random? I've tried googling around for the theory of good thread-safe seed generation methods but haven't really found anything. :-( I have to ask: what would be a good unpredictableSeed by definition

Re: unpredictableSeed

2013-03-03 Thread Johannes Pfau
Am Sun, 03 Mar 2013 09:58:41 +0100 schrieb Ivan Kazmenko ga...@mail.ru: Can anyone advise on the theoretical basis for the unpredictableSeed method in std.random? I've tried googling around for the theory of good thread-safe seed generation methods but haven't really found anything

Re: unpredictableSeed

2013-03-03 Thread Dmitry Olshansky
03-Mar-2013 12:58, Ivan Kazmenko пишет: Can anyone advise on the theoretical basis for the unpredictableSeed method in std.random? I've tried googling around for the theory of good thread-safe seed generation methods but haven't really found anything. :-( I have to ask: what would be a good

Re: unpredictableSeed

2013-03-03 Thread Jerome BENOIT
On 03/03/13 10:06, Johannes Pfau wrote: Am Sun, 03 Mar 2013 09:58:41 +0100 schrieb Ivan Kazmenkoga...@mail.ru: Can anyone advise on the theoretical basis for the unpredictableSeed method in std.random? I've tried googling around for the theory of good thread-safe seed generation methods

Re: unpredictableSeed

2013-03-03 Thread Joseph Rushton Wakeling
On 03/03/2013 09:58 AM, Ivan Kazmenko wrote: I have to ask: what would be a good unpredictableSeed by definition? With the current implementation, three downsides come to my mind: 1. Process ID, thread ID and system tick are insecure sources of randomness and can provide just a few bits

Re: unpredictableSeed

2013-03-03 Thread Joseph Rushton Wakeling
On 03/03/2013 10:06 AM, Johannes Pfau wrote: Maybe it would make sense to use /dev/random where available? (The problem is that /dev/random can block. On small embedded systems without monitor/mice/keyboard this can happen easily) I suppose theoretically you shouldn't be calling /dev/random

Re: unpredictableSeed

2013-03-03 Thread jerro
But from googling around I see that /dev/random can block fairly quickly, after only a handful of numbers :-( You can solve this by using /dev/urandom instead, as Jerome have said already. Is something equivalent available on Windows? There's CryptGenRandom.

Re: unpredictableSeed

2013-03-03 Thread Joseph Rushton Wakeling
On 03/03/2013 12:41 PM, jerro wrote: You can solve this by using /dev/urandom instead, as Jerome have said already. Yes, but this is less trustworthy from a randomness point of view. I might use it personally for something, but I wouldn't want to use it as the basis of a supposedly

Re: unpredictableSeed

2013-03-03 Thread Rob T
On Saturday, 2 March 2013 at 17:40:58 UTC, Joseph Rushton Wakeling wrote: Hello all, Can anyone advise on the theoretical basis for the unpredictableSeed method in std.random? I've tried googling around for the theory of good thread-safe seed generation methods but haven't really found

unpredictableSeed

2013-03-02 Thread Joseph Rushton Wakeling
Hello all, Can anyone advise on the theoretical basis for the unpredictableSeed method in std.random? I've tried googling around for the theory of good thread-safe seed generation methods but haven't really found anything. :-( Thanks best wishes, -- Joe