Re: [TLS] HSM-friendly Key Computation

Robert Relyea <rrelyea@redhat.com> Wed, 22 April 2015 17:03 UTC

Return-Path: <rrelyea@redhat.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C371A1B380F for <tls@ietfa.amsl.com>; Wed, 22 Apr 2015 10:03:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.013
X-Spam-Level:
X-Spam-Status: No, score=-5.013 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 sziTqPehvxIv for <tls@ietfa.amsl.com>; Wed, 22 Apr 2015 10:03:09 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 274EA1B3866 for <tls@ietf.org>; Wed, 22 Apr 2015 10:02:52 -0700 (PDT)
Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id C5FE8AC7A3 for <tls@ietf.org>; Wed, 22 Apr 2015 17:02:51 +0000 (UTC)
Received: from rrelyea-laptop.usersys.redhat.com (dhcp-16-202.sjc.redhat.com [10.14.16.202]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3MH2peH005569 for <tls@ietf.org>; Wed, 22 Apr 2015 13:02:51 -0400
Message-ID: <5537D43A.9080802@REDHAT.COM>
Date: Wed, 22 Apr 2015 10:02:50 -0700
From: Robert Relyea <rrelyea@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
MIME-Version: 1.0
To: tls@ietf.org
References: <0694C3DB-FB87-42A2-BCC4-CC0F761E9A03@vigilsec.com> <9A043F3CF02CD34C8E74AC1594475C73AB000B0C@uxcn10-tdc05.UoA.auckland.ac.nz> <5533F8D6.9070500@nthpermutation.com> <20150420064243.GA7322@LK-Perkele-VII> <CANeU+ZAL6oT6tP7OcL_8j6kp4oZB9V89R-0PrCdv-N27qVb0HQ@mail.gmail.com> <20150420163755.GA15511@LK-Perkele-VII>
In-Reply-To: <20150420163755.GA15511@LK-Perkele-VII>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha1"; boundary="------------ms030005080708030707040608"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/xiiLComPc64fJoqNPli0J9UnzyE>
Subject: Re: [TLS] HSM-friendly Key Computation
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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/options/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: Wed, 22 Apr 2015 17:03:10 -0000

On 04/20/2015 09:37 AM, Ilari Liusvaara wrote:
> On Mon, Apr 20, 2015 at 12:09:56PM -0400, StJohns, Michael wrote:
>> On Monday, April 20, 2015, Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
>> wrote:
>>
>>> On Sun, Apr 19, 2015 at 02:49:58PM -0400, Michael StJohns wrote:
>>>> What I would love to see for TLS1.3 is NO TLS specific mechanisms being
>>>> added to PKCS11.    That if we still sign the finished message, we use a
>>>> true MAC function.  That if we derive keys, we use a bog standard KDF.
>>> That
>>>> we stomp on every TLS specific twist unless there is a specific security
>>>> need to keep TLS secure.
>>> Not possible. There are features (e.g. extractor and resumption/unique
>>> interaction) that can't be feasibly removed (or even deprecated) and which
>>> need PRF'ing secret keys into public data.
>> I'm not quite sure how you've come to this conclusion.  The underlying
>> function for a KDF is generally a MAC function which by definition produces
>> public data.  It's only when bound into a KDF that it by definition
>> produces secret data.  The main problem we've encountered is that we use
>> the same key to produce public (IV) data and private key material.   Fixing
>> this is more an issue of how to cryptographically isolate products of the
>> diverse operations in a way that enhances security.
> Maybe I used bad terminology, but...
>
> There are other places in TLS that fundamentally need to (indirectly) derive
> public data out of secret key material.
That's not a a problem. The problem is using the same mechanism to 
derive the public data that we use to derive the keys.
It's even OK to use the same secret key for both (from an HSM POV).

What Michael is saying is that there are existing functions for both KDF 
(secret material -> key) and Mac (secret material-> unique public data). 
He's requesting that TLS not have it's own versions of these functions.

So there are really 3 things being discussed here and there is some 
conflation:

1) The use of the same mechanism to create both secret and public data. 
This is the most serious issue because there is no work around for 
HSM's, today people with access to HSM's can use the existing mechanism 
for IV to leak actual keys protected by the HSM.
2) The use of a single mechanism to generate multiple keys (and IVs) in 
a single operation. This isn't HSM pain, it's more a PKCS #11 pain. I 
think this is more of a 'cleanliness' issue. PKCS #11  may still choose 
to provide a single mechanism for performance reasons.
3) The use of yet another KDF and MAC. The world has lots of KDF's and 
MAC's out there, we does TLS need another. I'm a bit ambivalent about 
this. In an ideal world we would all use the same KDFs rather than 
inventing a new one for each protocol. On the other hand TLS is a big 
enough fish I don't see a big issue having it's own. I'd rather someone 
propose exactly what other KDF TLS would use. Currently I don't support 
many KDF's myself, TLS being the main one.

For me 1) is the only show stopper, 2 and 3 are basically bike shedding 
(though I admit we are talking some pretty ugly bike sheds;).

bob
>
> E.g. extractor and unique/resumption-interaction. There might be others as
> well.
>
>
> -Ilari
>
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls