Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120461 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 56363 invoked from network); 30 May 2023 16:03:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 May 2023 16:03:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3CF95180384 for ; Tue, 30 May 2023 09:03:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 30 May 2023 09:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1685462625; bh=idxbAhOvoEHZ0mmP5mc+T+AYtb/VCU8qF2EnGBeUaHw=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=MYpVhz0aIhVVmt3S+pFsB2cl7ACC/TvooPaiq8NWt/tpH+PeUfyq5tfL2k/bzHW4X c9CZHyvoLdwQJyT9dNkyIHvVkpYeqADs4ZDFhtzE2iwBWXf7rC9JMzkx2iY7XrxQnD Lq0gvl8ZgZCJPl/8xyTecAOIek+kCdpJRuw3cfx0fMl7zTB6TPes26/rLy3/7RrdA7 WVJHXsRGS5cRgFm0Qa1t9cJ15mJZGZmVLCMAEY07Zm2QQKri/+GyqrweECbDOmvrfV fK8VimQr59QIUT8wtXIN2PMqyk+q4bnIkSzrnKkyPcXGU8fpxSjtMJyYfFyB8DqjPP PNy0Nt4BA0mKg== Message-ID: <5ca4e382-8284-1cd0-696f-0dfd693523f8@bastelstu.be> Date: Tue, 30 May 2023 18:03:44 +0200 MIME-Version: 1.0 Content-Language: en-US To: internals@lists.php.net References: <9ea3a5af-679d-ad63-f9c2-e0d8d148db3f@bastelstu.be> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] [Discussion] PHP 8.3 deprecations From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 5/30/23 17:52, Go Kudo wrote: > > It should be deprecated with PHP 8.4 at the earliest to give folks at > least > > Indeed, I agree that `lcg_value()` should be deprecated at least in PHP 8.4. > > However, `lcg_value()` remains a dangerous function. It still has a weak > initial seeding problem (PID, time), not to mention global state. This is > extremely dangerous for workloads on containers where PIDs tend to be > fixed. Perhaps this should be documented at the time of PHP 8.3 release. As the function is not seedable in userland, we do not need to preserve a specific sequence or behavior. Therefore it should be possible to replace the seeding to make use of the CSPRNG and fall back to the old and insecure seeding if the CSPRNG fails. For the same reason, the global state is also less of a problem compared to mt_rand() and friends. > Because of the above, I have removed my `lcg_value()` deprecation entry > from the RFC. Thanks! Thanks! Best regards Tim Düsterhus