Re: [COSE] [Ace] draft-raza-ace-cbor-certificates-04.txt

Göran Selander <goran.selander@ericsson.com> Mon, 04 May 2020 07:42 UTC

Return-Path: <goran.selander@ericsson.com>
X-Original-To: cose@ietfa.amsl.com
Delivered-To: cose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 049803A0D2B; Mon, 4 May 2020 00:42:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 fwTuqZqqjzLf; Mon, 4 May 2020 00:42:46 -0700 (PDT)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2079.outbound.protection.outlook.com [40.107.21.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 232363A0D28; Mon, 4 May 2020 00:42:45 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GZ76euCQjoFKWuaNGmyhVjMS4VVjTNviEG2bFUX0N18/l1QLBwc+eqDKAduMZl3I6U3UsDKujLtkUaL2jOu4AMNFLo4WWaQYBlI5AF/68/KXO81ZEtaONPaGkiDU2sxiQiP5tCxypeB6kuO2tXgFm9Klj3bB3FOROY/xRtDN/CS9Eu2l+k7HXPTU6O/jb9P4EgMMEcwo7Cg74hO906MJLWT3EiBWDW3cAlDlF6clHQixNIgYLeE7AO+8PjU7k9lqvvq1cpLXSQG0EQ1H4RcYBVXcdRERY8gLlyuZJC6iseAp2e7rlmJvqxOnyYjI5R0Ct0sl9lWZalt6syIlebhXWQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5lTkkMs9964C0qrIjdMKZ/WCZWCGA9ZuGV92NMrUbcc=; b=b6b/etdva4YmSjxZRKnA9u1TrtstB095tXHZ7bqTdXw3MyKF0DJ9UM5dEeTMYH3tnAmxVSQkA+OwLrTfiJGd7KesktbObqC7VIfKgMbP3h9rilDCHN7MaUn3Ej3TUfm0QAsfT036/TGSed8sQxF4WPzhh5IKF0GyCyYjDwn84olqga5p2KYLdQ67CkNE9zl6EVkwwAnKCnq4A7y8IB+aglaZuIVHVP1W808+TsgbA2K0qMH00a3OYUHQoLKcFg5K+VsyPtJY7QwIwZjk+RB4zh7Bps8QMZt7bmRzuielJI1v8g8/l9dt7zmYrofRsaNx5/7ammH3GzYbN6kBs/iALQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5lTkkMs9964C0qrIjdMKZ/WCZWCGA9ZuGV92NMrUbcc=; b=QSj3AHAWkso0qTrcn25J4qzHl7DUekb2nxICRDg0abZ3ssA6Nee8Av+cG38CRWZF6m4AFd43ipRm9u3Gkn2A9ZyOxiTfXBbK0v+j3xjxXSY/SSkFKPUGxw+lLl/8LfrZ4Aca+XRsKYpiaczZZP1phSEd5+26fKb1vflVP0fzA70=
Received: from AM7PR07MB6945.eurprd07.prod.outlook.com (2603:10a6:20b:1bf::11) by AM7PR07MB6945.eurprd07.prod.outlook.com (2603:10a6:20b:1bf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.18; Mon, 4 May 2020 07:42:42 +0000
Received: from AM7PR07MB6945.eurprd07.prod.outlook.com ([fe80::55ba:3006:67fc:f931]) by AM7PR07MB6945.eurprd07.prod.outlook.com ([fe80::55ba:3006:67fc:f931%7]) with mapi id 15.20.2979.024; Mon, 4 May 2020 07:42:42 +0000
From: Göran Selander <goran.selander@ericsson.com>
To: Laurence Lundblade <lgl@island-resort.com>, "cose@ietf.org" <cose@ietf.org>, "ace@ietf.org" <ace@ietf.org>, "ace-chairs@ietf.org" <ace-chairs@ietf.org>, "cose-chairs@ietf.org" <cose-chairs@ietf.org>, Benjamin Kaduk <kaduk@mit.edu>
CC: Joel Höglund <joel.hoglund@gmail.com>
Thread-Topic: [Ace] [COSE] draft-raza-ace-cbor-certificates-04.txt
Thread-Index: AQHWHL9/AQkz8jksrU+IVD0bq1nzAqiOdicAgAN8fICABcSUAA==
Date: Mon, 04 May 2020 07:42:42 +0000
Message-ID: <CE4654CA-93F0-46F7-9768-C3F67166A3FF@ericsson.com>
References: <CAHszGE+s0gBKNmDky4NZLP3SO-BqosQ2FvA7HeZprv3jWFFL7g@mail.gmail.com> <CAHszGEJ94aF9XA_4q-DnKzUNAtJo059zXMFcunOv8f-SG2hyvw@mail.gmail.com> <8B4A9572-3770-416E-B937-1902AFC07DA7@island-resort.com> <964634A4-7B61-4CEF-8ED0-6A9A48D984CD@ericsson.com> <AE7B76F5-12A0-4F65-BD6E-B0428B2AFA40@island-resort.com> <3BB4FFA8-AABD-4520-9B21-1F0B0CAFB08C@ericsson.com> <E384CA36-6D92-4CA9-8CEA-7810ECEF8900@island-resort.com>
In-Reply-To: <E384CA36-6D92-4CA9-8CEA-7810ECEF8900@island-resort.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.36.20041300
authentication-results: island-resort.com; dkim=none (message not signed) header.d=none;island-resort.com; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [192.176.1.85]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 1c58777e-8b71-4e00-888e-08d7effebaad
x-ms-traffictypediagnostic: AM7PR07MB6945:
x-microsoft-antispam-prvs: <AM7PR07MB69456D186B97B27B49632AE2F4A60@AM7PR07MB6945.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-forefront-prvs: 03932714EB
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: xVjQRVJwjWPwgvULWEiuH+XtKUy/iw1+xjpAMM70xhGjLmTn8vGK7fVamrxDfJ3UQATSHCaeW+jvUZDSXrjS5QqWMNWBItwVBK3sgK4vtlv/pgiMHpDzlskNBCqUw7L2r3rc9x9XQPlkK0v5ZywBIpTACh5D3zsl+D88qBIxEl4l+Qz7E3wiw9nm+LjcgzKnr2X/zJJOySuRZJKJc/C/Vm7FDZAs7uCrp2J3dDHbhnlV6naPxx58fVKjSYsz90yJ1w/+NKnVmchK5hMA8x3oySYvSelAsTfjtPsR08EGwAthjEyxBcsBNmHIjI6M1LAJ9dHF0KMJKE0CTZExuYKlxB8oqQUZ6wt7ABsvUM7MtBe2747+tWtacay774OB+SkklWs3eb+qoW3pr7ToidqaDxpcFirhu9FHCNAgaiogVUGqnYJCpAplh31TYFOCzl3mKtWoZ668BZ0b3bRDK2RwslhM+UZiUykBG5C0g8p5RlVa7Bzeb8mYHhurh43rd3SinTa6SgqJqphqYsavHKJfEw==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR07MB6945.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(376002)(39860400002)(396003)(136003)(366004)(85182001)(36756003)(2906002)(186003)(85202003)(71200400001)(6486002)(53546011)(8936002)(8676002)(26005)(6506007)(316002)(110136005)(4326008)(6512007)(66946007)(966005)(478600001)(66574012)(33656002)(66556008)(66476007)(76116006)(5660300002)(66446008)(64756008)(86362001)(2616005); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: fzL3WARG+P3TJyofjCHtIk73LxdZRZ4CsXcd75k19MzdOpqYDazwP1Mn6C0WOlBBkUgSxVFkcvzfrGAIJYJLW8zZe/clGWNJaxYE4uZpQO+4f/LsKUC3sUSdYAyqgNas+niugEui95pYae3urbh4DhEamKzmULoBdJUNMJZrBPGYL6Kb27qd1zquf1jwfymHr8NG+lILVvyzmqXIycE9bumeadBo58bnQfgWBqPvn9TULjwLYBEVF1S0LC/fMHXHIB+Lacm+8PSuY5CAUVg9/RTDdNBTtkDVDSVdjSb/lZUVn5Usw+K9ZVSGRjKs896agJ29oRKXzYf4OPkPY/R+U/iYDyHv/K7f3zkowAl8X2f0vQHmhFEtC3rNPviPZ9nMFBFx5OBwPnu0/S/p2ScisU7lu+4XCoK14oqIpPrIUAkPkM/+aj8Cu0qeC5O0ILIuoEkz/TxRXQpXUt7uM2Qfel7ZheHobMCZtjPiid28NU7Ic65tjBL8s/hS/u0YEnhaf30HSVZErfv5aSWxUf7zXVQ6D/g2A9g+MirXLzGKx1GlPYdfk+H50bjz6jp61WBf0F++/J9WVbloynwzfYPuDXl0grEoKJ3+XRbljZ1TrlQiUTuAo02v3aZNHpS1yyblnmoV6jQUyvyj87UF7reovjaIPzMcNglAmL5Fjuu1fJbkByP51FAVjloQqYT4RDzYNMFAhqwaeGT2Z98/pHJtYSx8I0T6P47dWQOWoetPvr2MITs8dMrwwUxcctajx0kbT/q1dghbN+2Qhz8b93/C8URyIY3h3FDYf+ODElEHXGM=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_CE4654CA93F046F79768C3F67166A3FFericssoncom_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 1c58777e-8b71-4e00-888e-08d7effebaad
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2020 07:42:42.8204 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ovmrP30zwHWf9SWLqiDLkZVTBvHlwUem9z5Cefw/270aw9Kkt1lOm4twhftHoHxdoPR2Pbz94pb95gzA+7ec2dmtVvwchhP8BbEa6er95MQ=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR07MB6945
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/BIR1kVdKhhFUaHAHxAe9kNV2n7w>
Subject: Re: [COSE] [Ace] draft-raza-ace-cbor-certificates-04.txt
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cose>, <mailto:cose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose/>
List-Post: <mailto:cose@ietf.org>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cose>, <mailto:cose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 04 May 2020 07:42:49 -0000

Hi Laurence, and all,

Thanks for providing a taxonomy. As mentioned, type 0 is clearly in the current draft COSE charter, and we see also the need for a representation of the X.509 profile in RFC 7925 which relieves constrained devices from implementing DER/ASN.1 encoding as well as re-encoding/decompressing in order to verify. Whether this is type 1 as proposed in the draft, or type 2 as you propose, is open for discussion. I believe I speak on behalf of the authors here.

A question for the chairs and AD: Is it/can it be in the scope of COSE or ACE to define type 1/2? Or do you need more show of interest from the community to see if this is worth pursuing at all?

Göran



From: Laurence Lundblade <lgl@island-resort.com>
Date: Thursday, 30 April 2020 at 19:38
To: Göran Selander <goran.selander@ericsson.com>
Cc: Göran Selander <goran.selander=40ericsson.com@dmarc.ietf.org>, Joel Höglund <joel.hoglund@gmail.com>, "cose@ietf.org" <cose@ietf.org>, "ace@ietf.org" <ace@ietf.org>
Subject: Re: [Ace] [COSE] draft-raza-ace-cbor-certificates-04.txt

Hi Göran,

I understand your two types of native CBOR certs, and raise you by one. I’ve assumed COSE because it seems a clear choice to me (no size issue, code re use).

0) Compressed/re-encoded
- Uses CBOR Sequence that exactly mirrors X.509 from Raza draft
- Reduces size of cert, but increased code complexity; both CBOR and DER encoding / decoding needed
- Can transform to/from X.509 mechanically without the private key

1) COSE + Mirroring with CBOR Sequence from Raza draft
- Uses the CBOR sequence that exactly mirrors X.509
- Reduces size of cert and lowers code complexity; no DER encoding / decoding
- Must have private key to generate; must be generated by the CA

