Re: [TLS] CertficateRequest extension encoding

David Benjamin <> Sun, 04 September 2016 17:43 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 931F212B27C for <>; Sun, 4 Sep 2016 10:43:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.207
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: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id zf8wcSSxWTte for <>; Sun, 4 Sep 2016 10:43:42 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4001:c0b::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id AC9D212B27A for <>; Sun, 4 Sep 2016 10:43:42 -0700 (PDT)
Received: by with SMTP id e124so116184260ith.0 for <>; Sun, 04 Sep 2016 10:43:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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;; 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 with SMTP id p196mr19106391itp.76.1473011021747; Sun, 04 Sep 2016 10:43:41 -0700 (PDT)
MIME-Version: 1.0
References: <> <>
In-Reply-To: <>
From: David Benjamin <>
Date: Sun, 04 Sep 2016 17:43:31 +0000
Message-ID: <>
To: Ilari Liusvaara <>,
Content-Type: multipart/alternative; boundary="001a113f6d5eb3f37d053bb21a58"
Archived-At: <>
Subject: Re: [TLS] CertficateRequest extension encoding
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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 <> 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 <>
> 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