Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97921 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62643 invoked from network); 22 Jan 2017 09:40:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2017 09:40:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.45 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.215.45 mail-lf0-f45.google.com Received: from [209.85.215.45] ([209.85.215.45:33293] helo=mail-lf0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/C3-00729-72E74885 for ; Sun, 22 Jan 2017 04:40:55 -0500 Received: by mail-lf0-f45.google.com with SMTP id k86so79516918lfi.0 for ; Sun, 22 Jan 2017 01:40:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K+QNQRozRWvN9s61BLvxEA7g3m+0pTHZWIZfGCHxKpk=; b=M/Fwg0CW36tl6gMYyK/Z9Mn+JFVGPhvyB8uUmlT4R39afNAFxJH/dbICYTwQd6tuWn 8x/JfAxIGsN30Jl38I9Xo14YZ9GggGMd9YyvF+Yj1imaao8x8IWk6vqn0jn4JMX8JoPX SGvQYZnU0GeiJ/op5mCtZH/v4QydnipSuKtaFHDS4/lmxNIlgm6+aGX30TnPJQmW8yMM zV7coaHkQHtabygi6dgUs4/zjSLLshsqJTKsne7JTZ4KJVEiB8gSgX7RPYjoI2D5jcD4 Cv3zxH1/WrcWI4X/SYcRMUukWYousmGQWdsvu8XsKRr+AM387/cnmN7D47w40SRrNNNS t4ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K+QNQRozRWvN9s61BLvxEA7g3m+0pTHZWIZfGCHxKpk=; b=oYKa55ipSEg48TIfCnrIltFHQ9x5YADdeArAqt3fOg99kfQyRAF98suwUCnk1+QhJF 8NbbFonmSW4/mWbX1D2Z7hmJ3wYcAOcsIIpm44PKW++Qp+Qx44LqOT1Fm2yChN2sdZ8Q 0dlnmD36C+gcUguS0JNK3yEuNB//fJWxIF3K/R6wA5SSBqkzKOx+3PhgO9F+Kjwqu4Er 3PYrtvGovxvaEEBbzZwsXGVruEtjXPDUFIfy0FQGEO498ZuWJpj0awoD7WUPI3vlD/ks ojpLe44/gCuIgBHRfeo9Emg7H+GwiyLhJCI2L73Ro7ae2mg1eJ8Hzl2w1WNX7F/ER9fO 0nxQ== X-Gm-Message-State: AIkVDXLeWYpbMJZvX8I/6peT918FPaMNkUKwBC2pIvJ889ZB0pyLACBKPM2FWxgXLPQIyfmLZsTiJW3Q7Tr66A== X-Received: by 10.25.25.133 with SMTP id 127mr2559303lfz.153.1485078051945; Sun, 22 Jan 2017 01:40:51 -0800 (PST) MIME-Version: 1.0 References: <71c26cd6df6f59e76dafd31647852c2e@koti.fimnet.fi> <142a3537a99809cf23d78e0eaadc3aef@gmail.com> <7a359bb08b0ad8b046534c15492cec91@gmail.com> <8cfe7a3ea5a05fc3e5347e9af848ada0@gmail.com> In-Reply-To: Date: Sun, 22 Jan 2017 09:40:41 +0000 Message-ID: To: Niklas Keller , Yasuo Ohgaki Cc: =?UTF-8?Q?Lauri_Kentt=C3=A4?= , Nikita Popov , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11401d9cc005590546abadff Subject: Re: [PHP-DEV] Re: Improving mt_rand() seed From: leight@gmail.com (Leigh) --001a11401d9cc005590546abadff Content-Type: text/plain; charset=UTF-8 On Sat, 21 Jan 2017 at 14:41 Niklas Keller wrote: > Anyway, the "issue" with mt_rand is not the seed being predictable but the > internal state being recoverable from the output. But mt_rand is > predictable by design, so why should we even seed it with a CSPRNG by > default? > > > For the record, when I was making RNG changes for 7.1, I did look at the mt_rand seed mechanism, and decided it was _good enough_ for the purposes of mt_rand. State recovery can actually be done with as few as 624 sequential outputs, you will never be able to get away from that. Even with a fully CSPRNG generated state, if an attacker gets 624 outputs after the state is twisted, the RNG is compromised. --001a11401d9cc005590546abadff--