Re: [Spasm] comments on draft-ietf-pkix-eai-addresses-01

Sean Leonard <dev+ietf@seantek.com> Sat, 18 June 2016 14:12 UTC

Return-Path: <dev+ietf@seantek.com>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2301A12D528 for <spasm@ietfa.amsl.com>; Sat, 18 Jun 2016 07:12:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001] autolearn=ham autolearn_force=no
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 Pm4z4x-UIhPr for <spasm@ietfa.amsl.com>; Sat, 18 Jun 2016 07:12:41 -0700 (PDT)
Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2741F12D1BD for <spasm@ietf.org>; Sat, 18 Jun 2016 07:12:41 -0700 (PDT)
Received: from [192.168.123.7] (unknown [75.83.2.34]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 7E93F509B6; Sat, 18 Jun 2016 10:12:39 -0400 (EDT)
To: Wei Chuang <weihaw@google.com>
References: <064201d1ada1$0b94dc20$22be9460$@augustcellars.com> <5740CA5D.9000900@isode.com> <000301d1b4a3$f6fdc470$e4f94d50$@augustcellars.com> <e535c2c6-c1e3-63e3-5296-dd35cac669aa@seantek.com> <CAAFsWK168-2uXW6ug0a-aQsH7zipxciivaDqX5Fa1ig1qQqHBg@mail.gmail.com>
From: Sean Leonard <dev+ietf@seantek.com>
Message-ID: <ac34f3d3-f1c8-d852-93c0-262c4835e096@seantek.com>
Date: Sat, 18 Jun 2016 07:13:09 -0700
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1
MIME-Version: 1.0
In-Reply-To: <CAAFsWK168-2uXW6ug0a-aQsH7zipxciivaDqX5Fa1ig1qQqHBg@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------D51ED7447CF6D1D47AB501BC"
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/HKiH4vLhwOJp4pJSZJXJU3daxSU>
Cc: spasm@ietf.org
Subject: Re: [Spasm] comments on draft-ietf-pkix-eai-addresses-01
X-BeenThere: spasm@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "This is a venue for discussion of doing Some Pkix And SMime \(spasm\) work." <spasm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/spasm>, <mailto:spasm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm/>
List-Post: <mailto:spasm@ietf.org>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/spasm>, <mailto:spasm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 18 Jun 2016 14:12:44 -0000

On 6/17/2016 11:35 AM, Wei Chuang wrote:
>
>
> On Thu, Jun 16, 2016 at 6:31 AM, Sean Leonard <dev+ietf@seantek.com 
> <mailto:dev+ietf@seantek.com>> wrote:
>
>     A few additional points popped out at me:
>
>     Currently, draft-melnikov-spasm-eai-addresses-01 does not restrict
>     out plain (ASCII-only) e-mail addresses. This means that
>     ASCII-only e-mail addresses can be "hidden" from implementations
>     that don't support this new eai method. I am not in favor of this.
>     The text is not really clear about whether non-internationalized
>     email addresses are allowed in eaiName. It should be clear in
>     saying that eaiName is restricted to internationalized email
>     addresses, i.e., where there is at least one character beyond the
>     ASCII range in the local-part. Email addresses that are limited to
>     ASCII in the local-part MUST be encoded in rfc822Name only.
>
>
> Handling coexistence of rfc822Name and eaiName is an interesting 
> question and in an ideal world we could switch from one to the other 
> to reduce the implementation cost. Realistically we'll have to support 
> both for awhile.  I think your suggestion is good which is to support 
> both but restrict usage and will likely reduce deployment confusion.  
> This consequence of this will likely mean keeping rfc822Name and 
> eaiName as acceptable email address representations for the 
> foreseeable future.

Okay.

>
> Let me pose another suggestion I received which is to start a 
> transition to eaiName- we could add a SHOULD recommendation that all 
> future PKIX subject email addresses be represented as eaiName, with 
> language stating the intent to transition to eaiName as the sole 
> representation, along with a SHOULD NOT on future usage of 
> rfc822Name.  Some future revision could change this to MUST/MUST-NOT.  
> What do you think of this approach?

TL;DR: I don't believe that rfc822Name [1] can formally or practically 
be deprecated unless you work closely with ITU-T, and evaluate market 
impact.

The way that GeneralName works is that there are certain "core" name 
types that are given an explicit "CONTEXT-SPECIFIC" tag class 
identifier, leading to a very compact representation. rfc822Name is [1], 
dNSName is [2], etc.

For "non-core types", GeneralName works using the general model of type 
extension using TYPE-IDENTIFIER, namely, an OID and the open type 
defined by the OID. The otherName extended type is itself tagged with 
[0]. When otherName = eaiName gets an OID, that OID is going to bloat 
the GeneralName, for each and every name. (We are only talking about ~10 
bytes, but ~10 bytes multiplied over possibly multiple e-mail addresses 
multiplied over billions of certificates...and other protocols in which 
it might be used...) Moreover, it's going to make validation and 
name-comparing logic more complicated. Consider that Section 4.2.1.10 of 
RFC 5280 says that both dNSName and rfc822Name SHOULD be supported for 
name constraints.

If the long-term goal is to use one field exclusively, it makes a lot 
more engineering sense to change the definition of rfc822Name to 
UTF8String, or, to add a new eaiName [9] UTF8String. Both of those paths 
will have to be done with ITU-T coordination. I have raised this issue 
before and the consensus on this list was against those approaches. Just 
pointing it out. As long as GeneralName is formally controlled by ITU-T 
X.509, if you want to take a step beyond "supporting eaiName" and go to 
"mandate eaiName and deprecate rfc822Name", you have to do something in 
X.509 to deprecate it. At that point, you may as well do something in 
X.509 to replace rfc822Name with a name form the compact way.


>
>     Can the ASN.1 reflect this with an appropriate string restriction?
>
>
>     The comparison algorithm is convoluted. 
>
>
> Domain name represented in A-labels is what RFC5280 requires for its 
> verification process (step 7.2).  The draft just simply states 
> insuring it is represented as A-label in the certificate stored form 
> to reduce risk of translation error by verifier implementation.

Section 7.2 of RFC 5280 only applies to dNSName field; it does not apply 
to other fields.

That also doesn't change the fact that it's convoluted. :)

