Re: [dsfjdssdfsd] Discussion: Malicious Entropy Attacks: Eggs, and Baskets

Dan Brown <dbrown@certicom.com> Wed, 12 March 2014 18:42 UTC

Return-Path: <dbrown@certicom.com>
X-Original-To: dsfjdssdfsd@ietfa.amsl.com
Delivered-To: dsfjdssdfsd@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 71F171A073F for <dsfjdssdfsd@ietfa.amsl.com>; Wed, 12 Mar 2014 11:42:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.5
X-Spam-Level:
X-Spam-Status: No, score=-0.5 tagged_above=-999 required=5 tests=[BAYES_05=-0.5] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F3LMHtXXqXSz for <dsfjdssdfsd@ietfa.amsl.com>; Wed, 12 Mar 2014 11:42:39 -0700 (PDT)
Received: from smtp-p02.blackberry.com (smtp-p02.blackberry.com [208.65.78.89]) by ietfa.amsl.com (Postfix) with ESMTP id 4845D1A0479 for <dsfjdssdfsd@ietf.org>; Wed, 12 Mar 2014 11:42:39 -0700 (PDT)
Received: from xct101cnc.rim.net ([10.65.161.201]) by mhs213cnc.rim.net with ESMTP/TLS/AES128-SHA; 12 Mar 2014 14:42:33 -0400
Received: from XCT111CNC.rim.net (10.65.161.211) by XCT101CNC.rim.net (10.65.161.201) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 12 Mar 2014 14:42:32 -0400
Received: from XMB116CNC.rim.net ([fe80::45d:f4fe:6277:5d1b]) by XCT111CNC.rim.net ([::1]) with mapi id 14.03.0174.001; Wed, 12 Mar 2014 14:42:32 -0400
From: Dan Brown <dbrown@certicom.com>
To: "'akr@akr.io'" <akr@akr.io>, "'dsfjdssdfsd@ietf.org'" <dsfjdssdfsd@ietf.org>
Thread-Topic: [dsfjdssdfsd] Discussion: Malicious Entropy Attacks: Eggs, and Baskets
Thread-Index: AQHPPWLmQjYJLz7470CYayzcUMxJTJrdjv7Q
Date: Wed, 12 Mar 2014 18:42:31 +0000
Message-ID: <810C31990B57ED40B2062BA10D43FBF5C55E13@XMB116CNC.rim.net>
References: <531F6068.4080907@akr.io> <810C31990B57ED40B2062BA10D43FBF5C5527C@XMB116CNC.rim.net>
In-Reply-To: <810C31990B57ED40B2062BA10D43FBF5C5527C@XMB116CNC.rim.net>
Accept-Language: en-CA, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.65.160.249]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: http://mailarchive.ietf.org/arch/msg/dsfjdssdfsd/QxIcfTML3k48IZvr771h-F07MuQ
Subject: Re: [dsfjdssdfsd] Discussion: Malicious Entropy Attacks: Eggs, and Baskets
X-BeenThere: dsfjdssdfsd@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "The dsfjdssdfsd list provides a venue for discussion of randomness in IETF protocols, for example related to updating RFC 4086." <dsfjdssdfsd.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dsfjdssdfsd>, <mailto:dsfjdssdfsd-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dsfjdssdfsd/>
List-Post: <mailto:dsfjdssdfsd@ietf.org>
List-Help: <mailto:dsfjdssdfsd-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dsfjdssdfsd>, <mailto:dsfjdssdfsd-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 12 Mar 2014 18:42:41 -0000

> -----Original Message-----
> From: Dan Brown (me)
> Sent: Tuesday, March 11, 2014 3:48 PM
> 
> The ANSI/NIST standards already require seeding with entropy equal to the
> security level before generating any outputs: i.e. your setup state A (minus the
> high-cost hash functions).  Also, aren't some linux RNGs blocking, isn't that a
> similar idea.  Maybe I should read the blog.
> 

Now I've actually read Bernstein's blog entry that you previously cited. It is well-written and raises some important and interesting issues. 

One of the blog entry's arguments is an instance of something more general: measures addressing one esoteric security feature (in this case, prediction resistance measures) may undermine another esoteric security feature (in this case, resistance to malicious seed sources).  In particular, it raises the questions of appropriateness of security definitions.  I may elaborate on security definitions in a separate email (perhaps after reviewing previous emails on the archive of this list). Meanwhile, here are a few small thoughts regarding blog entry:

First, as I understand the ANSI/NIST specs, the entropy source is presumed to be within the same security boundary as the whole RBG, i.e. free from observation or influence.  Maybe that is not too realistic in complex systems.  Anyway, that is how they "solve" (or wave away) the problem of a malicious entropy (seed) source, which is a different approach than DJB's blog proposal.  The blog entry's example about (EC)DSA is illustrative: the sensitivity of the long-term key private key to the ephemeral private key requires the ephemeral to be entirely within the same security boundary as the static private key.  Deterministic (EC)DSA is one way to do this without a live entropy source in the security boundary.  Arguably the ANSI/NIST spec for ECDSA can implicitly used in such a way: and an I-D or RFC explicitly describes one such way.

Second, the main situation that (at least) I have in mind where prediction resistance (i.e. RNG state compromise recovery) may be useful is if a device with a running RNG switches hands.  This switchover could occur at manufacture, at retail, at repair, at charging kiosk, or at an software installation/removal.  A state compromise might occur prior to the this switchover.  Are any of these realistic threats, or not?  Perhaps expert developers have such perfect control of their systems that they do not need such prediction resistance, and are more worried about a continuous persistent threat co-existing on the system.  

Third, the blog entry describes an adversary with two powers: effective RNG state compromise (by knowing x and y) and entropy source control.  If this is a realistic adversary, then this seems to suggest that RNG state compromise is a also realistic threat (going back to the second point).  Is the idea here that intermediate RNG state compromise only (but no entropy source control) adversary is no more realistic that this two-power adversary?

Fourth, I think the "conventional wisdom" alluded to in the blog entry is not correctly represented.  The conventional wisdom would be merely this: if x and y are secret, then  H(x,y,z) ought to be pretty good even if z is chosen maliciously, i.e. by an adversary that does not know x and y.  I think the blog entry is pointing out, correctly that the adversary may have two parts: an embedded malware that knows x and y, and an external adversary that only observes network communications, but has no idea of x and y. Perhaps the conventional wisdom ignores this latter split adversary.