mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: David Jander <david@protonic.nl>
To: Clemens Gruber <clemens.gruber@pqgruber.com>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Python 3.5 and the use of getrandom() system call
Date: Mon, 21 Nov 2016 08:24:12 +0100	[thread overview]
Message-ID: <20161121082412.04f5d7c9@erd980> (raw)
In-Reply-To: <20161118171557.GA2369@archie.localdomain>

On Fri, 18 Nov 2016 18:15:58 +0100
Clemens Gruber <clemens.gruber@pqgruber.com> wrote:

> Hi,
> 
> On Fri, Nov 18, 2016 at 02:21:36PM +0100, David Jander wrote:
> > Or is there a way (that I ignore) to speed-up the generation of entropy in the
> > Linux kernel?  
> 
> Did you build your kernel with CONFIG_CRYPTO_JITTERENTROPY=y and
> CONFIG_CRYPTO_DRBG_HASH=y ?

Yes I had those.

> Also, depending on your platform, there might be hardware support.
> We use an i.MX6 which also includes a hardware RNG in its Cryptographic
> Acceleration And Assurance Module (CAAM).
> So we enabled CONFIG_CRYPTO_DEV_FSL_CAAM and use rngd to feed /dev/hwrng
> into the kernel's entropy pool.

Ah. There it is. I was already wondering if there wasn't any CAAM support. I
expected it under drivers/char/hwrng. Instead it is hidden under /crypto/.

> Could you try with above options and rngd started early? There should be
> much more entropy available in a short time.

Will try that out.

> It's probably a bad idea to just patch python for every PTXdist user.

Yes, I was thinking about making that patch configurable somehow.

> Not everybody is willing to trade security for faster start times.

I agree.

> Besides, not having enough entropy will lead to other problems as well.
> 
> If you are using systemd, verify that
> PTXCONF_SYSTEMD_DISABLE_RANDOM_SEED is not set.
> systemd-random-seed restores the random seed of the system at early boot
> and saves it at shutdown. So only the first boot would take longer.

Thanks a lot.

Best regards,

-- 
David Jander
Protonic Holland.

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2016-11-21  7:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 13:21 David Jander
2016-11-18 17:15 ` Clemens Gruber
2016-11-19  1:23   ` Roland Hieber
2016-11-21  7:24   ` David Jander [this message]
2016-11-29  8:56 ` Alexander Dahl
2016-11-29  9:33   ` Michael Olbrich
2016-11-29 13:14   ` Clemens Gruber
2016-11-29 13:41     ` Alexander Dahl

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=20161121082412.04f5d7c9@erd980 \
    --to=david@protonic.nl \
    --cc=clemens.gruber@pqgruber.com \
    --cc=ptxdist@pengutronix.de \
    /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