Re: [secdir] Secdir review of draft-herzog-static-ecdh-05

Brian Weis <bew@cisco.com> Tue, 08 March 2011 05:14 UTC

Return-Path: <bew@cisco.com>
X-Original-To: secdir@core3.amsl.com
Delivered-To: secdir@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 7058F3A696F; Mon, 7 Mar 2011 21:14:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -110.224
X-Spam-Level:
X-Spam-Status: No, score=-110.224 tagged_above=-999 required=5 tests=[AWL=-0.375, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8, SARE_OBFU_ALL=0.751, USER_IN_WHITELIST=-100]
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 nD1sDZ-AH7cT; Mon, 7 Mar 2011 21:14:10 -0800 (PST)
Received: from sj-iport-3.cisco.com (sj-iport-3.cisco.com [171.71.176.72]) by core3.amsl.com (Postfix) with ESMTP id 1098D3A6847; Mon, 7 Mar 2011 21:14:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=bew@cisco.com; l=7469; q=dns/txt; s=iport; t=1299561324; x=1300770924; h=subject:mime-version:from:in-reply-to:date:cc: content-transfer-encoding:message-id:references:to; bh=zMDsdRuaLDK0HDovTJFhsEyaXKRJdkbPnRaNElTdfZk=; b=DpGTLoCtuFL3bf0gtGJ5zaEEY+Gmfbu3A/+iOO6Jwnzz+HCVYWKNZO8Z UbQYgVuDApll43zIEXNWXOHMaasmrlNezVx0ZGRPLvvU985lh0OkXj/+G ioDo51dtjB9HO/czVeburFIV90/ZcgSnZIod6mE31DVEsdnwGdfjEVhaL 0=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvsEAJtKdU2rR7Hu/2dsb2JhbACmVnShdZw+gxiCSgSFHYcVjCA
X-IronPort-AV: E=Sophos;i="4.62,282,1297036800"; d="scan'208";a="274576348"
Received: from sj-core-5.cisco.com ([171.71.177.238]) by sj-iport-3.cisco.com with ESMTP; 08 Mar 2011 05:15:07 +0000
Received: from stealth-10-32-244-213.cisco.com (stealth-10-32-244-213.cisco.com [10.32.244.213]) by sj-core-5.cisco.com (8.13.8/8.14.3) with ESMTP id p285F6m1027114; Tue, 8 Mar 2011 05:15:06 GMT
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset="us-ascii"
From: Brian Weis <bew@cisco.com>
In-Reply-To: <552BBAA9-712F-49B4-8A5F-C671C3817C05@ll.mit.edu>
Date: Mon, 07 Mar 2011 21:15:06 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <AA323705-436C-4B71-8B51-D2CA9E4E140C@cisco.com>
References: <D858A225-D1D1-497D-BA40-A66D3F55AD57@cisco.com> <552BBAA9-712F-49B4-8A5F-C671C3817C05@ll.mit.edu>
To: "Herzog, Jonathan - 0668 - MITLL" <jherzog@ll.mit.edu>
X-Mailer: Apple Mail (2.1082)
Cc: "draft-herzog-static-ecdh@tools.ietf.org" <draft-herzog-static-ecdh@tools.ietf.org>, "iesg@ietf.org" <iesg@ietf.org>, "secdir@ietf.org" <secdir@ietf.org>
Subject: Re: [secdir] Secdir review of draft-herzog-static-ecdh-05
X-BeenThere: secdir@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Security Area Directorate <secdir.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/secdir>
List-Post: <mailto:secdir@ietf.org>
List-Help: <mailto:secdir-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/secdir>, <mailto:secdir-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Mar 2011 05:14:11 -0000

Hi Jonathan,

On Mar 6, 2011, at 1:43 PM, Herzog, Jonathan - 0668 - MITLL wrote:

> 
> On Mar 3, 2011, at 1:39 AM, Brian Weis wrote:
> 
>> I have reviewed this document as part of the security directorate's ongoing effort to review all IETF documents being processed by the IESG. 
> 
> I plan to address these comments and submit a new draft in the next few days. Before I do, however, do you mind if I asked you a few questions?
> 
>> 1. The Abstract and Introduction use the term "static-static" Elliptic Curve Diffie-Hellman key-agreement, which is a term not in common use. I guessed correctly that it meant the case where both participants in the key agreement were using static DH values, but I think until the term is define (later on in the Introduction) it would be clearer to say something like "Elliptic Curve Diffie-Hellman key-agreement where both participants use static Diffie-Hellman values".
> 
> Good catch. I have included your suggestion in both the abstract:
> 
>      "This document describes how to use 'static-static' Elliptic
>      Curve Diffie-Hellman key-agreement (i.e., Elliptic Curve
>      Diffie-Hellman where both participants use static Diffie-Hellman
>      values) with the Cryptographic Message Syntax."
> 
> and the introduction:
> 
>   "This document describes how to use the static-static Elliptic-Curve
>   Diffie-Hellman key agreement scheme (i.e., Elliptic Curve Diffie-
>   Hellman [SEC1] where both participants use static Diffie-Hellman
>   values) in the Cryptographic Message Syntax (CMS) [CMS]."
> 
> And the rest of the introduction remains the same. Do you think this will be enough to orient the reader correctly?

