Re: [TLS] RNG vs. PRNG

Nicolas Williams <> Wed, 05 May 2010 06:29 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C6E623A67A3 for <>; Tue, 4 May 2010 23:29:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.392
X-Spam-Status: No, score=-1.392 tagged_above=-999 required=5 tests=[AWL=-1.394, BAYES_50=0.001, UNPARSEABLE_RELAY=0.001]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id F+bUEQry3yCO for <>; Tue, 4 May 2010 23:29:10 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 5D2673A6AEC for <>; Tue, 4 May 2010 23:29:09 -0700 (PDT)
Received: from ( []) by (Switch-3.4.2/Switch-3.4.1) with ESMTP id o456Sfn0019434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 May 2010 06:28:42 GMT
Received: from ( []) by (Switch-3.4.2/Switch-3.4.1) with ESMTP id o44IlXZo028429; Wed, 5 May 2010 06:28:40 GMT
Received: from by with ESMTP id 215097531273040910; Tue, 04 May 2010 23:28:30 -0700
Received: from (/ by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 May 2010 23:28:29 -0700
Date: Wed, 5 May 2010 01:28:24 -0500
From: Nicolas Williams <>
To: "Blumenthal, Uri - 0668 - MITLL" <>
Message-ID: <>
References: <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.5.20 (2010-03-02)
X-Auth-Type: Internal IP
X-Source-IP: []
X-CT-RefId: str=0001.0A090206.4BE1101B.0078:SCFMA4539811,ss=1,fgs=0
Cc: "''" <>
Subject: Re: [TLS] RNG vs. PRNG
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 05 May 2010 06:29:12 -0000

I'm not sure what the point of this sub-thread is.  TLS can't really
mandate that implementations use real RNGs, and I suspect many (myself
included) would object to a requirement that implementors use real RNGs
not coupled with PRNGs (as a bias removal / RNG stream post-processing
technique).  Also, none of this is new; the subject has been
exhaustively treated before, thus we're just annoying uninterested TLS
WG list subscribers and wasting our own time.

On Tue, May 04, 2010 at 11:37:31PM -0400, Blumenthal, Uri - 0668 - MITLL wrote:
> In general I have to agree with Dean.
> True RNG "itself" can't be attacked - though its implementations could
> (depending on many circumstances). Attacks against PRNG could be both
> cryptanalytic and implementation-directed.

A true RNG depends on physical processes.  Therefore it can be attacked
by physical means.  Now, the obvious retort is that without physical
security you can't have cryptographic security, and that is true, but
there's degrees of physical access that a device ought to be able to
tolerate.  The simplest thing to do is to couple an RNG to a PRNG.
Other post-processing of RNG outputs to remove bias are also possible.

(Also, one could conceive of RNG devices that can be affected without
direct access.  For example, thermal RNGs might get biased when the
system runs hot.)

> PRNG can't have higher behavioral assurance than RNG because if one can bias
> RNG output then the attacker got (or drastically reduced the search space
> for) the PRNG seed - and thus can be highly assured of predicted PRNG
> output. :-)

But the attacker would have to have prolonged physical access to the
RNG, and from the get-go; if at any point the attacker does not then the
attacker loses (assuming a well-constructed entropy pool, mixer and
extractor, which should have PRNG characteristics).

Let's put it this way: what rationale is there to not have a PRNG
coupled to an RNG?  (An "SRNG" in John Denker's terminology[0], but that
term isn't very common.  Even in the "true" RNG that Denker describes
there's still a cryptographic hash function in use.)

> Unlike RNG, PRNG security has critical dependence on secrecy of its seed -
> in addition to all other concerns (such as algorithm strength, correctness
> of implementation, defense - or lack of - against attackers who can lay
> hands on the box, etc - some of which are shared with RNG and some are
> PRNG-unique). 
> PRNGs are so popular because RNG are hard to come by (and those available

True, but:

> typically trickle output bits, and the closer to consumer they are - the

a trickle of entropy over hours, coupled to a PRNG, can produce decent
results.  Also, I doubt the rate of entropy gathering from sensors is as
low as all that for, say, a cell phone -- maybe for one that just sits
there unused.  And consumer devices have enough ROM and flash storage
that a seed, counter, timestamp, ... can be stored and used to uniquely
seed a PRNG at bootup, which, combined with even a fairly low rate of
entropy gathering results in a system that's more easily attacked via
other vulnerabilities in the very rapidly growing OSes, TCBs and apps
that these devices run.

> more vulnerable to implementation attacks), and collecting decent amount of
> randomness from an RNG is even harder. So naturally hybrid approach is
> embraced, when one uses whatever little he can get from a true RNG (if he
> can get hold of it) and seeds with it PRNG to get as much of "acceptable"
> randomness as necessary.

Consumer devices and desktops don't usually get attacked via PRNG
attacks (except, of course, when the PRNG or seeding process is flawed
and the result is well-known keys, as in the Debian OpenSSL problem from
a while back).  This sub-thread might as well be about how many angels
can dance on a pinhead :)