[PATCH v1 1/2] random-bits: Factor out entropy generating function
Yann Droneaud
ydroneaud@opteya.com
Thu Mar 31 13:12:28 GMT 2022
Le 31/03/2022 à 14:14, Cristian Rodríguez via Libc-alpha a écrit :
> On Thu, Mar 31, 2022 at 8:48 AM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>
>> The AES implementation proposed uses a somewhat large state (about 300
>> bytes), which might add some overhead it would a per-thread buffer. And
>> afaik other cyphers like Chacha20 have a even larger state (512 bytes).
> Apparently chacha8 is enough for this purpose.. but I'm probably
> missing something.
Chacha8 should have the same state as Chacha20 which is 64 bytes wide.
Chacha8 use a a reduced round number (8) compared to Chacha20, making it faster.
I've noticed for Chacha20 to be efficient on x86_64, its cost per byte is
lowered by generating more than 64 bytes at a time, hence, the 512 bytes RNG state.
I've generated some graph here (I'm the author of this patch):
https://github.com/Parrot-Developers/libfutils/commit/0fdff8ee31f67988b68774ff04a58d0dd1d94d03
Regards.
--
Yann Droneaud
OPTEYA
More information about the Libc-alpha
mailing list