Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93992 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84451 invoked from network); 15 Jun 2016 03:20:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jun 2016 03:20:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.172 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.220.172 mail-qk0-f172.google.com Received: from [209.85.220.172] ([209.85.220.172:34237] helo=mail-qk0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DE/C9-27860-B69C0675 for ; Tue, 14 Jun 2016 23:20:11 -0400 Received: by mail-qk0-f172.google.com with SMTP id s186so8067727qkc.1 for ; Tue, 14 Jun 2016 20:20:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=PGgXJJVk2nAjCbOakezLYThPpSb0Djqq4kq6icptj3c=; b=DzMRNgA/3WcBb4zKnO8XYJFT1eEp+Qx4eXg7cSfYwUV4f6p9G5j5mFOUrNzvyI8Ffv ZYEjeLFr5QIYnOsO7+ThgdGFj1Cos12va+D2i0A3MS8hIfyCZM5Z6bOVyUZNpYkB/VYl c+ilmdA+SwoI7EpjEWAH/83phrwfo1zCH5kWsH8XRCUsnXM8S+oyfNLtZI8kuE4Gy65c SHMFSRu0QSvwkEznhthBYvyf5YtzIYJtb3AqTk4iQaiBOCNHkaqnlnoPFiCYxkbsMhCX 9nKKvqaXUUbajCNFXkExsETE45JE4AHd4ZrBV2rZzGqPDREkPbCF1usVRo+wk2oC5Rag /tiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=PGgXJJVk2nAjCbOakezLYThPpSb0Djqq4kq6icptj3c=; b=MO3cx7O6mayQ92Z5sQ4QERJEOHhbRR+UQa77MPp2SXKqezuP/7e6HLy5dsbWa5wB2W l5SsByRwJMMFrm+vuB8H97pSr5kNuPgUSctp+ItRBriBbUmOmc3AlK6749HPz5PcLe3G p36FiK5Lel0hcrnJbJ0Xe7qj5mFGltD/iwVIKx6FQfhn3ljYVE/4s15vIqO6KjRD1hlc aHetdseRypcjsC2QehS+OeDsnWPohU8vQseczh3Z3OrJNbAUcrXCdvbivNDjo9Vk23n6 jdK7lqEMRnQtFLdmFMBLpgUbCxslKTlXpmEqmXGEsX3ljxq/usZRRzC7ejs5SEzgKI/5 ZHKw== X-Gm-Message-State: ALyK8tKUPDXs7p6DtFLSyTKLuEhVy7moHG0ogiLGgpg+hh8eOIoQ5FDETm0Fe6dYxx/v4jUheRHDseFWV7yrgg== X-Received: by 10.55.122.134 with SMTP id v128mr23947781qkc.28.1465960808376; Tue, 14 Jun 2016 20:20:08 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.140.23.6 with HTTP; Tue, 14 Jun 2016 20:19:28 -0700 (PDT) In-Reply-To: References: Date: Wed, 15 Jun 2016 12:19:28 +0900 X-Google-Sender-Auth: VmsXiLNcgctCn7UolQXJpW4KAfY Message-ID: To: Leigh Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] RNG fixes From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Leigh, On Wed, Jun 15, 2016 at 1:46 AM, Leigh wrote: > > The issues I want to bring up for discussion are. > > * Replacing mt_rand() and rand() to a strong, modern RNG. > * Alternatively, fixing the current mt_rand() implementation to make it > standard > * Aliasing rand() to mt_rand() to improve output and cross-platform support > * Fixing RAND_RANGE for large ranges. > * Replacing insecure uses of php_rand() with php_random_bytes() > * Making the array_rand() algorithm more efficient > > The RFC can be found here: https://wiki.php.net/rfc/rng_fixes +1 in general. There should be a way to produce compatible random sequences for compatibility for reasonable periods, 5+ years at least. IMHO. INI switch for this is required. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net