2) COSE + Mirroring with CWT Claims
- A set of CWT claims are defined that exactly mirror X.509 fields
- Reduces size of cert and lowers code complexity; no DER encoding / decoding; can re use some CWT code
- Must have private key to generate; must be generated by the CA

3) COSE + Improved CWT Claims
- A set of CWT claims that don’t necessarily mirror X.509 exactly, but give similar semantics
- Reduces size of cert and lowers code complexity; no DER encoding / decoding; can re use some CWT code
- Must have private key to generate; must be generated by the CA

I was definitely talking about 3) in my last email. It is clearly not in the charter.

So maybe the debate is between 1) and 2). Both are in the charter. Some advantages of 2) are:
- Can re use some of the CWT code
- Can move to 3) incrementally when the time comes
- Can drop fields that are not used possibly giving the smallest cert size on the wire of any of the options

LL




On Apr 28, 2020, at 3:23 AM, Göran Selander <goran.selander@ericsson.com<mailto:goran.selander@ericsson.com>> wrote:

Hi Laurence,

Thanks for sharing your thoughts. It seems we are working on slightly different paths.

The part you called “Compressed Certs” is already in the draft COSE charter where it is referred to as “A CBOR encoding of the compressed certificate profile defined in RFC 7925” so we can leave that out for now.

