Re: Last Call: <draft-herzog-static-ecdh-04.txt> (Use of static-static Elliptic-Curve Diffie-Hellman key agreement in Cryptographic Message Syntax) to Informational RFC

"Herzog, Jonathan - 0668 - MITLL" <jherzog@ll.mit.edu> Mon, 14 March 2011 14:12 UTC

Return-Path: <prvs=20548b1026=jherzog@ll.mit.edu>
X-Original-To: ietf@core3.amsl.com
Delivered-To: ietf@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 62EE53A6D8D for <ietf@core3.amsl.com>; Mon, 14 Mar 2011 07:12:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.847
X-Spam-Level:
X-Spam-Status: No, score=-5.847 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, SARE_OBFU_ALL=0.751, UNPARSEABLE_RELAY=0.001]
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 L6N0YalLOz8m for <ietf@core3.amsl.com>; Mon, 14 Mar 2011 07:11:52 -0700 (PDT)
Received: from mx2.ll.mit.edu (MX2.LL.MIT.EDU [129.55.12.46]) by core3.amsl.com (Postfix) with ESMTP id 8066F3A6910 for <ietf@ietf.org>; Mon, 14 Mar 2011 07:11:49 -0700 (PDT)
Received: from LLE2K7-HUB01.mitll.ad.local (LLE2K7-HUB01.mitll.ad.local) by mx2.ll.mit.edu (unknown) with ESMTP id p2EED949016881; Mon, 14 Mar 2011 10:13:09 -0400
From: "Herzog, Jonathan - 0668 - MITLL" <jherzog@ll.mit.edu>
To: Rene Struik <rstruik.ext@gmail.com>
Date: Mon, 14 Mar 2011 10:13:08 -0400
Subject: Re: Last Call: <draft-herzog-static-ecdh-04.txt> (Use of static-static Elliptic-Curve Diffie-Hellman key agreement in Cryptographic Message Syntax) to Informational RFC
Thread-Topic: Last Call: <draft-herzog-static-ecdh-04.txt> (Use of static-static Elliptic-Curve Diffie-Hellman key agreement in Cryptographic Message Syntax) to Informational RFC
Thread-Index: AcviUfI4dSTktqEsTPeMuzG8j+Xd5w==
Message-ID: <8FC60D60-70EE-4565-909B-590516D48D21@ll.mit.edu>
References: <4D6F0505.3060001@gmail.com> <BA3B13AB-332A-4C54-8B83-9C11332C4EF4@vigilsec.com> <77979BE8-1BF6-4CA5-89FD-2BCA66578B98@ll.mit.edu> <CD891869-5DF5-403E-88B4-58AF1C264D46@ll.mit.edu> <4D7AB9E9.6070702@gmail.com>
In-Reply-To: <4D7AB9E9.6070702@gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: multipart/signed; boundary="Apple-Mail-14--317758457"; protocol="application/pkcs7-signature"; micalg="sha1"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2011-03-14_04:2011-03-14, 2011-03-14, 1970-01-01 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=8 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-1012030000 definitions=main-1103140072
X-Mailman-Approved-At: Mon, 14 Mar 2011 07:29:36 -0700
Cc: "Khazan, Roger - 0668 - MITLL" <rkh@ll.mit.edu>, "ietf@ietf.org" <ietf@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Mar 2011 14:12:02 -0000

On Mar 11, 2011, at 7:10 PM, Rene Struik wrote:

> Dear Jonathan:
> 
> Thanks for our phone call yesterday afternoon (Thu March 10th) and your
> summary below.
> 
> Please see my further comments below on your feedback on my review
> comments (T-h), (T-i), (T-k), and (T-l),
> a) where you labelled (T-h) and (T-i) as "overtaken by events";
> b) where (T-k) refers to CTR mode;
> c) where (T-l) refers to speed-up support.
> 
> I have some security concerns re #a, a question re #b, and a remark re
> #c. If lack of time, at least try and address the security concerns.
> 
> Please feel free to discuss.
> 
> Have a nice weekend (well, it probably already started).
> 
> Best regards, Rene
> 
> 
> On 10/03/2011 5:50 PM, Herzog, Jonathan - 0668 - MITLL wrote:
>> Just to keep everyone informed: Dr. Struik and I spoke by phone earlier today about his comments. My recollection of the conversation is that he accepted most of the comments as resolved, modulo the following additional details:
>> 
>> (And Dr. Struik! One of our agreements has been overtaken by events! Please see below.)

