From: Stephan Mueller <smueller@chronox.de>
To: Andreas Steffen <andreas.steffen@strongswan.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: DRBG seeding
Date: Fri, 17 Apr 2015 03:19:17 +0200 [thread overview]
Message-ID: <3303782.1Fl4anZ2PL@myon.chronox.de> (raw)
In-Reply-To: <552FED36.6080904@strongswan.org>
Am Donnerstag, 16. April 2015, 19:11:18 schrieb Andreas Steffen:
Hi Andreas,
> Hi Stephan,
>
> in my opinion you definitively have to seed the DRBG with true
> entropy from /dev/random. This is what we are currently doing
> in userland with the strongSwan DRBG needed for the post-quantum
> NTRU-based key exchange algorithm. The NIST SP800-90A spec defines
> a parameter which estimates the entropy contained in the seed,
> but I think it is extremely difficult to derive an estimate
> if /dev/urandom is used.
>
> Our plans within the strongSwan project is to make the Linux
> kernel DRBG available via the af-alg interface.
I am working on that. My current idea is the following:
1. during initialization of a DRBG instance, seed from get_random_bytes to
have a DRBG state that is seeded and usable.
2. at the same time, initiate an async request to the yet to be developed (or
rather forward-ported and accepted) in-kernel /dev/random interface
3. when the async request returns, re-seed the DRBG with that data
I am playing with the idea that steps 2 and 3 are repeated 2 or 3 times where
the first invocation only requests a few bytes from the in-kernel /dev/random
-- this again should seed the DRBG with entropy as it becomes available.
But thank you for your support. It is surely helpful to show also to Ted Tso
that an update to /dev/random is of interest to various users.
Ciao
Stephan
>
> Best regards
>
> Andreas
>
> On 16.04.2015 17:32, Stephan Mueller wrote:
> > Am Donnerstag, 16. April 2015, 23:26:18 schrieb Herbert Xu:
> >
> > Hi Herbert,
> >
> >> On Thu, Apr 16, 2015 at 05:07:20PM +0200, Stephan Mueller wrote:
> >>> I do not see a specific requirement in SP800-90A about the quality of
> >>> the
> >>> noise source.
> >>
> >> Well it explicitly says that you cannot use a DRBG. In the worst
> >> case get_random_bytes is completely deterministic.
> >>
> >>> That said, I already developed an in-kernel version of /dev/random. I
> >>> sent
> >>> the patch to LKML some half year ago. If I understood Ted Tso right,
> >>> there
> >>> is no general objection against adding that in-kernel interface. See [1]
> >>> for the thread.
> >>>
> >>> Furthermore, I already started working on updating the DRBG to use that
> >>> in-
> >>> kernel /dev/random interface.
> >>>
> >>> Shall I pursue that work in earnest now?
> >>>
> >>> [1] https://lkml.org/lkml/2014/5/11/276
> >>
> >> Yes I think we should do this.
> >
> > Ok, I will work on that after I added the global lock to the DRBG.
> >
> >> Thanks,
> >
> > Ciao
> > Stephan
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Ciao
Stephan
next prev parent reply other threads:[~2015-04-17 1:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 14:36 DRBG seeding Herbert Xu
2015-04-16 15:07 ` Stephan Mueller
2015-04-16 15:26 ` Herbert Xu
2015-04-16 15:32 ` Stephan Mueller
2015-04-16 17:11 ` Andreas Steffen
2015-04-17 1:19 ` Stephan Mueller [this message]
2015-04-17 2:14 ` Herbert Xu
2015-04-17 12:48 ` Stephan Mueller
2015-04-17 13:11 ` Herbert Xu
2015-04-17 13:22 ` Stephan Mueller
2015-04-18 1:27 ` Herbert Xu
2015-04-18 1:32 ` Stephan Mueller
2015-04-18 1:36 ` Herbert Xu
2015-04-18 2:04 ` Stephan Mueller
2015-04-18 2:16 ` Herbert Xu
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=3303782.1Fl4anZ2PL@myon.chronox.de \
--to=smueller@chronox.de \
--cc=andreas.steffen@strongswan.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/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.