My comment was about the other part, what we both call “native CBOR certificates” but mean different things. What is called native in
draft-raza-ace-cbor-certificates is not intended as a certificate format breaking with X.509. While there are many potential improvements to make on X.509, there is a resistance against new certificate architectures as was clear when this was brought up in Secdispatch at IETF 104 a year ago. As mentioned previously, what we mean by “native CBOR” is the lossless compression of the certificate profile of X.509 into a CBOR encoded format, but signing over the CBOR instead of on the uncompressed data. In this way it is possible to define a bijection between native CBOR certificates and profiled X.509 certificates – the payload of the compressed version of the latter would be identical to the former. So the native CBOR certificates are a faithful representation of these profiled X.509 certificates, using the same payload as in the CBOR compression scheme.

In contrast to the compression scheme, a conversion between native CBOR and X.509 representations requires access to the private signature key.
Therefore a mix of X.509 and native CBOR would require multiple handlers at the backend (parsing the payload would be the same). Dedicated deployments could of course use native CBOR certificates exclusively.

In the same way it would be possible to instead define a COSE_Sign1 and/or a CWT representing these profiled X.509 certificates, this is what I thought you were asking about but apparently not. That would be an alternative as long as we can decide on exactly one of these representations.

There are a lot of fun things to do in this space, my concern is how to get out a standard. Trying to replace X.509 doesn’t seem like a promising way forward I’m afraid . . .

