Re: [TLS] New cached-info draft 09 posted

Stefan Santesson <stefan@aaa-sec.com> Tue, 13 July 2010 14:27 UTC

Return-Path: <stefan@aaa-sec.com>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id A4AE53A68ED for <tls@core3.amsl.com>; Tue, 13 Jul 2010 07:27:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.249
X-Spam-Level:
X-Spam-Status: No, score=-2.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_SE=0.35]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xGHkV+fuineY for <tls@core3.amsl.com>; Tue, 13 Jul 2010 07:27:04 -0700 (PDT)
Received: from s87.loopia.se (s87.loopia.se [194.9.94.112]) by core3.amsl.com (Postfix) with ESMTP id 615423A68A0 for <tls@ietf.org>; Tue, 13 Jul 2010 07:27:03 -0700 (PDT)
Received: from s24.loopia.se (s34.loopia.se [194.9.94.70]) by s87.loopia.se (Postfix) with ESMTP id 7A2FA28F462 for <tls@ietf.org>; Tue, 13 Jul 2010 16:27:16 +0200 (CEST)
Received: (qmail 8590 invoked from network); 13 Jul 2010 14:27:10 -0000
Received: from unknown (HELO [192.168.1.2]) (stefan@fiddler.nu@[85.235.2.114]) (envelope-sender <stefan@aaa-sec.com>) by s24.loopia.se (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for <marsh@extendedsubset.com>; 13 Jul 2010 14:27:10 -0000
User-Agent: Microsoft-Entourage/12.25.0.100505
Date: Tue, 13 Jul 2010 16:27:03 +0200
From: Stefan Santesson <stefan@aaa-sec.com>
To: Marsh Ray <marsh@extendedsubset.com>
Message-ID: <C8624457.C887%stefan@aaa-sec.com>
Thread-Topic: [TLS] New cached-info draft 09 posted
Thread-Index: Acsil3ZHjbBHKs7k0EG2Bs2kk4N6aA==
In-Reply-To: <4C3BA72E.9030809@extendedsubset.com>
Mime-version: 1.0
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit
Cc: tls@ietf.org
Subject: Re: [TLS] New cached-info draft 09 posted
X-BeenThere: tls@ietf.org
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." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Jul 2010 14:27:05 -0000

Marsh,

I would rather fix the issue with the following updated text:

"The hash algorithm used to calculate hash values SHALL be the Finished
message hash algorithm of the handshake exchange from which the hashed
information was cached. The Finished message hash algorithm in this context
is the hash algorithm used to hash handshake messages in the calculation of
verify_data (i.e. Hash(handshake_messages) as defined in section 7.4.9 of
RFC 5246)."

I see no reason to involve the PRF function here. It only adds unnecessary
complexity as far as I can see.

/Stefan



On 10-07-13 1:37 AM, "Marsh Ray" <marsh@extendedsubset.com> wrote:

> On 07/12/2010 04:45 PM, Stefan Santesson wrote:
>> We had a very long debate about this and we finally reached an agreement.
>> Can we stick with it or do we have to redesign this over and over again?
> 
> We're almost there!
> 
>> I don't see the benefit of using a hash that is stronger than the hash
>> function used to generate the finished message.
>> 
>> We only need an identifier.
> 
> Note that the Finished message was not designed to be used as an identifier.
> 
>> The only security requirement identified after a
>> very long debate is that we want to make sure that we preserve the security
>> properties of the Finished message. That we do if we use the same hash
>> function.
> 
> One little wrinkle is that it's not just a simple hash function that
> generates the Finished message. It's from the PRF which is a redundant,
> recursive application of HMAC (itself redundant). In order to calculate
> his Finished verify_data, a TLS 1.0 server has to invoke hash functions
> a total of 16 times (AFAICT, might be off a factor of two there). IMHO
> it's the most robust part of TLS by far.
> 
> Since HMAC is dynamically keyed by the master secret it eliminates a lot
> of precomputation attacks. Perhaps this is why verify_data was not
> expected to need collision resistance and is only 12 bytes (96 bits)
> long. For some purposes the client and server's Finished messages may
> function as a longer 24 byte value.
> 
> So the Finished.verify_data has some very particular properties that are
> impossible to duplicate precisely for the cached_info identifier.
> 
> from -09:
>>    The hash algorithm used to calculate hash values SHALL be the hash
>>    algorithm that was used to generate the Finished message in the
>>    handshake exchange from which the hashed information was cached. Hash
> 
> For TLS 1.0 and 1.1, would this amount to MD5(data)+SHA-1(data)? That's
> 36 bytes.
> 
> I think the closest we can come is by using the PRF with a static
> secret. For collision resistance we could go with the total amount of
> verify_data, 24 bytes.
> 
> How about something like:
> 
> [...]
> 
> The hash values SHALL be generated using the same PRF that was used to
> generate the Finished messages in the handshake exchange from which the
> hashed information was cached. Although normally the PRF would be
> initialized from the master_secret, this usage requires a hashing
> algorithm which remains stable across multiple handshakes. To accomplish
> this the fixed label string is simply supplied again in place of the
> secret input for PRF initialization.
> 
> [...]
> 
>     opaque hash_value<hash_value_length>;
> 
>     hash_value
>        PRF(fixed_value, cached_info_label, Hash(cached_object_data))
>            [0..hash_value_length-1];
> 
>     hash_value_length
>        Twice the length of a single Finished.verify_data message for
>        the current handshake. For all current versions of TLS, this
>        is 24 bytes.
> 
>     fixed_value and cached_info_label
>        The string "cached info" for both.
> 
> - Marsh