Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115922 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53454 invoked from network); 2 Sep 2021 17:50:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Sep 2021 17:50:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C93B6180538 for ; Thu, 2 Sep 2021 11:26:34 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS11403 66.111.0.0/20 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 2 Sep 2021 11:26:34 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C65A35C016D for ; Thu, 2 Sep 2021 14:26:33 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute1.internal (MEProxy); Thu, 02 Sep 2021 14:26:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Pu54QJ moaqI040nd9jOW5uaUFKav8j74Fmrv1JIAjqY=; b=Q2geb1uwFOJAVXHOcCI6nc fyf/LCJFNcSM0sqfXpn1Hnj7GrwktYRAWhwXZuiITXShP8kYYC1OuKukaJi3odgv oTJMqTMJ9RrqmUdu/4kXPeFdXRh5cXNS/X1KutceIpQvW0o8XtKhWR56m21nVEJK sX6G+EBkCbAkvNN78nAN0uEkafrAMYgjiHGaSkYQ6O7LNvmCy+Sy4Ho2mKhKWGSL GD356STz7A1z3g9msgkqDHKWIGBkgeEalbs9+9pU+BfYGj5uD9Rr0LvILCGl5Q+f Sull1iz7h7s2KIJO+4dq2p57VlZLrOlntCCCuQVqUMJ2dZ5Nl+kd8w92ODLmM09w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvhedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepfeetveffteetueeukeegjeffudeuhedthfevfeeh iefhheegheffhedthefgleejnecuffhomhgrihhnpehphhhprdhnvghtpdhgihhthhhusg drtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4D11FAC04C2; Thu, 2 Sep 2021 14:26:33 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-1126-g6962059b07-fm-20210901.001-g6962059b Mime-Version: 1.0 Message-ID: <6921b613-d993-4e5b-82a7-60e3c9b3df38@www.fastmail.com> In-Reply-To: References: Date: Thu, 02 Sep 2021 13:26:12 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Random Extension 3.0 From: larry@garfieldtech.com ("Larry Garfield") On Thu, Sep 2, 2021, at 10:10 AM, Go Kudo wrote: > Hi Internals. > > Expanded from the previous RFC and changed it to an RFC that organizes the > whole PHP random number generator. Also, the target version has been > changed to 8.2. > > https://wiki.php.net/rfc/rng_extension > https://github.com/php/php-src/pull/7453 > > Hopefully you will get some good responses. > > Regards, > Go Kudo This looks pretty nice to my unskilled eye. Two questions. 1) Why is the number generator a parent class rather than an interface? It seems like an interface target. And either way it needs more clarity about how you'd write one for reals. (It returns an int, so does that mean getBytes() just derives from a series of ints?) 2) You don't mention the CSPRNG functions at all. Is there any intention to fold those into this model as well, or to leave those as is? Or is the Secure generator implementation intended to replace those? It's unclear here. --Larry Garfield