[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3080190.aeNJFYEL58@positron.chronox.de>
Date: Sat, 23 May 2020 20:46:26 +0200
From: Stephan Müller <smueller@...onox.de>
To: Stefan Wahren <stefan.wahren@...e.com>,
Lukasz Stelmach <l.stelmach@...sung.com>
Cc: Matt Mackall <mpm@...enic.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Florian Fainelli <f.fainelli@...il.com>,
Markus Elfring <elfring@...rs.sourceforge.net>,
Matthias Brugger <mbrugger@...e.com>,
linux-crypto@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Subject: Re: [PATCH v2 1/2] hwrng: iproc-rng200 - Set the quality value
Am Donnerstag, 21. Mai 2020, 21:14:02 CEST schrieb Lukasz Stelmach:
Hi Lukasz,
> It was <2020-05-21 czw 13:00>, when Stefan Wahren wrote:
> > Hi Lukasz,
> >
> > Am 19.05.20 um 23:25 schrieb Łukasz Stelmach:
> >> The value was estimaded with ea_iid[1] using on 10485760 bytes read from
> >> the RNG via /dev/hwrng. The min-entropy value calculated using the most
> >> common value estimate (NIST SP 800-90P[2], section 6.3.1) was 7.964464.
> >
> > could you please mention in the commit the used hardware
> > implementation(s) of iproc-rng200 to get this quality?
> >
> > AFAIK there is still no public register description at least for the
> > bcm2711. So is it safe to assume that the suggested quality applies to
> > all possible configurations?
>
> I've learnt that there is a post-processing unit in RNG200 that tests
> the output of the noise generator and fills FIFO only with data that
> passes FIPS tests. Unlike simmilar unit in Exynos, it cannot be disabled
> or bypassed. Therefore, after Stephan Mueller's thorough explanations I
> am considering dropping this patch in v3.
If you would be more clear what that FIPS test is all about, we may be able to
identify whether it affects the entropy behavior or not. E.g. if it is the
SP800-90B health test following SP880-90B section 4.4, this does not affect
entropy and you could apply your calculation.
>
> However, I stil am still not 100% convinced that it is impossible to
> assign the quality a reasonable non-zero value in such case.
>
> > Thanks
> > Stefan
> >
> >> [1]
> >> https://protect2.fireeye.com/url?k=da4735b2-87d99b28-da46befd-0cc47a336f
> >> ae-e1c21080bc6ab1e4&q=1&u=https%3A%2F%2Fgithub.com%2Fusnistgov%2FSP800-90
> >> B_EntropyAssessment [2]
> >> https://csrc.nist.gov/publications/detail/sp/800-90b/final
> >>
> >> Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
> >> ---
> >>
> >> drivers/char/hw_random/iproc-rng200.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/char/hw_random/iproc-rng200.c
> >> b/drivers/char/hw_random/iproc-rng200.c index 32d9fe61a225..95669ece050f
> >> 100644
> >> --- a/drivers/char/hw_random/iproc-rng200.c
> >> +++ b/drivers/char/hw_random/iproc-rng200.c
> >> @@ -199,6 +199,7 @@ static int iproc_rng200_probe(struct platform_device
> >> *pdev)>>
> >> priv->rng.read = iproc_rng200_read,
> >> priv->rng.init = iproc_rng200_init,
> >> priv->rng.cleanup = iproc_rng200_cleanup,
> >>
> >> + priv->rng.quality = 1000,
> >>
> >> /* Register driver */
> >> ret = devm_hwrng_register(dev, &priv->rng);
Ciao
Stephan
Powered by blists - more mailing lists