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

Wei Chuang <weihaw@google.com> Sun, 19 June 2016 09:59 UTC

Return-Path: <weihaw@google.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 C58FD12B00E for <spasm@ietfa.amsl.com>; Sun, 19 Jun 2016 02:59:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.426
X-Spam-Level:
X-Spam-Status: No, score=-3.426 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
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 9uklgdJHyQbR for <spasm@ietfa.amsl.com>; Sun, 19 Jun 2016 02:59:37 -0700 (PDT)
Received: from mail-oi0-x229.google.com (mail-oi0-x229.google.com [IPv6:2607:f8b0:4003:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 38E6A12B006 for <spasm@ietf.org>; Sun, 19 Jun 2016 02:59:37 -0700 (PDT)
Received: by mail-oi0-x229.google.com with SMTP id d132so173717171oig.1 for <spasm@ietf.org>; Sun, 19 Jun 2016 02:59:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mSXrWZOvXmooCVyga1KeNd5zTeXdIAA7lyiNLAgfBgA=; b=Ik+Q83a27U5j7AnrnFH2JFxoO6Rpzn+iBvUtZ3MZ/1RyktnJdHRyRPD1x2zSTZGvOC ENJStH29iAp6zA39L7qdWW5CTpso2CIyuYzB49ps4c9uw5Py0CqLocgx/vY82L639WPa Vh1wixx2w/KQ90gGW7UKa9wVfMgnqpNY8RKw1zE3Ue3Kf9HlM29xiKw4YWqmE+2v8J5S egjlUPRbnqQ2arMPZruQmUWH5m+i7J6KkT1CS8gFGuZpTW0n3Yga42zuoe48awJkCYe7 sjdrbf5KMVSPqGb47KT0L1//dg/dUmA27Irm/Wv2EttoWBIiwp0OdT6gA0BBx5rHLAfu 1FTQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mSXrWZOvXmooCVyga1KeNd5zTeXdIAA7lyiNLAgfBgA=; b=QXC1TYia1ELoLDX1iefUVAJzudeAMUlQNckAoP9F8R40j5lc+LcIzrXMzIErNLMlSZ c6xsvv/gybwBi2aHMf/YvQgFo+qKcPQBAVnrHVeW2FwPkjSTF2jMqOIJj8rUdO+XUzGo MqwYFTnlpanousSKBujWs3KUraZ95aj+bsZRS/g/B44ljVLHyNlbQlimxdkvpm6Zj77a iuApTg4bly7Uo8f+1ZFyCXpQFYkhkR4sQo5ktfVGmJ2rHTvhKhBMHzQzysIMCnDE61tB ifLQIu968um29R9XJ3YVuTdiTSCSQSAhVKGeV0zbe7eDumNqeeFLK3ZbrPisCEnPF1UG BeaA==
X-Gm-Message-State: ALyK8tIFofYpAzdnz2yCj/YSIEv85qKZGdNeLLr26YS5qoehOlUhfXgoNBons18YCs5qKRI+WYbpXdgpXOXz9eo8
X-Received: by 10.157.37.242 with SMTP id q105mr5596388ota.29.1466330375992; Sun, 19 Jun 2016 02:59:35 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.27.139 with HTTP; Sun, 19 Jun 2016 02:59:35 -0700 (PDT)
In-Reply-To: <ac34f3d3-f1c8-d852-93c0-262c4835e096@seantek.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> <ac34f3d3-f1c8-d852-93c0-262c4835e096@seantek.com>
From: Wei Chuang <weihaw@google.com>
Date: Sun, 19 Jun 2016 02:59:35 -0700
Message-ID: <CAAFsWK2vbzGQm4o1z-GQPLjsGZfUgZ7gaRHHfyJ7twEY--Oqqw@mail.gmail.com>
To: Sean Leonard <dev+ietf@seantek.com>
Content-Type: multipart/alternative; boundary="001a113cf5982f87e505359ea507"
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/_acW0zmtJ6PANohJbC7-KkqNWo0>
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: Sun, 19 Jun 2016 09:59:39 -0000

On Sat, Jun 18, 2016 at 7:13 AM, Sean Leonard <dev+ietf@seantek.com> wrote:

> 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>
> 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.
>

Got it.  Sure I can add language to restrict eaiName to when needed to
support UTF-8 local parts only.


>
>
>
>
>> 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.
>

Sorry I should have been more precise for purposes of discussion as I
skipped a step.  See section 7.5 "Internationalized Electronic Mail
Addresses" which then points back to 7.2.


   To accommodate email
   addresses with internationalized domain names using the current
   structure, conforming implementations MUST convert the addresses into
   an ASCII representation.

   Where the host-part (the Domain of the Mailbox) contains an
   internationalized name, the domain name MUST be converted from an IDN
   to the ASCII Compatible Encoding (ACE) format as specified in
Section <https://tools.ietf.org/html/rfc5280#section-7.2>
   7.2 <https://tools.ietf.org/html/rfc5280#section-7.2>.

   Two email addresses are considered to match if:

      1)  the local-part of each name is an exact match, AND

      2)  the host-part of each name matches using a case-insensitive
          ASCII comparison.


The approach in the draft comes from this precedence and a desire to
eliminate the conversation at verification time.

To do what your requesting, I think we need to get context as to why
RFC5280 converts domains to A-labels instead of U-labels.  Its certainly
useful to explore if this change is reasonable, as the upside is a more
compact representation and typically a simpler comparison- just have to
make sure there isn't a significant negative impact though.  Hopefully some
of the RFC5280 authors can help clarify why the domain in ASCII format is
required for comparison?

thanks,
-Wei


> 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
>
>