Re: [TLS] CertficateRequest extension encoding

Nick Sullivan <nicholas.sullivan@gmail.com> Sat, 24 September 2016 01:17 UTC

Return-Path: <nicholas.sullivan@gmail.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 8044812BEF9 for <tls@ietfa.amsl.com>; Fri, 23 Sep 2016 18:17:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 mf8Z2SoN3gmZ for <tls@ietfa.amsl.com>; Fri, 23 Sep 2016 18:17:35 -0700 (PDT)
Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (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 48FEC12BD79 for <tls@ietf.org>; Fri, 23 Sep 2016 18:17:34 -0700 (PDT)
Received: by mail-it0-x22b.google.com with SMTP id n143so31053551ita.1 for <tls@ietf.org>; Fri, 23 Sep 2016 18:17:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=LDKUvZMYhBsTsD63gIzoYsKGR05L/iKvybaMWtm1isY=; b=Wq2rByIT74ph/EaMYH7Fj8hekve3B5ircaortJ5X88HTxiNhbSZakmgnS3STtHEX52 QoruMp0HbrPFN1qa2ggozly1gMvqyOnUSZ64LaWqqmcg0H7LRdtvtYwqwqyt2pWvhmql 3GD6DzzPCdsE9vRqNESOcdfyYnF4mE2OtI0oRWjtxya7rpTCXS9GFSl1on9tMgfqx2Zy 9tTcm0QmZeN1ShfmsoTGwsxu3Glq42qKhUiFfo69efuHo6hNz4FLZUjuPhrtScDVygbn rPWz0hA6jCuEbPE08q85YjXRr6gPHwlqSPFBq5v9+qyj2xFIPY8WgiGhkpVJC0FTikL9 ztOA==
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=LDKUvZMYhBsTsD63gIzoYsKGR05L/iKvybaMWtm1isY=; b=baGXoPArgn+a2LfwKwSCbDcOBGIy5W26ZgpPTT7kIoxlf3B/nQUsSAD6mvV6KnplC5 EruUhh12olbPWTMWvYGek5KHpDe1w3pXzgV54b9F1D2HvlV7sDF0CIRCyQeqAxIiI3y9 fTW4s23fwPEN3niUgDu9Gb0V/XqWQxKqk9AKQE0BrmLKMfSoQ39N2iUssWtGbfRIUdtP bDuEA4UNfR6nX8AvEHF3dYsztE4pC1ggZdQ+nZIGjHmhmDsj8OzrCyDTeZFXPy2reeHb ZcGgtDehb2GJO6V+ipHpv2HhstBu75UvIdWBov8p4WsjSWF8mTry7ulZq0WQFoHrjM+f c3lg==
X-Gm-Message-State: AA6/9RmBafYFihabLSmLc+vBA+62G58nlIWkx4tcaOvhV+WJfl50Tz7kFMnqrnaiXWpmsIhsg3vnh7nx10pwCA==
X-Received: by 10.36.184.65 with SMTP id m62mr6815754ite.55.1474679853511; Fri, 23 Sep 2016 18:17:33 -0700 (PDT)
MIME-Version: 1.0
References: <20160904105637.sjl4wmr2hc2mito6@LK-Perkele-V2.elisa-laajakaista.fi> <CAF8qwaApcZBC0K8m27CtYbUd3zb5HvVQbDxpN0kkY0c=Pj4Rcw@mail.gmail.com> <CAF8qwaDVGrnzeLQD1ika0=VZbD8gJpigcRv_qgiAYdHV_iS2jA@mail.gmail.com> <CY1PR0301MB08421CDD92828E5809E40E8C8CE60@CY1PR0301MB0842.namprd03.prod.outlook.com> <CAF8qwaDj5fP_zgFruu-Q+3+Hv-=6fkJbY_k4+b9-9PcHSidqfg@mail.gmail.com> <1473171296219.4329@cs.auckland.ac.nz> <3365c59b-34ee-9f1c-d7f6-156d4715b967@gmail.com> <CY1PR0301MB0842FA7EE55237108A70B0D48CF90@CY1PR0301MB0842.namprd03.prod.outlook.com> <CAF8qwaB0Bh5xEStP6TocU__UJip26GmmMqfr8Zm5aoOGHUYp4w@mail.gmail.com> <CAOjisRw7fV3D7719YhvGxa9e_gZYMrFG+c9VMpY_kqL2i2OFTQ@mail.gmail.com> <CAF8qwaB27ke0pHAQJfx7iQOA8+GB3hJEmkF2UtirFte9OcdJAw@mail.gmail.com>
In-Reply-To: <CAF8qwaB27ke0pHAQJfx7iQOA8+GB3hJEmkF2UtirFte9OcdJAw@mail.gmail.com>
From: Nick Sullivan <nicholas.sullivan@gmail.com>
Date: Sat, 24 Sep 2016 01:17:22 +0000
Message-ID: <CAOjisRyLS+HyCXx8G-dXwqRXRUNb3=VU=izU4xXrrgY+HweFDw@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>, Andrei Popov <Andrei.Popov@microsoft.com>, Anders Rundgren <anders.rundgren.net@gmail.com>, Peter Gutmann <pgut001@cs.auckland.ac.nz>, Ilari Liusvaara <ilariliusvaara@welho.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c0481bed39ad2053d36a88d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/05L4XH_hgThbSaFef8Fvodn-6_0>
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: Sat, 24 Sep 2016 01:17:37 -0000

Signature algorithm support is typically per-connection, not per
certificate request. If you're doing multiple post-handshake
authentications then (2) reduces the amount of redundant data sent on
subsequent authentications. Furthermore, it opens the door for unsolicited
post-handshake authentication in future extensions to the protocol.

Clients only need to stash a copy of it if they support client
authentication, which in my opinion should be optional. Perhaps support for
post-handshake authentication should be signaled with an extension. That
way the server SignatureSchemes could be carried in that extension, rather
than overloading the "signature_algorithms" extension.




On Fri, Sep 23, 2016 at 5:56 PM David Benjamin <davidben@chromium.org>
wrote:

> (1) seems reasonable. I don't have strong views there. I even jokingly
> suggested it in the PR description.
>
> I do not like (2). This requires implementations stash a copy of the
> signature algorithms without known a priori whether it will be used or not.
> And it means when receiving a CertificateRequest, you have to go check that
> the extension was provided at all. I think that should stay bound to the
> CertificateRequest and as a required field.
>
> On Fri, Sep 23, 2016 at 8:35 PM Nick Sullivan <nicholas.sullivan@gmail.com>
> wrote:
>
>> David,
>>
>> If we're changing this structure of CertificateRequest, I have two
>> suggestions.
>>
>> 1) Move DistinguishedName out of the structure and define it as a
>> TLS-style extension. It's not a required field.
>> 2) Remove SignatureScheme from structure, and instead change the behavior
>> of the the "signature_algorithms" extension to include all server-supported
>> SignatureSchemes in the ServerHello in descending order of preference.
>>
>> This will result in a much more compact message structure that can easily
>> be re-purposed for post-handshake server auth and other optional extensions
>> to TLS 1.3:
>>
>>      struct {
>>          opaque certificate_request_context<1..2^8-1>;
>>          CertificateRequestExtension certificate_extensions<0..2^16-1>;
>>      } CertificateRequest;
>>
>>
>> Nick
>>
>>
>> On Thu, Sep 22, 2016 at 6:26 PM David Benjamin <davidben@chromium.org>
>> wrote:
>>
>>> On Tue, Sep 6, 2016 at 1:03 PM Andrei Popov <Andrei.Popov@microsoft.com>
>>> wrote:
>>>
>>>> > But it's OID-specific how the matching works, isn't it?
>>>> Correct, and initially we define matching for KU and EKU. These are the
>>>> OIDs I've got the most customer requests for. I expect that we will want to
>>>> define matching rules for other OIDs over time, in separate specs. This new
>>>> proposal allows multiple sets of matching rules for each OID, which
>>>> certainly increases flexibility.
>>>>
>>>> David, do you care enough to write your proposal down as a PR, so that
>>>> we can discuss the specifics?
>>>>
>>>
>>> Apologies for the delay. Been a busy few weeks. This is roughly what I
>>> was thinking:
>>> https://github.com/tlswg/tls13-spec/pull/656
>>>
>>> What do you think?
>>>
>>> Again, I don't actually care about this, so if you and others who would
>>> use this mechanism prefer it as it is, I have no qualms. This is a "pull
>>> suggestion", not a "pull request". :-)
>>>
>>> David
>>>
>>>
>>>> Thanks,
>>>>
>>>> Andrei
>>>>
>>>> -----Original Message-----
>>>> From: Anders Rundgren [mailto:anders.rundgren.net@gmail.com]
>>>> Sent: Tuesday, September 6, 2016 8:36 AM
>>>> To: Peter Gutmann <pgut001@cs.auckland.ac.nz>; David Benjamin <
>>>> davidben@chromium.org>; Andrei Popov <Andrei.Popov@microsoft.com>;
>>>> Ilari Liusvaara <ilariliusvaara@welho.com>; tls@ietf.org
>>>> Subject: Re: [TLS] CertficateRequest extension encoding
>>>>
>>>> On 2016-09-06 16:15, Peter Gutmann wrote:
>>>> > David Benjamin <davidben@chromium.org> writes:
>>>> >
>>>> >> Either way I imagine our stack will just keep on ignoring it, so I
>>>> >> don't feel about this all too strongly. But the topic came up so I
>>>> >> thought I'd suggest this.
>>>> >
>>>> > I ignore it too.  Client certs are so rare, and so painful to deploy,
>>>> > that I'm not going to make things harder on users by adding complex
>>>> > and opaque filtering to prevent them from working.  My approach is to
>>>> > specify as few constraints as possible, the client submits whatever
>>>> > certificate it has, and it's then decided based on a whitelist for
>>>> > which the server can very clearly report "not on the whitelist" when
>>>> > it rejects it.  The design seems to be based on the idea that each
>>>> > client has a smorgasbord of certs and the server can specify in
>>>> > precise detail in advance which one it wants, when in reality each
>>>> > client has approximately zero certs, and the few that do have one
>>>> just want the one they've got to work.
>>>>
>>>> May I add some nuances here?
>>>>
>>>> Client-certificates are *extensively* used for secure box-to-box
>>>> communication.
>>>> Existing selection methods suffice (there's usually none on the client
>>>> side).
>>>>
>>>> Client-certificates for user authentication on the Web through HTTPS is
>>>> a small and diminishing activity. The decision by the browser vendors
>>>> dropping support for on-line enrollment is likely to further limit this use
>>>> case which make improvements in selection/filtering pretty uninteresting.
>>>>
>>>> Client-certificates for user authentication on the Web through through
>>>> proprietary ("FIDO like") application level protocols is fairly big.  Half
>>>> of the Swedish population use such a scheme for e-government and bank
>>>> access.  It uses an ugly (and non-secure) OOB-method to make it "Web
>>>> compatible".  This use-case is (of course) not of an issue for the TLS WG
>>>> but may be of some interest for people currently using client certificates
>>>> for Web authentication.
>>>>
>>>> Anders
>>>>
>>>>
>>>> >
>>>> > Peter.
>>>> > _______________________________________________
>>>> > TLS mailing list
>>>> > TLS@ietf.org
>>>> > https://www.ietf.org/mailman/listinfo/tls
>>>> >
>>>>
>>>> _______________________________________________
>>> TLS mailing list
>>> TLS@ietf.org
>>> https://www.ietf.org/mailman/listinfo/tls
>>>
>>