Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:115928
Return-Path: <zeriyoshi@gmail.com>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 19390 invoked from network); 3 Sep 2021 13:26:39 -0000
Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5)
  by pb1.pair.com with SMTP; 3 Sep 2021 13:26:39 -0000
Received: from php-smtp4.php.net (localhost [127.0.0.1])
	by php-smtp4.php.net (Postfix) with ESMTP id 07DAD1804C9
	for <internals@lists.php.net>; Fri,  3 Sep 2021 07:03:09 -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,FREEMAIL_FROM,HTML_MESSAGE,
	RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS
	autolearn=no autolearn_force=no version=3.4.2
X-Spam-ASN: AS15169 209.85.128.0/17
X-Spam-Virus: No
X-Envelope-From: <zeriyoshi@gmail.com>
Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49])
	(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 <internals@lists.php.net>; Fri,  3 Sep 2021 07:03:08 -0700 (PDT)
Received: by mail-ed1-f49.google.com with SMTP id g22so8108515edy.12
        for <internals@lists.php.net>; Fri, 03 Sep 2021 07:03:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
        bh=77LpjUs1EI6Y4g3E6mDp5PVidgyeoi8bnoWWNuC1n68=;
        b=IkyffUW5N9SOGl48AqbYb1fiEw2cInJHeqmK8nwL0PDeSrlDcqkMJNnLSGyZml/ewE
         2I5Wnj80/qhp4txSfOAsfistEHn6jp9RwJmWKhU2SELSAF9Rp9oVof2fDlHxrtyTUvEy
         VYwLJkkngXZx/leOhmmKeYqY59zupo88nBzn8tNynLd6FEOy+An3hH+isbuepVO9MdRe
         KVCqfdEJwh5+w0Eqe51VlrnTWQb8w8hCmxFQQWTxZ+C1GGjglFQAIMbHIMm74xVWbKWA
         2JNbZa9BjpaUjWxThnzgdJvdRpEjCXKMzAPhT3ZxsdjqltVhmWs+gSyxNXHiMTzAdD2y
         ddsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to;
        bh=77LpjUs1EI6Y4g3E6mDp5PVidgyeoi8bnoWWNuC1n68=;
        b=cHixyeuETlxmbeACeKRzJkDBCcEiRY3knh/1sARh413TypAnbMNq3w3gUaH7a2tH48
         mQieGfTmtMis/uEoCHSDurCeh4OhVHfPkZr+lPTUSmK+g8ffESXMluUUcMlXF97EH5yJ
         +TmCUSbDob8ha6jvK4L9dYFsoeW6Scd1JhQZKWqKJHkLzjlRRgg7p6M13BgQ3pMnXh6v
         4S62dxFIN+DdxkUFSqjM8+DxenWw5TyOE0D6h2R3cOgh2Q4OQDsYNSNkz2XEM7CuwK95
         YNR3MR8/IL8uEznPk+3G/cj7EFsUrIWQnufsZn0yEDZvznbP+L2ZGsF6twh+oqyFp4H5
         Ov6g==
X-Gm-Message-State: AOAM530ESBjNbcTa6x7HtpRyCaPJE8yTGoh9yAISxyiGPmMMUakR5A9D
	ElzglnLrkk+KDB5f0yRCShkvzqprb1HAixNVodV13rXqnMewkw==
X-Google-Smtp-Source: ABdhPJyABxKehqah8bBqpYrIG0oAjmlY5qWCppg4Q6QZUk/ToUbXicjg2pqm6vJx+PQbaMfZQPACv/OSFQEX3wD90CE=
X-Received: by 2002:aa7:cd92:: with SMTP id x18mr4122269edv.325.1630677787430;
 Fri, 03 Sep 2021 07:03:07 -0700 (PDT)
MIME-Version: 1.0
References: <CABTDVhBRpD=nWBk2xGLEmdcWwOzCeqGeqH5vLSugPFOeEN9Mog@mail.gmail.com>
 <6921b613-d993-4e5b-82a7-60e3c9b3df38@www.fastmail.com>
In-Reply-To: <6921b613-d993-4e5b-82a7-60e3c9b3df38@www.fastmail.com>
Date: Fri, 3 Sep 2021 23:02:56 +0900
Message-ID: <CABTDVhDcwJYaR3sYkeSKKade4vnMM44DfiPreB0ayB8LXPDyBw@mail.gmail.com>
To: Larry Garfield <larry@garfieldtech.com>, PHP internals <internals@lists.php.net>
Content-Type: multipart/alternative; boundary="0000000000004352c105cb17c23b"
Subject: Re: [PHP-DEV] [RFC] Random Extension 3.0
From: zeriyoshi@gmail.com (Go Kudo)

--0000000000004352c105cb17c23b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

My apologies. I had skipped one.

> And either way it needs more clarity about how you'd write one for reals.

Added a simple example comparing it to mt_rand. What do you think of this?

2021=E5=B9=B49=E6=9C=883=E6=97=A5(=E9=87=91) 3:26 Larry Garfield <larry@gar=
fieldtech.com>:

> 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 me=
an
> 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 th=
e
> Secure generator implementation intended to replace those?  It's unclear
> here.
>
> --Larry Garfield
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>

--0000000000004352c105cb17c23b--