linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Stephan Mueller <smueller@chronox.de>
Cc: George Spelvin <linux@sciencehorizons.net>,
	andi@firstfloor.org, cryptography@lakedaemon.net,
	herbert@gondor.apana.org.au, hpa@linux.intel.com,
	joe@perches.com, jsd@av8n.com, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux@horizon.com, pavel@ucw.cz,
	sandyinchina@gmail.com
Subject: Re: [PATCH v5 0/7] /dev/random - a new approach
Date: Tue, 21 Jun 2016 01:12:55 -0400	[thread overview]
Message-ID: <20160621051255.GG9848@thunk.org> (raw)
In-Reply-To: <10477997.AvJKPRy4pc@positron.chronox.de>

On Mon, Jun 20, 2016 at 09:00:49PM +0200, Stephan Mueller wrote:
> 
> The time stamp maintenance is the exact cause for the correlation: one HID 
> event triggers:
> 
> - add_interrupt_randomness which takes high-res time stamp, Jiffies and some 
> pointers
> 
> - add_input_randomness which takes high-res time stamp, Jiffies and HID event 
> value
> 
> The same applies to disk events. My suggestion is to get rid of the double 
> counting of time stamps for one event.
> 
> And I guess I do not need to stress that correlation of data that is supposed 
> to be entropic is not good :-)

What is your concern, specifically?  If it is in the entropy
accounting, there is more entropy in HID event interrupts, so I don't
think adding the extra 1/64th bit of entropy is going to be problematic.

If it is that there are two timestamps that are closely correleated
being added into the pool, the add_interrupt_randomness() path is
going to mix that timestamp with the interrupt timings from 63 other
interrupts before it is mixed into the input pool, while the
add_input_randomness() mixes it directly into the pool.  So if you
think there is a way this could be leveraged into attack, please give
specifics --- but I think we're on pretty solid ground here.

Cheers,

						- Ted

  reply	other threads:[~2016-06-21  5:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19 15:58 [PATCH v5 0/7] /dev/random - a new approach Stephan Mueller
2016-06-19 15:59 ` [PATCH v5 1/7] crypto: DRBG - externalize DRBG functions for LRNG Stephan Mueller
2016-06-19 15:59 ` [PATCH v5 2/7] random: conditionally compile code depending on LRNG Stephan Mueller
2016-06-19 16:00 ` [PATCH v5 3/7] crypto: Linux Random Number Generator Stephan Mueller
2016-06-19 16:58   ` Andi Kleen
2016-06-19 18:31     ` Stephan Mueller
2016-06-19 16:00 ` [PATCH v5 4/7] crypto: LRNG - enable compile Stephan Mueller
2016-06-19 16:01 ` Stephan Mueller
2016-06-19 16:01 ` [PATCH v5 6/7] crypto: isolate the chacha20_block function Stephan Mueller
2016-06-19 16:04 ` [PATCH v5 7/7] crypto: LRNG - add ChaCha20 support Stephan Mueller
2016-06-19 19:36 ` [PATCH v5 0/7] /dev/random - a new approach Pavel Machek
2016-06-19 20:47   ` Sandy Harris
2016-06-20  5:51   ` Stephan Mueller
2016-06-20  8:27     ` Pavel Machek
2016-06-20 15:28     ` Theodore Ts'o
2016-06-20 15:43       ` Stephan Mueller
2016-06-20 18:44         ` George Spelvin
2016-06-20 19:00           ` Stephan Mueller
2016-06-21  5:12             ` Theodore Ts'o [this message]
2016-06-21  5:17               ` Stephan Mueller
2016-06-21  7:12         ` Nikos Mavrogiannopoulos
2016-06-21  7:32           ` Stephan Mueller
2016-06-21 16:03             ` Austin S. Hemmelgarn
2016-06-21 16:28               ` Stephan Mueller
2016-06-21 18:22                 ` Austin S. Hemmelgarn
2016-06-21 18:46                   ` Stephan Mueller

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=20160621051255.GG9848@thunk.org \
    --to=tytso@mit.edu \
    --cc=andi@firstfloor.org \
    --cc=cryptography@lakedaemon.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@linux.intel.com \
    --cc=joe@perches.com \
    --cc=jsd@av8n.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=linux@sciencehorizons.net \
    --cc=pavel@ucw.cz \
    --cc=sandyinchina@gmail.com \
    --cc=smueller@chronox.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;
as well as URLs for NNTP newsgroup(s).