Re: [COSE] Newly Submitted Draft - CBOR Web Token (CWT) Claims in COSE Headers

Laurence Lundblade <lgl@island-resort.com> Sun, 13 March 2022 22:20 UTC

Return-Path: <lgl@island-resort.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 C60A43A17B5 for <cose@ietfa.amsl.com>; Sun, 13 Mar 2022 15:20:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.611
X-Spam-Level:
X-Spam-Status: No, score=0.611 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, T_REMOTE_IMAGE=0.01, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URI_GOOGLE_PROXY=2.497] autolearn=no autolearn_force=no
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 OKQZw9YV8i4R for <cose@ietfa.amsl.com>; Sun, 13 Mar 2022 15:20:41 -0700 (PDT)
Received: from p3plsmtpa09-07.prod.phx3.secureserver.net (p3plsmtpa09-07.prod.phx3.secureserver.net [173.201.193.236]) (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 249DC3A17B1 for <cose@ietf.org>; Sun, 13 Mar 2022 15:20:40 -0700 (PDT)
Received: from [192.168.1.9] ([136.26.88.187]) by :SMTPAUTH: with ESMTPSA id TWZqnwo9itOvYTWZqnFJfg; Sun, 13 Mar 2022 15:20:39 -0700
X-CMAE-Analysis: v=2.4 cv=XdVMcK15 c=1 sm=1 tr=0 ts=622e6e37 a=7fp6wWq/uMLc68VYipFVkA==:117 a=7fp6wWq/uMLc68VYipFVkA==:17 a=UqCG9HQmAAAA:8 a=62ntRvTiAAAA:8 a=7CQSdrXTAAAA:8 a=yMhMjlubAAAA:8 a=pGLkceISAAAA:8 a=K6EGIJCdAAAA:8 a=48vgC7mUAAAA:8 a=A1X0JdhQAAAA:8 a=rzPLFkrTAAAA:8 a=jU4qhlNgAAAA:8 a=JqEG_dyiAAAA:8 a=NEAV23lmAAAA:8 a=h9p3ya_0ml8uZE1PazoA:9 a=QEXdDO2ut3YA:10 a=gcqIs3NtAAAA:20 a=rcABmfARAAAA:20 a=XCstEpA3AAAA:20 a=BUdZDkeYAAAA:20 a=PQt0tNhYAAAA:20 a=AdpSpb9xiwXZOKc7oUsA:9 a=ihXlyv_3NNOul9Na:21 a=_W_S_7VecoQA:10 a=pToNdpNmrtiFLRE6bQ9Z:22 a=a-qgeE7W1pNrGK8U0ZQC:22 a=L6pVIi0Kn1GYQfi8-iRI:22 a=w1C3t2QeGrPiZgrLijVG:22 a=Df3jFdWbhGDLdZNm0fyq:22 a=quyEJQOAdP_p053hOoeg:22
X-SECURESERVER-ACCT: lgl@island-resort.com
From: Laurence Lundblade <lgl@island-resort.com>
Message-Id: <B3C94C56-2724-4816-BABC-24BB0D0126FA@island-resort.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_11F73DC2-9F13-4662-8D13-E06945B08EDF"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\))
Date: Sun, 13 Mar 2022 15:20:38 -0700
In-Reply-To: <SY4P282MB1274539D0B684903BFF30F159D0E9@SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM>
Cc: Hannes Tschofenig <Hannes.Tschofenig@arm.com>, Mike Jones <Michael.Jones@microsoft.com>, Anders Rundgren <anders.rundgren.net@gmail.com>, "cose@ietf.org" <cose@ietf.org>
To: Tobias Looker <tobias.looker@mattr.global>
References: <SY4P282MB1274BCAC469DFE3B7284DFB29D039@SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM> <DBBPR08MB5915A5EE40B555A4953E7BA0FA039@DBBPR08MB5915.eurprd08.prod.outlook.com> <SJ0PR00MB10050EBE6EAB4E80584A31B9F5039@SJ0PR00MB1005.namprd00.prod.outlook.com> <280EEA8E-67E4-4E7A-94A6-8C0A60048F81@island-resort.com> <36e34eb7-ee20-3644-4383-1c3f72279fc3@gmail.com> <DBBPR08MB59154C935195F0ADEFD0EC4BFA049@DBBPR08MB5915.eurprd08.prod.outlook.com> <SJ0PR00MB10051A6A8F8D3C9F87896899F5049@SJ0PR00MB1005.namprd00.prod.outlook.com> <AS8PR08MB591101F54BE439EB52F48449FA0C9@AS8PR08MB5911.eurprd08.prod.outlook.com> <SY4P282MB1274539D0B684903BFF30F159D0E9@SY4P282MB1274.AUSP282.PROD.OUTLOOK.COM>
X-Mailer: Apple Mail (2.3608.120.23.2.1)
X-CMAE-Envelope: MS4xfJ1jW6VMEj4M3D0Ot46JugPem5+YP+xpbnBwtOndBH4w+xtXw/jtjPknU0PruNNqBA4FhQkRMzA0QcUFdyfMzROUr03k7XfEB08VolQlyaesIMPrq4JT owzmg/4AaCTTmdna2raWolTwTk1MIGGpCPpKiuyEB4h07dKcIJevnABOrQ638VXhg6nUFlV9R3Uv4ccc95ptAw1WmB+iNLruS7a+NVy5AduUVtOFZ2HIyWdF WVhiQh74bKUFNGCJZiVA/IVqNQPTeeHYBu+0XvYVf5PKfuO4EjcbYF+DUgUkeUEYZDAfr+pjQ+wuYYuYQigIJKZlCYvq+n28hZDkeYf85S1ezrIMUTiNZxV1 VWG1Msrv
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/dqNTYJ4dWdTMXwU4520Qrbys7kk>
Subject: Re: [COSE] Newly Submitted Draft - CBOR Web Token (CWT) Claims in COSE Headers
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: Sun, 13 Mar 2022 22:20:46 -0000

For EAT, putting the profile claim in a header could be really useful, especially if the EAT is encrypted.

The profile claim tells you the something about the format and type of the EAT, maybe even which processor to hand it off too. It’s nice to be able to do the hand off without having to decrypt and verify. 

The intended use claim is another good candidate for this header.

I like the addition a lot.

LL



> On Mar 13, 2022, at 1:47 PM, Tobias Looker <tobias.looker@mattr.global> wrote:
> 
> Hi Hannes,
> 
> I can elaborate.
> 
> Encrypted CWTs - In some circumstances CWT claims can be useful to have available for processing prior to decryption. For example the iss claim can be used to indicate to a recipient of an encrypted CWT how it should be decrypted, by informing the recipient who encrypted (and potentially signed) it.
> 
> Detached Signature - In cases where a detached signature COSE structure is being used the payload can be un-available (or of invalid form) to express CWT claims. A concrete example is being able to express who signed the detached signature structure (using the iss claim) and when it expires (using the exp claim).
> 
> Thanks,
>  <https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiW1WeN4boYw%26u%3Dhttps%253a%252f%252fmattr.global%252f&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076709977%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tKqCMzLUQNCeORd908YqfqZoT7tCy%2FMVwXdjpch1sDY%3D&reserved=0>	
>  
> Tobias Looker
> MATTR
> CTO
> +64 (0) 27 378 0461
> tobias.looker@mattr.global <mailto:tobias.looker@mattr.global>
>  <https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiW1WeN4boYw%26u%3Dhttps%253a%252f%252fmattr.global%252f&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076709977%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tKqCMzLUQNCeORd908YqfqZoT7tCy%2FMVwXdjpch1sDY%3D&reserved=0>	
>  <https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiW1SbN9fvNg%26u%3Dhttps%253a%252f%252fwww.linkedin.com%252fcompany%252fmattrglobal&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076719975%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=t%2BidOI32oaKuTJf1AkcG%2B%2FirIJwbrgzXVZnjOAC52Hs%3D&reserved=0>	
>  <https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiW1WdMte6ZA%26u%3Dhttps%253a%252f%252ftwitter.com%252fmattrglobal&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076729970%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BD9WWyXEjVGlbpbCja93yW%2FzLJZpe%2Ff8lGooe8V6i7w%3D&reserved=0>	
>  <https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fscanmail.trustwave.com%2F%3Fc%3D15517%26d%3Dw46s4eMXULV_ns1ZfAKYLbVKcqey_PHiWwGdMoDtMw%26u%3Dhttps%253a%252f%252fgithub.com%252fmattrglobal&data=04%7C01%7CSteve.Lowes%40mbie.govt.nz%7C5a65fe33c70b41fd8ba908d976f3a2f1%7C78b2bd11e42b47eab0112e04c3af5ec1%7C0%7C0%7C637671611076729970%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4AhRuXZCnU5i3hcngo4H3UiNayYUtXpRcImV4slS1mw%3D&reserved=0>
> 
> This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it. Thank you. Please note that this communication does not designate an information system for the purposes of the Electronic Transactions Act 2002.
> 
> From: Hannes Tschofenig <Hannes.Tschofenig@arm.com <mailto:Hannes.Tschofenig@arm.com>>
> Sent: 12 March 2022 01:45
> To: Mike Jones <Michael.Jones@microsoft.com <mailto:Michael.Jones@microsoft.com>>; Anders Rundgren <anders.rundgren.net@gmail.com <mailto:anders.rundgren.net@gmail.com>>; Laurence Lundblade <lgl@island-resort.com <mailto:lgl@island-resort.com>>
> Cc: Tobias Looker <tobias.looker@mattr.global <mailto:tobias.looker@mattr.global>>; cose@ietf.org <mailto:cose@ietf.org> <cose@ietf.org <mailto:cose@ietf.org>>
> Subject: RE: [COSE] Newly Submitted Draft - CBOR Web Token (CWT) Claims in COSE Headers
>  
> EXTERNAL EMAIL: This email originated outside of our organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.
> 
> Hi Mike, 
>  
> maybe you can give examples of where this feature is used in JWTs, which would explain why you want to have it in CWTs as well.
>  
> Ciao
> Hannes
>  
> From: Mike Jones <Michael.Jones@microsoft.com> 
> Sent: Thursday, March 3, 2022 6:02 PM
> To: Hannes Tschofenig <Hannes.Tschofenig@arm.com>om>; Anders Rundgren <anders.rundgren.net@gmail.com>om>; Laurence Lundblade <lgl@island-resort.com>
> Cc: Tobias Looker <tobias.looker@mattr.global>al>; cose@ietf.org
> Subject: RE: [COSE] Newly Submitted Draft - CBOR Web Token (CWT) Claims in COSE Headers
>  
> We are *definitely* not attempting to change anything about COSE message processing, including how encryption is done.  We are defining an additional header parameter that can be used – that’s it.
>  
>                                                        -- Mike
>  
> From: Hannes Tschofenig <Hannes.Tschofenig@arm.com <mailto:Hannes.Tschofenig@arm.com>> 
> Sent: Thursday, March 3, 2022 1:45 AM
> To: Anders Rundgren <anders.rundgren.net@gmail.com <mailto:anders.rundgren.net@gmail.com>>; Laurence Lundblade <lgl@island-resort.com <mailto:lgl@island-resort.com>>; Mike Jones <Michael.Jones@microsoft.com <mailto:Michael.Jones@microsoft.com>>
> Cc: Tobias Looker <tobias.looker@mattr.global <mailto:tobias.looker@mattr.global>>; cose@ietf.org <mailto:cose@ietf.org>
> Subject: RE: [COSE] Newly Submitted Draft - CBOR Web Token (CWT) Claims in COSE Headers
>  
> Hi Anders, 
>  
> Thanks for jumping in. 
>  
> The example you provide below is actually quite interesting and related to a question I posted to the list a few days ago (seehttps://mailarchive.ietf.org/arch/msg/cose/9nowDz5kbfUvrGR-o6U1Tm31XAA/ <https://mailarchive.ietf.org/arch/msg/cose/9nowDz5kbfUvrGR-o6U1Tm31XAA/>).
>  
> I am not sure whether the intention of Tobias & Mike are actually to re-define the way how encryption is accomplished. They should confirm.
>  
> Ciao
> Hannes
>  
> From: Anders Rundgren <anders.rundgren.net@gmail.com <mailto:anders.rundgren.net@gmail.com>> 
> Sent: Thursday, March 3, 2022 8:39 AM
> To: Laurence Lundblade <lgl@island-resort.com <mailto:lgl@island-resort.com>>; Mike Jones <Michael.Jones=40microsoft.com@dmarc.ietf.org <mailto:Michael.Jones=40microsoft.com@dmarc.ietf.org>>
> Cc: Hannes Tschofenig <Hannes.Tschofenig@arm.com <mailto:Hannes.Tschofenig@arm.com>>; Tobias Looker <tobias.looker=40mattr.global@dmarc.ietf.org <mailto:tobias.looker=40mattr.global@dmarc.ietf.org>>; cose@ietf.org <mailto:cose@ietf.org>
> Subject: Re: [COSE] Newly Submitted Draft - CBOR Web Token (CWT) Claims in COSE Headers
>  
> On 2022-03-02 19:33, Laurence Lundblade wrote:
> Makes sense to me. Helps out for the EAT claim named “profile” which gives information about the type of the token you might want before fully verifying it. Addresses an issue Anders brought up about the profile claim.
> 
> Not so fast  :)  I brought up a bunch of things which can be illustrated by this (just implemented...) example of an encryption object:
> 
> 211(["https://example.com/myobject" <https://example.com/myobject>, {
>   / COSE content encryption algorithm = A256GCM /
>   1: 3,
>   / Key encryption container /
>   2: {
>     / COSE Key encryption algorithm = ECDH-ES+A256KW /
>     1: -31,
>     / Key identifier /
>     3: "mykey",
>     / Ephemeral key /
>     5: {
>       / COSE Key type = OKP /
>       1: 1,
>       / COSE Curve = X25519 /
>       -1: 4,
>       / COSE X coordinate /
>       -2: h'33a04b83d4428824b6d5477522d4a88fac4441122bc46136c0203faa308c3929'
>     },
>     / Encrypted key /
>     10: h'e08977c25aeccaecd63b3367de2e2b8f700c82e098ad1e5099d9db510920ccff14debf820427e4ba'
>   },
>   / Tag /
>   8: h'59a84826983e3247fbec4295f75cc138',
>   / IV /
>   9: h'fd8556c122cff2bc128d5119',
>   / Encrypted data /
>   10: h'e16b16c29da5163eb0131dd1f10f080f8850f55df2ae9d89a3b839ad50952858445f290dfb60'
> }])
> 
> The core of this builds on Deterministic CBOR which unleashes the true power of CBOR in a way legacy solutions do not.   The enhancements include:
> Eliminating wrapping of header and (unencrypted) application data.
> Using the entire container (modulo the algorithm output variables which are added lastly) as input to a signature process and to the authentication part of an encryption process.  In the example that includes the top-level CBOR tag as well.  cryptoOperation(cborObject.encode()) is all that it takes on the encoder's side.
> This is pretty much what the X.509 folks have been doing from the very start so there is close to zero innovation here 😁
> 
> In the example I have also used a URL as profile/object type indicator since IANA CBOR custom tag 1537244 or whatever you end-up with, simply isn't pretty enough :)  To be more serious: URLs are decentralized and would in this context probably be browseable as well.
> 
> Cheers,
> Anders
> 
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.