Re: [pkix] [smime] Support for email address internationalization in RFC5280 certificates

George Michaelson <ggm@algebras.org> Tue, 05 April 2016 23:30 UTC

Return-Path: <ggm@algebras.org>
X-Original-To: pkix@ietfa.amsl.com
Delivered-To: pkix@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 562CA12D5FD for <pkix@ietfa.amsl.com>; Tue, 5 Apr 2016 16:30:07 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=algebras-org.20150623.gappssmtp.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 t86LJzr0Jww7 for <pkix@ietfa.amsl.com>; Tue, 5 Apr 2016 16:30:05 -0700 (PDT)
Received: from mail-oi0-x241.google.com (mail-oi0-x241.google.com [IPv6:2607:f8b0:4003:c06::241]) (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 DBAA912D5CC for <pkix@ietf.org>; Tue, 5 Apr 2016 16:30:03 -0700 (PDT)
Received: by mail-oi0-x241.google.com with SMTP id v126so4496142oia.3 for <pkix@ietf.org>; Tue, 05 Apr 2016 16:30:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=algebras-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-transfer-encoding; bh=pg930UewqaR1QYhvRl/cYjc0hrvLqy/pA3E9Qz1+sAE=; b=K7h9QOjt2yH55Gpe+Z6UEl3xxstutSltcsy/+JPzpAG1Jy1CouqDcqOpSrv/kGCnNI 3yPOD5Go9yNzNvPIxwV2TsJTcShaZXSLp1wsg3FMfpXpYdN3ZLOIQQ0yCLw5hP1VGPwU BVH61t3Y6CJps1tn/eiSJ0wtvihYg0yDzH7/n7H0ZpHA2ad6qpnSOXC3SjhWmWw6lEXV xAdflHDzo+Tl4ARP5Ajdj5xsY0/BwEp+Gae5xqvEyld/ut2Bt6Dcsqfpwd+JAsxiUlTp M3Lf+q+fGLrNDWdS7bm99avpqxVtMLjxy6FC1jo93UKEkuVR8176ol7XV28APqCAbn8X UEdg==
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:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=pg930UewqaR1QYhvRl/cYjc0hrvLqy/pA3E9Qz1+sAE=; b=CZdSaqf7wae0wdvZCkf2a8tDk261uMzGO5tF8M4x6OvofH9z8aP0/qWGXSGnp6VIC+ g4RgiHNUoa4CnrbfjnaPUDfDP9mTJ3t0AG5LaNx+td5qRlSBG6520Nd43FhCnR2FWxE/ TGLZ/pxAOKivby34UP43R6CC8oH25zTvIquazaJzo6B366AvnMk80y1OmkzV7yGt3sw1 0j70O3+p/7ovTyZSvjbQVRQwqOJgg7uQ9xjuRSx0jF2dHGsUVmXl1HBbAv7mAYgENm7L NlzsreK/eV1Mmy5lq6OoNjDh/COLIxAL2fz+UTTDPpwbfoxsJMiax15RGq4ueJMPt8db Bppw==
X-Gm-Message-State: AD7BkJIt8konbIpN3CEmJ1ixRz8s+iXmOzo+jLQzvACUZit37EQAPIdhTJD+3lg4+T6xz+Xdls9At8s8RsWG1Q==
MIME-Version: 1.0
X-Received: by 10.157.36.132 with SMTP id z4mr6429838ota.105.1459890160027; Tue, 05 Apr 2016 14:02:40 -0700 (PDT)
Received: by 10.182.187.97 with HTTP; Tue, 5 Apr 2016 14:02:39 -0700 (PDT)
X-Originating-IP: [2001:67c:370:176:6ce6:1c9:2ded:23e]
In-Reply-To: <CAAFsWK2HA83a6C+ofbaHFE3JCncf8Z-xwy7bCVPC7F+j6DfM4A@mail.gmail.com>
References: <CAAFsWK0F6K_9VrDL7aX0QN56mWdhHsq0KV_1moR9pJ=A4E1BaA@mail.gmail.com> <CAK6vND-nAztjm9DzKNdCf1Hm2rbN5zAN4GWKuu5PiF49LeRSsw@mail.gmail.com> <CAAFsWK0yYrEJkazOcyc+hOUTaihcBi6Aa31g9g3TyxvVzxyF5A@mail.gmail.com> <C726CA9F-369B-4EC9-BB0E-8AE38553858D@seantek.com> <DD5CD1E9-1031-468C-8AA3-D1E2FEAD0B6F@vigilsec.com> <028101d18f60$dd6262e0$982728a0$@augustcellars.com> <CAAFsWK2HA83a6C+ofbaHFE3JCncf8Z-xwy7bCVPC7F+j6DfM4A@mail.gmail.com>
Date: Tue, 05 Apr 2016 18:02:39 -0300
Message-ID: <CAKr6gn1vVAmZLHtS4GtRoX19v-ECKMStkQZE5Ec9vQV2t8rSaw@mail.gmail.com>
From: George Michaelson <ggm@algebras.org>
To: IETF PKIX <pkix@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/pkix/WZLC_ByNOADY3lIRCYDu-tWovu4>
Cc: IETF SMIME <smime@ietf.org>
Subject: Re: [pkix] [smime] Support for email address internationalization in RFC5280 certificates
X-BeenThere: pkix@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: PKIX Working Group <pkix.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pkix>, <mailto:pkix-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/pkix/>
List-Post: <mailto:pkix@ietf.org>
List-Help: <mailto:pkix-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pkix>, <mailto:pkix-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Apr 2016 23:30:07 -0000

IIRC OpenSSL choses the most compact syntactically acceptable ASN.1
alphabet to represent strings. So, if your labels fit in IA5String,
thats what it is. But if tomorrow you re-issue and they no longer fit,
then it promotes to the next minimally correct ASN.1 alphabet.

For compact encoding stuff, this probably makes sense. for POLA its
pretty awful. We got hit by this in RPKI implementation with
non-conforming names and other things, because the OpenSSL library
detected we were writing hex chars, and down-graded to IA5 when we
didn't expect it.

So, if the intent is to have the stringfield encompass UTF-8 bear in
mind, it often won't be marked as UTF8 on the wire, if you don't force
it to be.

-G

On Tue, Apr 5, 2016 at 5:05 PM, Wei Chuang <weihaw@google.com> wrote:
>
>
> On Tue, Apr 5, 2016 at 10:30 AM, Jim Schaad <ietf@augustcellars.com> wrote:
>>
>> It would also be a good way to have all existing implementations crash as
>> they see an option in the choice they do not support.
>>
>>
>>
>> I agree with the use of the OtherName extension.
>
>
> FWIW I pinged someone in OpenSSL about extending OtherName for international
> email address, and the reply was that it won't be an issue to support this
> modulo their long release cycle (about one a year), and current OpenSSL
> won't of course recognize the extension but won't break either.  Depending
> on the situation it may be possible to get a change faster too, and of
> course supplying a patch could help.
>
> -Wei
>
>
>>
>>
>>
>> Jim
>>
>>
>>
>>
>>
>> From: pkix [mailto:pkix-bounces@ietf.org] On Behalf Of Russ Housley
>> Sent: Tuesday, April 05, 2016 9:18 AM
>> To: Sean Leonard <dev+ietf@seantek.com>
>> Cc: IETF PKIX <pkix@ietf.org>; IETF SMIME <smime@ietf.org>
>> Subject: Re: [pkix] [smime] Support for email address internationalization
>> in RFC5280 certificates
>>
>>
>>
>> I am opposed to extending GeneralName with a new item in the CHOICE
>> because the syntax in RFC5280.  That syntax is aligned with X.509.  We would
>> need to work with ITU-T to make an addition to the CHOICE, otherwise the
>> ITU-T could make a change to their specification in the future that causes
>> interoperability problems.
>>
>>
>>
>> I am strongly opposed to changing the type of rfc822name.  As above, this
>> syntax belongs to X.509.  In addition, this change would cause decode errors
>> for existing software, and we have seen decode errors lead to very
>> surprising user experiences.
>>
>>
>>
>> I believe that using the otherName extension mechanism does not have any
>> of the problems with these two proposals.
>>
>>
>>
>> Russ
>>
>>
>>
>>
>>
>> On Apr 4, 2016, at 6:20 PM, Sean Leonard <dev+ietf@seantek.com> wrote:
>>
>>
>>
>>
>>
>> On Feb 7, 2016, at 12:15 PM, Wei Chuang <weihaw@google.com> wrote:
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Feb 5, 2016 at 4:46 PM, Peter Bowen <pzbowen@gmail.com> wrote:
>>
>> On Thu, Feb 4, 2016 at 11:05 AM, Wei Chuang <weihaw@google.com> wrote:
>> > PKIX community,
>> >
>> > We've observed a limitation for specifying internationalized email
>> > addresses
>> > as the local part which is restricted to essentially ASCII.  That is
>> > subject
>> > or issuer email addresses which should be stored as subject-alt-name or
>> > issuer-alt-name rfc822Name and are encoded as IA5String.  This is
>> > despite
>> > the internationalization in email usage as specified by
>> > internationalization
>> > of email headers in RFC6532 allowing Unicode in To, From, etc fields and
>> > becoming fairly commonplace.  RFC5280 already specifies
>> > internationalization
>> > of the domain but lacks any specification for the local-part.
>>
>>
>>
>> Up until now, I have tried to lay low on this topic. However, having
>> reviewed the relevant standards and implementations in the field, I have my
>> 22¢:
>>
>>
>>
>> The proposed methods are to create an otherName form and assign a new
>> object identifier for it (A. Melnikov, ed.,
>> draft-ietf-pkix-eai-addresses-00), and to encode the local part in base64
>> with “:” as an escape signal (L. Baudoin, et. al., draft-lbaudoin-iemax-02).
>> There is also a counterproposal on the agenda, which I will label as #3, to
>> make rfc822Name a CHOICE {IA5String, UTF8String}. There are two other
>> methods that deserve serious consideration. My 0.2¢ is on #4 and my 21.8¢ is
>> on #5:
>>
>>
>>
>> #4 Extend GeneralName with a new name type:
>>
>>
>>
>> GeneralName ::= CHOICE {
>>
>>   otherName [0] INSTANCE OF OTHER-NAME,
>>
>>   rfc822Name [1] IA5String,
>>
>>   dNSName [2] IA5String,
>>
>>   x400Address [3] ORAddress,
>>
>>   directoryName [4] Name,
>>
>>   ediPartyName [5] EDIPartyName,
>>
>>   uniformResourceIdentifier [6] IA5String,
>>
>>   iPAddress [7] OCTET STRING,
>>
>>   registeredID [8] OBJECT IDENTIFIER,
>>
>>   eaiName [9] UTF8String
>>
>>   ... }
>>
>>
>>
>> The advantage of this approach is that it conforms to X.509:2012, which
>> uses … syntax to show that the CHOICE is extensible. However, the IETF
>> invented GeneralName (RFC 2459), and the latest ASN.1 (RFC 5912) does not
>> use … syntax for extensibility. (Basically I think most implementations
>> would barf on this CHOICE, and would cause the overall ASN.1 decoding op to
>> fail, meaning all places where GeneralName is directly encoded, would cause
>> implementations to barf.)
>>
>>
>>
>> #5 Change GeneralName so that rfc822Name is actually just UTF8String:
>>
>>
>>
>>    GeneralName ::= CHOICE {
>>
>>         otherName                   [0]  INSTANCE OF OTHER-NAME,
>>
>>         rfc822Name                  [1]  UTF8String,
>>
>>         dNSName                     [2]  IA5String,
>>
>>         x400Address                 [3]  ORAddress,
>>
>>         directoryName               [4]  Name,
>>
>>         ediPartyName                [5]  EDIPartyName,
>>
>>         uniformResourceIdentifier   [6]  IA5String,
>>
>>         iPAddress                   [7]  OCTET STRING,
>>
>>         registeredID                [8]  OBJECT IDENTIFIER
>>
>>    }
>>
>>
>>
>> GeneralName is in the IMPLICIT TAGS part of PKIX. That means that on the
>> wire, a GeneralName will (almost always) just be serialized as the
>>
>> application tag in the choice, followed by the length and the data. The
>> counterproposal of a CHOICE {IA5String, UTF8String} is flawed in that it
>> will force ALL rfc822Names to include an additional tag UNIVERSAL 22 in the
>> case of IA5String, because the choice is ambiguous without the tag (so a
>> proper ASN.1 compiler will force the serialization and de-serialization of
>> the tag). Note: UTF8String (in a CHOICE) would force serialization of the
>> tag UNIVERSAL 12.
>>
>>
>>
>> With this proposal #5, UTF8String is just a superset of IA5String.
>> Therefore, new implementations will “just work” with virtually no further
>> coding. The high-octet data in UTF8String will violate expectations for
>> older implementations that are looking for IA5String. But enforcement of
>> octets 00-7F is almost never done in the decoding step, or if it is done, it
>> does not cause the entire ASN.1 decoding op to fail. (Note: this would be an
>> “ASN.1 value constraint violation.”) If most implementations will continue
>> to decode the ASN.1 and simply skip over what it perceives to be “invalid
>> ASCII” (or simply rejects that particular alternative when doing name
>> comparisons), we are good to go. This basically mirrors the way that EAI
>> itself works in RFCs 6530-6532.
>>
>>
>>
>> To test this, one would want to construct a signed certificate with
>> “invalid” IA5String data that actually contains valid Unicode octets, and
>> see what happens with various implementations.
>>
>>
>>
>> I am not saying that this is the “right” approach, but I do think that it
>> deserves serious consideration when evaluating alternatives. An example of
>> an advantage is that it should preserve name constraints with no additional
>> coding.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Sean
>>
>> _______________________________________________
>> smime mailing list
>> smime@ietf.org
>> https://www.ietf.org/mailman/listinfo/smime
>>
>>
>>
>>
>> _______________________________________________
>> pkix mailing list
>> pkix@ietf.org
>> https://www.ietf.org/mailman/listinfo/pkix
>>
>
>
> _______________________________________________
> pkix mailing list
> pkix@ietf.org
> https://www.ietf.org/mailman/listinfo/pkix
>