Re: [TLS] New drafts: adding input to the TLS master secret

Marsh Ray <> Wed, 03 February 2010 03:26 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 8FDCF3A6829 for <>; Tue, 2 Feb 2010 19:26:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id YiefCX28iW3F for <>; Tue, 2 Feb 2010 19:26:07 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id A39923A6809 for <>; Tue, 2 Feb 2010 19:26:07 -0800 (PST)
Received: from ([]) by with esmtpa (Exim 4.68) (envelope-from <>) id 1NcVt9-000Oco-Ns; Wed, 03 Feb 2010 03:26:47 +0000
Received: from [] (localhost []) by (Postfix) with ESMTP id EE80C64F2; Wed, 3 Feb 2010 03:26:44 +0000 (UTC)
X-Mail-Handler: MailHop Outbound by DynDNS
X-Report-Abuse-To: (see for abuse reporting information)
X-MHO-User: U2FsdGVkX19TqR57EDBaqPAr3zhUS/p8gdYqHMCmfno=
Message-ID: <>
Date: Tue, 02 Feb 2010 21:26:43 -0600
From: Marsh Ray <>
User-Agent: Thunderbird (Windows/20090812)
MIME-Version: 1.0
To: Paul Hoffman <>, "" <>
References: <p0624089bc78922bdaddd@[]> <> <p06240813c78e116da3f6@[]> <001001caa442$beefbde0$3ccf39a0$@org> <p06240829c78e37e5a850@[]> <001101caa44b$35f6f540$a1e4dfc0$@org> <p06240831c78e4f0e15ee@[]> <> <p0624083bc78e8c1563cc@[]>
In-Reply-To: <p0624083bc78e8c1563cc@[]>
X-Enigmail-Version: 0.96.0
OpenPGP: id=1E36DBF2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [TLS] New drafts: adding input to the TLS master secret
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, 03 Feb 2010 03:26:08 -0000

Paul Hoffman wrote:
> At 7:50 PM -0600 2/2/10, Marsh Ray wrote:
>> What does this accomplish over just hashing your extra data into
>> the 28 byte random field? (which would not require a new protocol
>> structure)
> You get more random bits mixed into the master secret. This gives you
> better cryptographic properties if your PRF has an output that is
> larger than 28 bytes, such as SHA-256 and SHA-384 (but not SHA-1, of
> course).
>> 224 bits of from each endpoint ... is 448 bits really not enough
>> entropy somehow? 448 bits ought to be enough for anybody :-)
> That's one opinion, maybe that of the people who wrote the current
> key mechanism. There is also an explicit assumption there that both
> users have good sources of randomness; if one doesn't, then it sure
> looks more like 224 bits total, which is not good enough for some
> people. This extension allows each party to introduce enough
> randomness to the master secret to overcome a complete failure of
> their peer's RNG.

Let's say the server has a perfect RNG and the client is broken Debian Etch.

The client provides 15 bits of usable entropy in the Client Hello, the
server provides 224.

RSA key exchange is negotiated.

The client generates the 48-byte premaster secret with an effective
entropy of less than 15 bits (his first handshake since power on).

Game over, right?

I think similar effects apply with DHE key exchange.

>> It looks to me (but IANAC) like the PRF maxes out at 672 bits of
>> entropy doing key block expansion (master_secret[48]*8 + 128md5 +
>> 160sha), so you can only effectively add 224 bits (only 50% more)
>> from any source.
> Adding 224 bits to your earlier 224 bits should, indeed, be enough
> for most people's security needs.
>> How big were you planning to make those symmetric keys anyway?
> 48 bytes, as shown in the document.

So at best there are 384 bits of entropy in play?

Assuming the server supplies his expected 224, our Debian Etch client
only has to pull together 160 usable BoE for them to hit that limit.

I do appreciate a healthy safety margin, but there is some complexity
overhead and potential security risk.

Your point about "potentially would allow an attacker who had partially
compromised the inputs to the master secret calculation greater scope
for influencing the output" is significant. Some kinds of hash attacks
let the attacker mess with the bytes earlier in the handshake by placing
colliding blocks in the Hello Extensions.

It also requires clients and servers to buffer the stuff and later
implement a sorting algorithm based on type order. Lots could go wrong
with that. Pathological sort order DoS attacks, etc.

I like the idea of increasing the available entropy on principle, but it
also looks like other internal limits are too close for an whole
extension framework to be worth the additional complexity. Hate to say
it, but it sounds like a core engineering change for a future version of
TLS to widen the path end-to-end.

- Marsh