Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95845 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18801 invoked from network); 9 Sep 2016 11:17:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2016 11:17:40 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:60668] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 45/93-61313-C4A92D75 for ; Fri, 09 Sep 2016 07:17:39 -0400 Received: (qmail 105974 invoked by uid 89); 9 Sep 2016 11:17:29 -0000 Received: from unknown (HELO mail-qk0-f171.google.com) (yohgaki@ohgaki.net@209.85.220.171) by 0 with ESMTPA; 9 Sep 2016 11:17:29 -0000 Received: by mail-qk0-f171.google.com with SMTP id v123so77943260qkh.2 for ; Fri, 09 Sep 2016 04:17:28 -0700 (PDT) X-Gm-Message-State: AE9vXwMefiBvkxOwiLZzHUZ/0EATqLouECeMZt1H1rl34oorE93pv+ywRDgxvCaP/xIoJ+8ux7kKnRe6QHTsnQ== X-Received: by 10.55.97.130 with SMTP id v124mr3237625qkb.51.1473419841975; Fri, 09 Sep 2016 04:17:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.84.168 with HTTP; Fri, 9 Sep 2016 04:16:41 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Sep 2016 20:16:41 +0900 X-Gmail-Original-Message-ID: Message-ID: To: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [RFC] Make uniqid() more unique From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi all, On Fri, Sep 9, 2016 at 2:12 PM, Yasuo Ohgaki wrote: > We all know, uniqid() is not unique at all and not safe as random ID > at all. This would be one of the most misused function because of its > name. > > https://github.com/php/php-src/blob/master/ext/standard/uniqid.c#L44 > > Bug report for this > https://bugs.php.net/bug.php?id=55391 > > I would like to > - Enable more entropy parameter on by default > - Add 256 bits random value (64 chars by HEX) from > php_random_bytes() instead of 1 char from php_combined_lcg() > > If all of us think "just fix it", then I'll just fix this in master w/o RFC. > > Any comments? It seems we need RFC. I'll correct opinions and make them vote options. If you have thought about uniqid(), please let me know. Thank you. -- Yasuo Ohgaki yohgaki@ohgaki.net