All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corentin Labbe <clabbe.montjoie@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-crypto@vger.kernel.org,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Matt Mackall <mpm@selenic.com>
Subject: Re: Question - seeding the hw pseudo random number generator
Date: Thu, 23 Mar 2017 09:23:07 +0100	[thread overview]
Message-ID: <20170323082307.GB16625@Red> (raw)
In-Reply-To: <20170320132858.GA27044@gondor.apana.org.au>

On Mon, Mar 20, 2017 at 09:28:58PM +0800, Herbert Xu wrote:
> On Mon, Mar 20, 2017 at 12:19:32PM +0530, PrasannaKumar Muralidharan wrote:
> >
> > AF_ALG interface for rng does have seeding support. I think hw_random
> > does not provide seeding support intentionally as I understand that
> > True RNG need not require seeding (please correct me if I am wrong).
> 
> Yes.  We should be converting PRNGs in hwrng over to algif_rng.
> 

Problem with this conversion, a huge regression for user space.
Using hwrng is simple as cat /dev/hwrng.
Using algif_rng via AF_ALG is ... unusable for the moment.
Perhaps creating an user space tool (prng-tool which provide a cat /dev/hwrng replacement) is mandatory before any convertion.

Regards

WARNING: multiple messages have this Message-ID (diff)
From: clabbe.montjoie@gmail.com (Corentin Labbe)
To: linux-arm-kernel@lists.infradead.org
Subject: Question - seeding the hw pseudo random number generator
Date: Thu, 23 Mar 2017 09:23:07 +0100	[thread overview]
Message-ID: <20170323082307.GB16625@Red> (raw)
In-Reply-To: <20170320132858.GA27044@gondor.apana.org.au>

On Mon, Mar 20, 2017 at 09:28:58PM +0800, Herbert Xu wrote:
> On Mon, Mar 20, 2017 at 12:19:32PM +0530, PrasannaKumar Muralidharan wrote:
> >
> > AF_ALG interface for rng does have seeding support. I think hw_random
> > does not provide seeding support intentionally as I understand that
> > True RNG need not require seeding (please correct me if I am wrong).
> 
> Yes.  We should be converting PRNGs in hwrng over to algif_rng.
> 

Problem with this conversion, a huge regression for user space.
Using hwrng is simple as cat /dev/hwrng.
Using algif_rng via AF_ALG is ... unusable for the moment.
Perhaps creating an user space tool (prng-tool which provide a cat /dev/hwrng replacement) is mandatory before any convertion.

Regards

  parent reply	other threads:[~2017-03-23  8:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18  9:25 Question - seeding the hw pseudo random number generator Krzysztof Kozlowski
2017-03-18  9:25 ` Krzysztof Kozlowski
2017-03-20  6:49 ` PrasannaKumar Muralidharan
2017-03-20  6:49   ` PrasannaKumar Muralidharan
2017-03-20 13:28   ` Herbert Xu
2017-03-20 13:28     ` Herbert Xu
2017-03-20 13:39     ` Stephan Müller
2017-03-20 13:39       ` Stephan Müller
2017-03-23  8:03       ` Harald Freudenberger
2017-03-23  8:03         ` Harald Freudenberger
2017-03-23 11:35         ` Stephan Müller
2017-03-23 11:35           ` Stephan Müller
2017-03-20 18:24     ` Krzysztof Kozlowski
2017-03-20 18:24       ` Krzysztof Kozlowski
2017-03-23  8:23     ` Corentin Labbe [this message]
2017-03-23  8:23       ` Corentin Labbe
2017-03-23  9:44       ` Herbert Xu
2017-03-23  9:44         ` Herbert Xu
2017-03-23 11:44         ` Stephan Müller
2017-03-23 11:44           ` Stephan Müller
2017-03-23 13:06         ` Stephan Müller
2017-03-23 13:06           ` Stephan Müller
2017-03-26  4:10         ` Stephan Müller
2017-03-26  4:10           ` Stephan Müller

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=20170323082307.GB16625@Red \
    --to=clabbe.montjoie@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=prasannatsmkumar@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.