Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118014 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 17040 invoked from network); 20 Jun 2022 13:24:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jun 2022 13:24:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B994A180506 for ; Mon, 20 Jun 2022 08:13:01 -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=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLY, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 20 Jun 2022 08:13:01 -0700 (PDT) Received: by mail-ej1-f51.google.com with SMTP id gl15so21761817ejb.4 for ; Mon, 20 Jun 2022 08:13:01 -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=y9YHpkSlb8YvMgAsS9Tuzz7YyVViFEaEsb1nwBOXaUs=; b=BlEB9oAznuS41m1rJ4yJIJ0yWKOkeK7Ou1508avfkCHeHRz4fQS32UYcFHAbQOs345 P7YsfXflNQQ3BDqhOQZfP56DS/GLa3YY4YRoa2dG5b9aWjHL8V2tLFWzGgpqE+Wifra4 UtM7wjP3aLwlSJrLYgWPoQsVgNZ3si9e2u7v6GR1t0kuPrScacCevz0Mxc7klMfuqpA4 30uZj341XcvaUVoNUcx1KKlp2/rUD+t+sFukBNgbVCpprxTYWFd19k06IY4hwVCxrvda qU/IGGB7YwzOm4Z/43OSPRFAt1fCej1y6JuNumeQz2b2PtLU0konlzmLZbvu09g61fXR 6rvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=y9YHpkSlb8YvMgAsS9Tuzz7YyVViFEaEsb1nwBOXaUs=; b=aiY4FKncO82WZ0S770Ev+u9BeJbB9fspAL5PC1drAVg5QoFmRc2BPL3rWP5RVLRRaq RJviglGxkO0FcPUIR3LeGwwufB3R2HgPlmToKu9mO2eh2ZhbVZQ/n5St8ukL7HXQfFy6 ugmBCVrSDaNqQeIxmT3P+0FEQWoXBoSEYCzSD7tdykHYqGD7MD2EnqbtxkTRV3QHTG6P fNJ+rLT3ljt9omzyvLrwgScKEIs7IigJ0ioLPCrPSQ41scF7lWsmFz1j1tJ+F3Tg9dNt wRCvT41FL/V2uTfOimINxAt6WRQ6zTuPDxma8xoVKrAja4+xNA6E8te5TjE785AKP+ZH czpA== X-Gm-Message-State: AJIora/jwgwFzj+zaljvtp4XVxW1gjkzJL9Pf/q2FYZjptd5hptHs6vI ZKroU4yetZwDywtOh6kOsK2Z1Cm0cV7HGyJdO/0= X-Google-Smtp-Source: AGRyM1vsHh4JMYYhBxYJz5ddBtMTunq4u+B4GuHUkUtBiU1aPSGTLGjw+B7Zpzm+wzwtLvjgLghqshAXX0P+6dRLNX4= X-Received: by 2002:a17:907:97c9:b0:71d:67ea:42ca with SMTP id js9-20020a17090797c900b0071d67ea42camr14276020ejc.7.1655737980086; Mon, 20 Jun 2022 08:13:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 21 Jun 2022 00:12:45 +0900 Message-ID: To: Nicolas Grekas , PHP internals Content-Type: multipart/alternative; boundary="00000000000024ed1505e1e28a8c" Subject: Re: [PHP-DEV] [RFC] [Under Discussion] Random Extension Improvement From: zeriyoshi@gmail.com (Go Kudo) --00000000000024ed1505e1e28a8c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2022=E5=B9=B46=E6=9C=8820=E6=97=A5(=E6=9C=88) 23:58 Nicolas Grekas : > > An RFC has been created to fix an issue in Random Extension 5.x. > > > > https://wiki.php.net/rfc/random_extension_improvement > > > > Voting on this RFC will begin in two weeks (2022-07-02), in time for th= e > > PHP 8.2 Feature Freeze. (Vote finished in 2022-07-16, Feature Freeze is > > 2022-07-19) > > > > In the unlikely event that the Random Extension 5.x RFC is rejected, th= is > > RFC will become invalid regardless of the outcome of the vote. > > > > Hi, thanks for the update, that makes sense to me. > > I'm wondering: does Random\SerializableEngine extend Random\Engine? Can > this be mentioned in the RFC? If not, what about making it this way? Havi= ng > this interface only contain __(un)serialize would look strange to me, aka > too broad for the name and the purpose. > > I'm also wondering: is CombinedLCG worth it? I must admit I don't know wh= en > I should use it instead of MT19937. > > Since the names are all super opaque to many of us, documentation should = be > very clear about the use case of each implementation... (if can reduce th= e > number of implementations, that's even better :) ) > > Cheers, > Nicolas > Hi > Having this interface only contain __(un)serialize would look strange to me, aka > too broad for the name and the purpose. Indeed. This was designed back when the Serializable interface was still going strong, so it is already outdated. The OO approach to serialization no longer applies, and this may need to be eliminated. > CombinedLCG This is provided as an OOP implementation for the `lcg_value()` function, but I don't actually want it to be used anymore, so I probably shouldn't provide a class for it. And to begin with, the current CombinedLCG cannot even be seeded with arbitrary values. However, I think it needs to remain in the internal API either way. (The option of not providing it to userland is a valid one.) What do you think about the `Random\CryptoSecureEngine` interface? It is just a marker interface with no methods. However, I currently think it is better than adding a method like `isSecure(): bool` to the `Random\Engine`. Best regards Go Kudo --00000000000024ed1505e1e28a8c--