lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b86c773-7153-1e18-472a-f66b01c83173@gmail.com>
Date:   Sat, 20 Feb 2021 20:12:45 +0100
From:   Álvaro Fernández Rojas <noltari@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     mpm@...enic.com, herbert@...dor.apana.org.au,
        nsaenzjulienne@...e.de, f.fainelli@...il.com, rjui@...adcom.com,
        sbranden@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
        rikard.falkeborn@...il.com, linux-crypto@...r.kernel.org,
        linux-rpi-kernel@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        stijn@...ux-ipv6.be, ynezz@...e.cz
Subject: Re: [PATCH] hwrng: bcm2835: set quality to 1000

Hi Andrew,

I ran rngtest and this is what I got:
root@...nWrt:/# cat /dev/hwrng | rngtest -c 1000
rngtest 6.10
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is 
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

rngtest: starting FIPS tests...
rngtest: bits received from input: 20000032
rngtest: FIPS 140-2 successes: 996
rngtest: FIPS 140-2 failures: 4
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 1
rngtest: FIPS 140-2(2001-10-10) Long run: 3
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=146.002; avg=349.394; 
max=1302083.333)Kibits/s
rngtest: FIPS tests speed: (min=12.126; avg=22.750; max=23.432)Mibits/s
rngtest: Program run time: 56826982 microseconds

996 successes and 4 failures -> 99.6% success rate
1024 * 99.6% = 1019 (rounded down to 1000)

I'm not sure if I can rely on rngtest for that...

Best regards,
Álvaro.

El 20/02/2021 a las 20:09, Andrew Lunn escribió:
> On Sat, Feb 20, 2021 at 06:47:40PM +0100, Álvaro Fernández Rojas wrote:
>> This allows devices without a high precission timer to reduce boot from >100s
>> to <30s.
>> diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c
>> index 1a7c43b43c6b..4b48cb7176b0 100644
>> --- a/drivers/char/hw_random/bcm2835-rng.c
>> +++ b/drivers/char/hw_random/bcm2835-rng.c
>> @@ -163,6 +163,7 @@ static int bcm2835_rng_probe(struct platform_device *pdev)
>>   	priv->rng.init = bcm2835_rng_init;
>>   	priv->rng.read = bcm2835_rng_read;
>>   	priv->rng.cleanup = bcm2835_rng_cleanup;
>> +	priv->rng.quality = 1000;
> 
> Hi Alvero
> 
>   * @quality:		Estimation of true entropy in RNG's bitstream
>   *			(in bits of entropy per 1024 bits of input;
>   *			valid values: 1 to 1024, or 0 for unknown).
> 
> How did you determine this device produces 1000 bits of true entropy
> per 1024?
> 
>      Andrew
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