[snip]

>> 
>>>>> (T-h) p. 6, Clause 2.2, l. -6 ff: Given the lack of shall/should/may language, it is unclear whether one stipulates that one
>>>>> checks that public keys in the certificate are on a specific curve (i.e., one does public key validation) or something more relaxed (such as checking
>>>>> that the claimed elliptic curve domain parameters are the same, without checking the public keys themselves. The para would benefit from some
>>>>> firmed-up language here. This should also clarify whether one, in fact, checks the validity of the certificate that included the public key
>>> 
>>> Good points. The language of this draft was based on that in Section 3.1.2 of RFC 3278, but it could be firmed up.
>>> 
>>> With regard to parameter validation, SEC1 (Section 3.2.2) lists a few methods by which a public-key can be checked for valid parameters:
>>> 
>>> * Full check,
>>> * Partial check, and
>>> * Trust the CA.
>>> 
>>> (I'm paraphrasing a bit.) Since RFC 5480 doesn't provide any way for the CA to mark the parameters as 'checked' or 'not checked', I'll have our Draft say that the sender and receiver:
>>> 
>>> * SHOULD do a full parameter check for standard ECDH, and
>>> * SHOULD do a full check for co-factor ECDH, or failing that, SHOULD do a partial check (as seems to be permitted in SEC1, Section 3.2.3).
>> 
>> ***** Dr. Struik! This has been overtaken by events! ************
>> 
>> Due to IPR concerns, I have removed these checks from the draft. The relevant sections now read:
>> 
>> Section 2.2:
>> 
>>   When using static-static ECDH with EnvelopedData, the sending agent
>>   first obtains the EC public key(s) and domain parameters contained in
>>   the recipient's certificate.  It MUST confirm the following at least
>>   once per recipient-certificate:
>> 
>>   o  That both certificates (the recipient's certificate and its own)
>>      contain public-key values with the same curve parameters, and
>> 
>>   o  That both of these public-key values are marked as appropriate for
>>      ECDH (that is, marked with algorithm-identifiers id-ecPublicKey or
>>      id-ecDH [RFC5480]).
>> 
> RS>>
> [First a disclaimer: I have no stake in the ground here, except
> advocating good security practices]
> 
> Fair enough, as long as this does not make the security considerations
> sections null and void.
> 
> However, I am a little bit puzzled here, since this does not seem to
> address any of the ambiguities noted in my comment (T-h). After all,
> the only change to the text of Section 2.2 of
> draft-herzog-static-ecdh-05 you suggest seems to be to replace the phrase
> "It confirms that" by "It MUST confirm the following at least once per
> recipient-certificate", without any further changes.

I believe this is more-or-less correct.

> This does *not* address, since it is entirely unclear whether
> a) one checks that public keys in the certificate are on a specific
> curve (i.e., one does public key validation)
> or
> b) something more relaxed (such as checking that the claimed elliptic
> curve domain parameters are the same, without checking the public keys
> themselves;
> c) whether one, in fact, checks the validity of the certificate that
> included the public key
> 
> Ad #c:
> Without checking the validity of certificates (item #c) {by performing a
> cryptographic signature verification operation at least once}, one might
> as well do away with certificates altogether, since no implicit key
> authentication assurances can be obtained.

This Draft does not forbid verification and validation of certificates. Like RFC 5753, it is merely silent on the issue. My personal opinion is that this is as it should be, as issues of certificate generation, distribution, validation and verification are out of scope of this Draft. 


> Ad #b:
> By just checking that the certificate has a substring indicating the
> purported domain parameters of the other entity's public key (item #b),
> one does not seem to have any assurance that that public key is, in
> fact, indeed of the proper form, i.e., on the curve and a generator of
> the prime order cyclic subgroup of the curve indicated by the domain
> parameters (unless the CA did those checks and by issuing the cert
> attests to this and one indeed verifies the certificate itself
> cryptographically).

While the CA may have performed these checks, it is not required by this document. (In fact, it can't be-- there is no field in the certificate by which the CA can indicate that such a check has been done.)


> Ad #a:
> Without checking whether the public keys exchanged by both entities in
> the protocol are on the same curve, one opens oneself up to a plethora
> of potential attacks (small subgroup attack, invalid point attack, etc.
> -- all well-documented in the cryptographic literature and also
> referenced in the Security Consideration section).

I agree.


> It would help if you could comment on the lingering ambiguities I noted
> in my original comment T-h (elaborated upon above with #a, #b, and #c)
> and which, unless I misunderstand, are not taken away by your suggested
> resolution. Further, it would help if you could indicate whether the
> intention is to publish the draft with sufficient safeguards so as not
> to succumb to well-documented vulnerabilities.
> 
> <<RS


The ambiguities remain. The Draft is silent on when and how the certificates are verified and validated, or when/how the public-key parameters of the ECC key are validated. The first is out of scope, and the second is hindered by IPR considerations. But again, I note that:

1) The draft does not *prohibit* validation of the public-key parameters, and
2) This Draft mirrors the RFC 5753 treatment of the same issues.

Yes, The Draft would be better (meaning that the described system would be more secure) if it mandated the validation of the public-key parameters. But my read of the landscape is that were that the case, the IPR considerations would derail approval of the Draft. So the question is this:  given that RFC 5753 also lacks these validation mandates, is the world less secure with this Draft augmenting RFC 5753, or with just RFC 5753 and without this draft?

[snip]


> 
>>>>> (T-k) p. 11, Clause 6, l. 3 (also l. 15): Why not introduce the CTR encryption mode as an option, at least when authenticity is provided?
>>>>> After all, CTR mode allows implementation of block-ciphers with just the forward encryption mode and offers parallelization and precomputation
>>>>> prospects.
>>> I left it out because I have serious reservations about the security of counter mode. But in looking in to your question, I see there's an even-more serious problem: I can't find an RFC for AES-in-counter-mode for CMS. Perhaps, though, my Google-foo is insufficient. Do you have a pointer to an appropriate RFC?
>> Neither Dr. Struik nor I could find OIDs for AES in counter mode, and so they remain absent from the Draft.
>> 
>> 
> RS>>
> Okay - if OIDs are the only "stairway to heaven".
> 
> Question:
> Shouldn't we put together an I-D that specifies the CTR mode and on OID
> for this??? It would be a shame not to have this available (or could we
> refer to NIST SP 800-38A and does NIST have an OID for this???).
> Any thoughts?
> 
> <<RS


I couldn't find anything in SP 800-38A by searching on 'OID', 'ASN', or 'identifier'. 

It may be worthwhile to create OIDs for counter-mode, but that would be outside the scope of this Draft.


>> 
>> 
>>>>> (T-l) General: When static-static ECDH, as specified here, stipulates checking of the certificate including the public key and that certificate is
>>>>> an ECDSA certificate, significant speed-ups of the computations are possible by combining the key computation step and ECDSA signature verification
>>>>> -- cf.
>>>>> http://www.ietf.org/proceedings/78/slides/saag-7.pdf.
>>>>> or the SAC 2010 paper referenced in that IETF-78 presentation. These results also apply here
>>>>> (and can obviously be ignored or embraced depending upon implementation). I would suggest adding a one-line statement that if ECDSA is used, one shall
>>>>> use the "friendly ECDSA" scheme as in the IETF-78 presentation (which has the same format as the ordinary one).
>> 
>> I told Dr. Struik that I preferred to leave this out of the draft, and he (I believe) agreed.
>> 
>> 
> RS>>
> We can indeed deal with fostering speed-ups separately (as long as this
> is not pushed in a cob-webbed corner!). The interesting thing is that
> implementers of the draft could still move towards these "Friendly
> ECDSA" techniques, without violating the current draft, so the door is
> not completely closed on that one.
> <<RS



In case you didn't see through other channels, we have submitted the -06 version of this draft. It's waiting for manual approval, so I attach it to this email for your perusal.

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