Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96433 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25275 invoked from network); 18 Oct 2016 12:33:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Oct 2016 12:33:26 -0000 Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.162 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.162 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.162] ([81.169.146.162:18347] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/7E-40890-39616085 for ; Tue, 18 Oct 2016 08:33:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1476794000; l=5145; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:References:In-Reply-To: MIME-Version; bh=XSD06wf9CkHKPxTBarSwhpHSTVfoosonV8Zxk/XsU1Y=; b=tEt9L1mg1WEPjAFvMK7K1zrgUZL+QfZnNG20T7UqKcq8P/U4RL5af+yNjwKP1Gmhz1s Ae17B2qoNb51PxpR7yS9WW4YUQV3HOIjw0MDLqEzWzssd3Ckxc84H+rbZXn5KLIPAPW0o AaOGI5bzMnwAJnPOlVLZMwwpIN6/z8hRT58= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuoNKBqXw3Q== X-RZG-CLASS-ID: mo00 Received: from mail-lf0-f48.google.com ([209.85.215.48]) by smtp.strato.de (RZmta 39.6 AUTH) with ESMTPSA id k035b4s9ICXKCnl (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for ; Tue, 18 Oct 2016 14:33:20 +0200 (CEST) Received: by mail-lf0-f48.google.com with SMTP id b75so344810472lfg.3 for ; Tue, 18 Oct 2016 05:33:20 -0700 (PDT) X-Gm-Message-State: AA6/9RlCF9Tv60WQsLoCiJTso2qNUPAD/CvWqjF5E3dUVMwzEQz5VlNIzo7G4EziuvJa7nIEf6yBcdd/ysM+xw== X-Received: by 10.28.138.209 with SMTP id m200mr11124083wmd.89.1476793999889; Tue, 18 Oct 2016 05:33:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.177.153 with HTTP; Tue, 18 Oct 2016 05:33:19 -0700 (PDT) In-Reply-To: References: Date: Tue, 18 Oct 2016 14:33:19 +0200 X-Gmail-Original-Message-ID: Message-ID: To: Yasuo Ohgaki Cc: Joe Watkins , Leigh , PHP Internals Content-Type: multipart/alternative; boundary=001a114717fac5227a053f22e5e0 Subject: Re: [PHP-DEV] Re: [RFC][DISCUSSION] Improve uniqid() uniqueness From: me@kelunik.com (Niklas Keller) --001a114717fac5227a053f22e5e0 Content-Type: text/plain; charset=UTF-8 2016-10-18 14:12 GMT+02:00 Yasuo Ohgaki : > Hi Niklas, > > On Tue, Oct 18, 2016 at 9:08 PM, Niklas Keller wrote: > >> > >> As you can see from last minutes discussion. > >> > >> "/dev/urandom cannot be read" is FUD. > >> It's pure bug fix. (I intentionally made patch easy to extend used > >> chars, though) > >> > >> Would you consider revert the revert? > > > > > > This discussion shows there should be a RFC and a vote. I'd not consider > > this a simple bug fix, after all it doesn't really fix it. > > > > If we want to fix it in core, we'd better include an UUID generation > > mechanism than fixing uniq_id. > > UUID like uniqueness is not the subject of uniqid(), isn't it? > UUID = Universally Unique Identifier uniqid = Generate a unique ID Where is uniqueness _not_ the subject of uniqid()? > As I wrote, it's simple bug fix. > The issue is that it doesn't fix it. Maybe it band aids. But it doesn't fix uniqid. It's exactly why I proposed to better deprecate uniqid. We can do that in 7.2 and provide UUIDs as a standardized and superior alternative. Regards, Niklas > --------------- > The patch committed is pure bug fix. > > uniqid() is simply _broken_ because it does not provide expected > uniqueness due > to timestamp based php_combined_lcg(). (I added large warning to the manual > recently, though) > > unique id (time stamp) + entropy (timestamp based entropy) > > Who argue result is reasonably unique? > Who don't use NTP to adjust system time? > --------------- > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a114717fac5227a053f22e5e0--