Re: What do you think CSPRNG in PHP

From: Date: Fri, 15 Jul 2022 16:12:21 +0000
Subject: Re: What do you think CSPRNG in PHP
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-118267@lists.php.net to get a copy of this message
2022年7月16日(土) 0:54 Go Kudo <zeriyoshi@gmail..com>: > Hi Internals. > > Random Extension is accepted and being implemented in PHP 8.2. Many thanks > for the review. > > The changes to enable arc4random in glibc were recently merged. > > https://github.com/php/php-src/pull/8984 > > This has the effect of reducing the number of getrandom system calls > issued on Linux, which is effective in improving performance. > > However, this will only work in environments that use GNU libc, and will > not work on Linuxes that use other libc (e.g. Alpine Linux that uses musl). > > As we discussed a bit above in PR (which is inherently a bad thing, > because it's not a good thing), the following is an example of a "good" PR > campaign Apologies), if we could implement CSPRNG on PHP, for example, it > would improve performance on all platforms. > > However, there are several challenges to this. > > - Increased maintenance costs > - Requires optimization for CPU architecture > - Requires familiarity with CSPRNG > > PHP already bundles xxHash and appears ready to make this happen. > > Also, an appropriate CSPRNG implementation may be able to resolve the > current complex macro branching. > > What do you think about this? > > Regards > Go Kudo > xxHash has nothing to do with it. Forget it.

« previous php.internals (#118267) next »