This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients barry, benjamin.peterson, christian.heimes, georg.brandl, neologix, pitrou, python-dev, sbt, vajrasky, vstinner
Date 2013-08-22.15:21:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM3GPaxEBTUygAm+qZYWoROduQbJNBWfEwzuOXZGNEPxsg@mail.gmail.com>
In-reply-to <521618E2.1080309@cheimes.de>
Content
>> PySSL_RAND_atfork_parent() still uses getpid(). This number is not
>> very random in the *parent* process :-)
>
> That's fine and doesn't diminish the properties of the PRNG. In fact the
> patch could use a hard coded value to perturb the PRNG. It's only
> important to modify the PRNG state of the *parent* process so that
> recycled PIDs of *child* processes don't lead to repeated pseudo-random
> values.

Yeah, it doesn't weaken the PRNG, but since we're using current time
and stack content to reseed it, using the parent PID which doesn't
change doesn't bring much (since we chose to add entropy and not just
a constant, which would be sufficient as you noted).

Anyway, for those interested, here's a reproducer.
Files
File name Uploaded
test.py neologix, 2013-08-22.15:21:26
History
Date User Action Args
2013-08-22 15:21:27neologixsetrecipients: + neologix, barry, georg.brandl, pitrou, vstinner, christian.heimes, benjamin.peterson, python-dev, sbt, vajrasky
2013-08-22 15:21:27neologixlinkissue18747 messages
2013-08-22 15:21:26neologixcreate