That'll do the trick nicely, I think.
> 
> 
>> 2. Reference [SEC1] is heavily referenced in this document, for both a definition of ECDH and specific methods for using ECDH. But it would be good to also mention RFC 6090, which is the best IETF document describing ECDH.
> 
> I was not previous aware of this RFC-- my bad. I have added it as an informative reference, but continued to refer to [Sec1] as the normative reference for the ECDH operation. Or do you think that RFC 6090 should be the normative reference?

I would suggesting using RFC 6090 for a normative reference to ECDH if you need such a reference. But I don't believe RFC 6090 discusses static-static consideration or issues at all, so for that [Sec1] seems to be the appropriate normative reference.

>> 3. Generally, when two parties use static DH values over different exchanges they will use the same key for each exchange, which is generally not a good practice. I believe this is true for ECDH as well. Sections 2.2 and 2.3 mention "SharedInfo", which when used appropriately will permute the shared key such that the sessions are not keyed identically. But I believe the use of "SharedInfo" is optional, so I was expecting the Security Considerations to describe this scenario and at least say that "SharedInfo" SHOULD be used (or possibly MUST be used). It would be good to add this discussion to Security Considerations.
> 
> I'm not sure what you mean, here. Do you mean the SharedInfo value, or the ukm value? According to RFC 3278, the SharedInfo value is the DER encoding of the ECC-CMS-SharedInfo value:
> 
> 
>      ECC-CMS-SharedInfo ::= SEQUENCE {
>         keyInfo AlgorithmIdentifier,
>         entityUInfo [0] EXPLICIT OCTET STRING OPTIONAL,
>         suppPubInfo [2] EXPLICIT OCTET STRING   }
> 
> Also according to that RFC:
> 
>      entityUInfo optionally contains additional keying material
>      supplied by the sending agent.  When used with ECDH and CMS, the
>      entityUInfo field contains the octet string ukm.

> 
> So, my read of the RFC is that ECDH in CMS will always use a SharedInfo value to derive keys, and this value will contain a per-message unique value if and only if the ukm field was used by the sender. Now, the ukm value *is* optional, according to RFC 5652, which is why our Draft says they SHOULD be used:
> 
> Section 2.1:
> 
>   o  ukm MAY be present or absent.  However, message originators SHOULD
>      include the ukm.  As specified in [CMS], implementations MUST
>      support ukm message recipient processing, so interoperability is
>      not a concern if the ukm is present or absent.  The use of a fresh
>      value for ukm will ensure that a different key is generated for
>      each message between the same sender and receiver. ukm, if
>      present, is placed in the entityUInfo field of the ECC-CMS-
>      SharedInfo structure [CMS-ECC] and therefore used as an input to
>      the key derivation function.
> 
> 
> Security Considerations:
> 
>   Extreme care must be used when using static-static Diffie-Hellman
>   (either standard or cofactor) without the use of some per-message
>   value in ukm.  If no message-specific information is used (such as a
>   counter value, or a fresh random string) then the resulting secret
>   key could be used in more than one message.  Under some
>   circumstances, this will open the sender to the 'small subgroup'
>   attack [MenezesUstaoglu] or other, yet-undiscovered attacks on re-
>   used Diffie-Hellman keys.  Applications that cannot tolerate the
>   inclusion of per-message information in ukm (due to bandwidth
>   requirements, for example) SHOULD NOT use static-static ECDH for a
>   recipient without ascertaining that the recipient knows the private
>   value associated with their certified Diffie-Hellman value.
> 
> 
> So I'm under the impression that our Draft requires a ukm value (with a SHOULD), and that RFC 3278 requires that this ukm value be included in a SharedInfor value which is used to derive keys. But did I misread RFC 3278?

I did notice the text regarding ukm in your I-D, but definitely missed linkage you quote from RFC 3278 above. So rather than misreading RFC 3278 you've clarified it for me. :-) Your explanation makes sense to me.

> Do I need to explicitly require that the SharedInfo value be used?

I think your requirements are fine. But because you discuss both ukm and SharedInfo, I would clarifying their linkage. For example, in your Security Considerations you could mention the role of SharedInfo to permute the session so that two sessions setup between the same entities will be keyed independently, point out that CMS specifies that ukm is to be the value used in SharedInfo, and how ukm is determined so that it will properly do its job. This is also rationale for the SHOULD in section 2.1.

BTW, the RFC Index search engine says that RFC 3278 has been obsoleted by RFC 5753. You should reference that one (which hopefully makes the same statements regarding ukm).

Hope that helps,
Brian

> 
> Thanks.
> 
> -- 
> Jonathan Herzog							voice:  (781) 981-2356
> Technical Staff							fax:    (781) 981-7687
> Cyber Systems and Technology Group		email:  jherzog@ll.mit.edu
> MIT Lincoln Laboratory               			www:    http://www.ll.mit.edu/CST/
> 244 Wood Street    
> Lexington, MA 02420-9185
> 


-- 
Brian Weis
Security Standards and Technology, ARTG, Cisco Systems
Telephone: +1 408 526 4796
Email: bew@cisco.com