Re: [TLS] CertficateRequest extension encoding

David Benjamin <davidben@chromium.org> Sun, 04 September 2016 17:43 UTC

Return-Path: <davidben@google.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 931F212B27C for <tls@ietfa.amsl.com>; Sun, 4 Sep 2016 10:43:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.207
X-Spam-Level:
X-Spam-Status: No, score=-4.207 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.508, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 zf8wcSSxWTte for <tls@ietfa.amsl.com>; Sun, 4 Sep 2016 10:43:42 -0700 (PDT)
Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (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 AC9D212B27A for <tls@ietf.org>; Sun, 4 Sep 2016 10:43:42 -0700 (PDT)
Received: by mail-it0-x235.google.com with SMTP id e124so116184260ith.0 for <tls@ietf.org>; Sun, 04 Sep 2016 10:43:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=QcgKOYSjS1zvsMUuEH7LdcieoTXHliBhqQHUOXHkYbs=; b=hANe7OqUWvY3/mhh5GSdq09/NLHBbkLxmhNed/ohMHNyywjqbQaFVEJnOw5Fy8xOyx +UJ6vNnqFW0jrc4Eqy6xRAbAdiM4iJANiZ4eq+feHn+mbSJzfw94rGpwj4DqIw2fM+8f RHiddP6lGz6eHBLRb6HUA9zy28y3rfskbf7A4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=QcgKOYSjS1zvsMUuEH7LdcieoTXHliBhqQHUOXHkYbs=; b=Qn19GlRmSVznrmrUX6fcAVhzCOIh7lQo1Vgu0k6qDtsj7sJc+xjPde0/tHzCbm28jI I7nrzmlyOUHWXm/5NsdpJQaojmNknnjdrO9tRBjBS7KnmmlKgzg8K/RoDD80v3YOXg7a ufjH3LJexqhew2/GuagctExhAtXp78YCcgzKGcTJ+B6Zc3Iqg0JeaR1XX2Uk+hbMRpD4 v5n6Bn/brFH26bbfo6R78JSqnKywkfgnrgSJ6A+ZE2U9TBtmDyCRTa2Aq/Q3TLqdcfVc c0RWwMuuI4IwftUQuVDEVE8PI6v6D2pFBVr8ITb5FylpuDqzUV3cqjMnfeOMchpGjs5b K5/w==
X-Gm-Message-State: AE9vXwOUwwH2fwwPmjk/3+Mtgoh2kvTEpWF8cfqu4wrj00aP9aNX+ny6PSi2dJOeSMrU8un+gestDxajYYBb6nhn
X-Received: by 10.36.41.205 with SMTP id p196mr19106391itp.76.1473011021747; Sun, 04 Sep 2016 10:43:41 -0700 (PDT)
MIME-Version: 1.0
References: <20160904105637.sjl4wmr2hc2mito6@LK-Perkele-V2.elisa-laajakaista.fi> <CAF8qwaApcZBC0K8m27CtYbUd3zb5HvVQbDxpN0kkY0c=Pj4Rcw@mail.gmail.com>
In-Reply-To: <CAF8qwaApcZBC0K8m27CtYbUd3zb5HvVQbDxpN0kkY0c=Pj4Rcw@mail.gmail.com>
From: David Benjamin <davidben@chromium.org>
Date: Sun, 04 Sep 2016 17:43:31 +0000
Message-ID: <CAF8qwaDVGrnzeLQD1ika0=VZbD8gJpigcRv_qgiAYdHV_iS2jA@mail.gmail.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>, tls@ietf.org
Content-Type: multipart/alternative; boundary="001a113f6d5eb3f37d053bb21a58"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/S5jCWBluQlmsUjAfQ5izGSreaoU>
Subject: Re: [TLS] CertficateRequest extension encoding
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 04 Sep 2016 17:43:44 -0000

Apologies, I hit 'Send' too early. Finished a sentence below:

On Sun, Sep 4, 2016 at 1:41 PM David Benjamin <davidben@chromium.org> wrote:

> I have no involvement in systems that would want this (our implementation
> just ignores it), but it seems a TLS-style registry would be better than
> using OIDs anyway. Concretely:
>
> A CertificateExtension is a hint to the client about what kind of
> certificates are acceptable. We have a registry of u16s for them. Clients
> ignore extensions they don't understand, so it is ultimately on the server
> to check the certificate is acceptable (as it always is). If we wish to
> filter on OIDs, we define, e.g., a key_usage value whose contents have some
> KeyUsage-specific meaning.
>
> That would buy us:
>
> - More consistency with other TLS fields.
>
> - More compact encoding. (At the cost of going getting to define 2^16 rule
> types, but this seems to have been everywhere else.)
>
> - It is easy to look up what a CertificateExtension means and avoid
> conflicts. I can go to the registry and see that type 43 means "match
> KeyUsage in this way". For OIDs, it's not obvious whether
>

For OIDs, it's not obvious whether a given OID has had a matching rule
defined. (Existing X.509 extensions do not have TLS-level matching rules
defined. I expect new ones will be defined without them too.)


> - Relatedly, we can define multiple kinds of matching rules on the same
> OID. Suppose we define it one way and we realize we got it wrong. The OID
> scheme means we're stuck with it. The TLS-style scheme allows us to define
> key_usage_v2 if needed.
>
> - Less confusion about known OIDs with unknown matching rules. The text is
> a little funny right now. There are plenty of known extension OIDs right
> now with unknown matching rules. Do we fallback to exact match (which means
> we can never change this) or should clients ignore those? That enforcing
> known OIDs is a MUST-level requirement makes this messier.
>
> - More flexibility in defining future rule types. Perhaps we want to say
> some extension is not present. Or some rule is really a combination of two
> OIDs. Or not an OID at all like "your RSA key must be at least 2048 bits".
>
> What do folks think?
>
> David
>
> On Sun, Sep 4, 2016 at 6:56 AM Ilari Liusvaara <ilariliusvaara@welho.com>
> wrote:
>
>> How are the OIDs and values in CertificateRequest extensions encoded
>> exactly (I can't make it out from the text)?
>>
>>
>> Does the OID part have the ASN.1 OID TLV tag and length (e.g.
>> is EKU 0x55 0x1D 0x25 or 0x06 0x03 0x55 0x1D 0x25)?
>>
>>
>> And how is the value encoded? Using the same encoding as
>> extnValue payload of respective extension in X.509 certifcates?
>> Or is it OID-specific (and if it is, what exactly goes to it
>> for EKU and KU? RFC 5280 ExtKeyUsageSyntax and KeyUsage?)
>>
>>
>> (Currently the text just refers to DER encoding, and in a
>> way that could be read to apply to just to values).
>>
>>
>> -Ilari
>>
>> _______________________________________________
>> TLS mailing list
>> TLS@ietf.org
>> https://www.ietf.org/mailman/listinfo/tls
>>
>