Re: [COSE] A couple of COSE questions

Jim Schaad <ietf@augustcellars.com> Thu, 15 June 2017 21:01 UTC

Return-Path: <ietf@augustcellars.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 463891294E8 for <cose@ietfa.amsl.com>; Thu, 15 Jun 2017 14:01:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=augustcellars.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 77-XkJPL2XSe for <cose@ietfa.amsl.com>; Thu, 15 Jun 2017 14:01:17 -0700 (PDT)
Received: from mail4.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B637812947A for <cose@ietf.org>; Thu, 15 Jun 2017 14:01:17 -0700 (PDT)
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01D2E5DF.D82AFF90"
Content-Language: en-us
DKIM-Signature: v=1; a=rsa-sha256; d=augustcellars.com; s=winery; c=simple/simple; t=1497560474; h=from:subject:to:date:message-id; bh=+NesbRzVmBNN3SWm+CafYWU8+xw6ZKtSZFLI5pBeUgc=; b=P6KE88fXyKJ7Sk7h+MFH2/C8TqgueKBD2nP0SVfsXs8tr0IsjBTuaWmiRq93mxbqdgdBq96W4he iGfht0wNoAic72XwaX6PGHg0G/dWYnVWbUnPcePKANh7eEodgRYfG9ST3iEBMU4PEyHgitSb+I4vY Urq26yefnROrG2n2eci33XW69fL6Afgul5lwX4umLVMZnQ//1HINFFhOb4Zt3dnJXVvyJnPysb4LT SJZo+AZ8KorkLw5A4mF41zpnXleGZBpS0c4qR7tyqwYiTfz//lYkjHG1GzAIIJIiDPr0C+I+yN2SB khoFecgu0vU4II4JMnZaNHOBQeGTktnBStEA==
Received: from mail2.augustcellars.com (192.168.1.201) by mail4.augustcellars.com (192.168.1.153) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 15 Jun 2017 14:01:13 -0700
Received: from Hebrews (173.8.216.38) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 15 Jun 2017 14:01:10 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'Laurence Lundblade' <llundbla@qti.qualcomm.com>, 'cose' <cose@ietf.org>
References: <E60C729E-0212-4C01-B442-B8E31836FB0C@qti.qualcomm.com>
In-Reply-To: <E60C729E-0212-4C01-B442-B8E31836FB0C@qti.qualcomm.com>
Date: Thu, 15 Jun 2017 14:01:07 -0700
Message-ID: <000601d2e61a$84840b30$8d8c2190$@augustcellars.com>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQIf/JZRcsJoiB3IJKBI3+iluTCx4qGMOR7Q
X-Originating-IP: [173.8.216.38]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/zj0HkgGtaqCCHksc_uWs4CC5NnA>
Subject: Re: [COSE] A couple of COSE questions
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.22
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: Thu, 15 Jun 2017 21:01:20 -0000

See in line comments

 

Jim

 

 

From: COSE [mailto:cose-bounces@ietf.org] On Behalf Of Laurence Lundblade
Sent: Thursday, June 15, 2017 12:58 PM
To: cose <cose@ietf.org>
Subject: [COSE] A couple of COSE questions

 

Hello I have a few questions… 

 

Registration of hash algs

There’s no assignments for hash algs (SHA-256.. SHA-512, SHA3-256…) in the IANA registry here <https://www.iana.org/assignments/cose/cose.xhtml#algorithms> . I assume this is because the COSE protocol doesn’t have a need because they are bundled up with the signing alg identifiers.  For non-COSE protocols that use CBOR and do have a need to identify a hash, would it be reasonable to add them?  The COSE registry seems like it is the place to register algorithm IDs for use in CBOR in general.  I assume the process would be to write a simple RFC, publish and then add to the registry.

 

[JLS]  Yes the reason that there are no hash algorithms is that they were not needed for any of the core COSE functions.  I am in the process of registering two hash functions as part of ietf-schaad-cose-x509.  These are a SHA-256 and a truncated SHA-256.  If you want to write up a more complete RFC for this that would be fine with me.

 

 

Registration of tagging for COSE messages

Why isn’t there a registry section for the tags for these different COSE messages? 

   COSE_Tagged_Message = COSE_Sign_Tagged / COSE_Sign1_Tagged /
       COSE_Encrypt_Tagged / COSE_Encrypt0_Tagged /
       COSE_Mac_Tagged / COSE_Mac0_Tagged

 

[JLS] Not too sure what registry you are looking for here.  But I think you want this registry https://www.iana.org/assignments/cbor-tags/cbor-tags.xhtml#tags

 

Tagging of bstr wrapped data

It seems like it would be helpful to use an option tag on the bstr-wrapped payload for COSE_Sign and such to tell general purpose parsers and translators to remove the bstr wrapping and keep going. Tag 55799 seems like the best fit so far, but it may not be a perfect fit and it would be nice to use a tag less than 24.   

 

[JLS]  I am not sure that you would find this generically helpful.  The problem is that the parser needs to provide both the encoded version and the unencoded version if you are going to do an automatic recursion of the CBOR decoder.  You need the first in order to do the signature validation processing.  This means that there does not seem to be a real point to making the recursion occur automatically that I can see.  We have not provided all of the cues that would be needed to do a stream decode and validation at the same process ala how CMS does it (and even then there are cases where you need to go back and restart the process again).

 

Thanks!

 

LL