Re: [TLS] Perhaps there's another way. Was: Verify data in the RI extension?

Dr Stephen Henson <lists@drh-consultancy.demon.co.uk> Thu, 26 November 2009 19:24 UTC

Return-Path: <lists@drh-consultancy.demon.co.uk>
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 E46883A6ADC for <tls@core3.amsl.com>; Thu, 26 Nov 2009 11:24:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.587
X-Spam-Level:
X-Spam-Status: No, score=-2.587 tagged_above=-999 required=5 tests=[AWL=0.012, BAYES_00=-2.599]
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 ExadHtRVZhEK for <tls@core3.amsl.com>; Thu, 26 Nov 2009 11:24:58 -0800 (PST)
Received: from claranet-outbound-smtp04.uk.clara.net (claranet-outbound-smtp04.uk.clara.net [195.8.89.37]) by core3.amsl.com (Postfix) with ESMTP id BE4C43A6AD2 for <tls@ietf.org>; Thu, 26 Nov 2009 11:24:57 -0800 (PST)
Received: from drh-consultancy.demon.co.uk ([80.177.30.10]:50193 helo=[192.168.7.8]) by relay04.mail.eu.clara.net (relay.clara.net [213.253.3.44]:10587) with esmtpa (authdaemon_plain:drh) id 1NDjxS-0005zB-DM (Exim 4.69) for tls@ietf.org (return-path <lists@drh-consultancy.demon.co.uk>); Thu, 26 Nov 2009 19:24:50 +0000
Message-ID: <4B0ED607.5050003@drh-consultancy.demon.co.uk>
Date: Thu, 26 Nov 2009 19:24:55 +0000
From: Dr Stephen Henson <lists@drh-consultancy.demon.co.uk>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: "tls@ietf.org" <tls@ietf.org>
References: <C733FAC4.6B2F%stefan@aaa-sec.com> <9923D81D-BABA-4897-A0E3-6938FFB70045@checkpoint.com> <4B0EB686.4090905@extendedsubset.com> <4B0EBA86.9010107@drh-consultancy.demon.co.uk> <4B0ED1DA.1070203@extendedsubset.com>
In-Reply-To: <4B0ED1DA.1070203@extendedsubset.com>
X-Enigmail-Version: 0.96.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [TLS] Perhaps there's another way. Was: Verify data in the RI extension?
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: Thu, 26 Nov 2009 19:24:59 -0000

Marsh Ray wrote:
> Dr Stephen Henson wrote:
>> Marsh Ray wrote:
>>> At the CCS, instead of replacing the client/server MAC secret data,
>>> simply XOR-merge the incoming values with the previous ones.
>>>
>>> * A one-line software change.
>>> * Easy even in hardware.
>>> * Preserves more entropy.
>>> * No changes to PRF.
>> I think this will give problems for external crypto libraries like PKCS#11 where
>> session key derivation is a mechanism with fixed parameters and the actual keys
>> are not available in plain text outside the hardware. You'd need to develop a
>> new mechanism, add it to the PKCS#11 spec and update firmware on every piece of
>> crypto hardware.
> 
> PKCS#11 looks like it defines structures for CK_SSL3_KEY_MAT_PARAMS and
> CK_SSL3_KEY_MAT_OUT (these are also used by TLS).
> 

Yes, it provides handles to the keys but the keys are not necessarily
accessible. Some applications set the parameters so the keys are never
extractable for security reasons. Some security standards *require* that keys
can never leave the token.

That kind of thing causes problems with adding new algorithms (or algorithms
with new inputs). Changing the inputs (as opposed to adding new ones) is less
likely to cause a problem.

Adding new mechanisms or modifying existing ones in incompatible ways is
problematical if there is another standards process where it all has to be
approved/discussed. If the hardware is FIPS 140-2 validated and needs a new
validation to add a new mechanism that's a real pain.

As regards PKCS#11 I'm wondering if the use of interfaces like C_DecryptVerify()
(which improve throughput by decrypting and MACing in one go) places additional
restrictions on what can be done. I'm thinking here if they cause problems with
feeding additional data into a handshake which isn't part of the actual
handshake and might mess up state with e.g. stream ciphers.

Steve.
-- 
Dr Stephen N. Henson.
Core developer of the   OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.co.uk/
Email: shenson@drh-consultancy.co.uk, PGP key: via homepage.