>     There will be implementations that don't bother with the
>     convoluted algorithm, and running the convoluted algorithm over
>     thousands or hundreds of millions of certificates is going to have
>     a meaningful impact on performance. It's better to put the address
>     in a form that is amenable to octet-by-octet comparison. This
>     argues in favor of requiring the domain name to be in U-labels
>     instead of A-labels, and to normalize case (to lowercase) for
>     characters in the ASCII range.
>
>
> A better place to ask for this change, is to update RFC5280 to mandate 
> comparison as U-label domains.  This draft is just taking the position 
> that there ought to be just one in certificate domain form which is 
> going to be whatever the RFC5280 comparison form is.

Section 7.2 of RFC 5280 limits itself to dNSName. It actually doesn't 
say anything about other name slots, including URI or rfc822Name. The 
reason why RFC 5280 says anything is because dNSName is limited to 
IA5String, but IDNs were "a real thing" back in 2008. EAI was not a real 
thing back then.

If folks insist on case-sensitive comparison of the local-part and 
case-insensitive comparison of the domain part in the ASCII range, then 
maybe it makes more sense to define eaiName as:
SEQUENCE {
  localPart UTF8String,
  domain IA5String }

That way, an application can easily compare the localPart with memcmp 
(because it can contain NULLs), and the domain with stricmp. No hunting 
for quotations or "@" needed.

The advantage of using U-labels (in conjunction with mandatory 
quote-or-no-quote rules) is that the eaiName can be represented in a 
single UTF8String, and can be compared in a single memcmp.


Sean