devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Wang <sean.wang@mediatek.com>
To: Torsten Duwe <duwe@suse.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	mpm@selenic.com, robh+dt@kernel.org, mark.rutland@arm.com,
	clabbe.montjoie@gmail.com, prasannatsmkumar@gmail.com,
	romain.perier@free-electrons.com, shannon.nelson@oracle.com,
	weiyongjun1@huawei.com, devicetree@vger.kernel.org,
	linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, keyhaede@gmail.com
Subject: Re: [PATCH v2 0/3] add support of hardware random generator on MediaTek MT7622
Date: Wed, 21 Jun 2017 00:08:14 +0800	[thread overview]
Message-ID: <1497974894.31931.8.camel@mtkswgap22> (raw)
In-Reply-To: <20170620145933.GA4177@suse.de>

On Tue, 2017-06-20 at 16:59 +0200, Torsten Duwe wrote:
> On Tue, Jun 20, 2017 at 10:21:17PM +0800, Sean Wang wrote:
> > Hi Herbert,
> > 
> > thanks for effort reviewing on those patches.
> > 
> > By the way, also loop in Torsten
> > 
> > Could you kindly guide me how to determine appropriate 
> > rng->ops.quality value used by the driver?
> > 
> > I have tested with rngtest on mtk-cir and the result is got as
> > the below log shown.  If the rngtest always gives the result for
> > success rate over 99.8%, can I set the rng->ops.quality 998?
> > 
> > rngtest: starting FIPS tests...
> > rngtest: bits received from input: 20000032
> > rngtest: FIPS 140-2 successes: 998
> > rngtest: FIPS 140-2 failures: 2
> 
> No! You'd have to determine the failure threshold of the test and
> apply some math to find a lower boundary of your RNG's entropy.
> 
> What the quality is for: your RNG produces bits, but not all of them
> are completely independent of each other i.e. not completely random.
> So you simply lower the quality rating to express the net entropy
> contained in the data stream.
> 
> 	Torsten
> 


Hi Torsten,

Understood, appreciate your quick and clear explanation.
 
For the math, is there existing any well-known or recommended
open source software assisting identify the lower boundary of
RNG entropy? I think the logic should be common for all RNGs.

thanks again

	Sean


	Sean

      reply	other threads:[~2017-06-20 16:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 15:56 [PATCH v2 0/3] add support of hardware random generator on MediaTek MT7622 sean.wang
2017-06-12 15:56 ` [PATCH v2 1/3] dt-bindings: rng: add MediaTek MT7622 Hardware Random Generator bindings sean.wang
2017-06-13  9:39   ` Matthias Brugger
2017-06-18 14:04   ` Rob Herring
     [not found] ` <cover.1497280813.git.sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-06-12 15:56   ` [PATCH v2 2/3] hwrng: mtk - add runtime PM support sean.wang-NuS5LvNUpcJWk0Htik3J/w
2017-06-12 15:56 ` [PATCH v2 3/3] MAINTAINERS: add entry for MediaTek Random Number Generator sean.wang
2017-06-20  3:40 ` [PATCH v2 0/3] add support of hardware random generator on MediaTek MT7622 Herbert Xu
     [not found]   ` <20170620034009.GD17764-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q@public.gmane.org>
2017-06-20 14:21     ` Sean Wang
2017-06-20 14:59       ` Torsten Duwe
2017-06-20 16:08         ` Sean Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497974894.31931.8.camel@mtkswgap22 \
    --to=sean.wang@mediatek.com \
    --cc=clabbe.montjoie@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=duwe@suse.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=keyhaede@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mpm@selenic.com \
    --cc=prasannatsmkumar@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=romain.perier@free-electrons.com \
    --cc=shannon.nelson@oracle.com \
    --cc=weiyongjun1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).