Göran


From: Ace <ace-bounces@ietf.org<mailto:ace-bounces@ietf.org>> on behalf of Laurence Lundblade <lgl@island-resort.com<mailto:lgl@island-resort.com>>
Date: Monday, 27 April 2020 at 20:13
To: Göran Selander <goran.selander=40ericsson.com@dmarc.ietf.org<mailto:goran.selander=40ericsson.com@dmarc.ietf.org>>
Cc: Joel Höglund <joel.hoglund@gmail.com<mailto:joel.hoglund@gmail.com>>, "cose@ietf.org<mailto:cose@ietf.org>" <cose@ietf.org<mailto:cose@ietf.org>>, "ace@ietf.org<mailto:ace@ietf.org>" <ace@ietf.org<mailto:ace@ietf.org>>
Subject: Re: [Ace] [COSE] draft-raza-ace-cbor-certificates-04.txt


On Apr 27, 2020, at 5:00 AM, Göran Selander <goran.selander=40ericsson.com@dmarc.ietf.org<mailto:goran.selander=40ericsson.com@dmarc.ietf.org>> wrote:

[GS] The rationale for native CBOR certificates is to reuse the same encoding as in the compression scheme defined for RFC 7925, but signing the CBOR instead of signing the uncompressed data. This provides a roadmap with minimal changes when moving from compressed to native CBOR certificates.

I agree with you that the overhead of COSE_Sign1 or CWT is not major and these points are open for discussion. The more important question is where this should be standardized. The compression scheme is now included in the new draft charter for COSE:
https://github.com/cose-wg/Charter/blob/master/Charter.md<https://protect2.fireeye.com/v1/url?k=dd127709-819bd8c0-dd123792-0cc47ad93e1c-5b6bae84abc5c4a0&q=1&e=5bb412fa-ec1d-44a0-8dba-c66844d1b797&u=https%3A%2F%2Fgithub.com%2Fcose-wg%2FCharter%2Fblob%2Fmaster%2FCharter.md>
The charter is currently not explicitly supporting native CBOR certificates. If you think it should, in some variant, then this is a good time to raise your voice.

To go straight to the issue, I think a designing a native CBOR cert should be approached differently than compressing / re-encoding an X.509 cert:

Re-encoding
- Size is important
- Exact compatibility is required
- Near zero change to fields and semantics

Native CBOR Cert
- Clean up some of the mess in X.509; it is an old standard with a lot of cruft and baggage
- Re design extensions so they are in CBOR format
- Make many of the fields optional, for example not before can often be left off, maybe even serial number
- Avoid DN structure for issuer and subject for most use cases
- Use modern formats like COSE and CWT and COSE_Key
- Size is important, but far from the only goal (some size reductions, like optional fields will be possible here that are not possible with re-encoding)
- Compatibility matters, but not in the same way

Seems like the right thing to do here is to remove native CBOR certs from this document and just focus on compression and re-encoding. Maybe even call them “Compressed Certs” rather than “CBOR Certs”.. Where that work should go is above my pay grade.


BUT, my main interest here relates to CWT and EAT. CWT seems like a really good choice on which to base a native CBOR cert. Some of the fields for an X.509 cert are already defined in CWT (subject, issuer, expiration, not-before). It has an extension mechanism built in already in the CWT IANA registry. The crypto and signing are well-handled by CWT’s use of COSE.

In work to fit EAT<https://tools.ietf.org/html/draft-ietf-rats-eat-03> in as a CWT, a few issues have come up — how fields / claims are managed and registered with IANA, label spaces and other.  All these issues would apply to CWT/COSE/CBOR-based certificate as well.

To name just one issue, in CWT the expiration date/time can be a floating-point number, which is burdensome, not useful. Should we change CWT to disallow or should it just be disallowed when a CWT is used as an EAT and when it is used as a Cert?

I’m also excited at the idea of re using CWT in a simple form so there is re use of code between CWT, EAT and native CBOR certs. I’ve started playing with an implementation like this.

LL