[COSE] Possible future structure

Jim Schaad <ietf@augustcellars.com> Fri, 31 July 2020 12:55 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 C01A93A0B22 for <cose@ietfa.amsl.com>; Fri, 31 Jul 2020 05:55:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham 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 FnaXUc0_XR37 for <cose@ietfa.amsl.com>; Fri, 31 Jul 2020 05:55:04 -0700 (PDT)
Received: from mail2.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 6ED423A0AE0 for <cose@ietf.org>; Fri, 31 Jul 2020 05:55:02 -0700 (PDT)
Received: from Jude (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 31 Jul 2020 05:54:55 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: cose@ietf.org
Date: Fri, 31 Jul 2020 05:54:54 -0700
Message-ID: <042401d66739$cab9a850$602cf8f0$@augustcellars.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Content-Language: en-us
Thread-Index: AdZnOPpgBbs2bHUEQxeKwSukSS5Wng==
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/6-vyoetZboIdrwwEYoYlj9QY_3Q>
Subject: [COSE] Possible future structure
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: Fri, 31 Jul 2020 12:55:07 -0000

One of the issues that I mentioned in the discussion was that there were
possible structures that might be defined in the future, but I did not have
a good idea of what one would look like.  At the time I was thinking of the
Hybrid Encryption document in CFRG, but a better example might be to look at
the old PKCS#7 Sign and Encrypt structure.

COSE_SignAndEncrypt ::= {
  Headers, // encryption headers
  Encryption Content
  Recipient array
  Headers, // Signed headers
  Signature
}

I defined two separate set of headers just to make things really complicated
not because it is necessary.  The problem with stripping the signature that
caused it to be dropped from CMS can be solved by including the structure
name as part of the signed and encryption process so you cannot convert this
into just an encryption only item.

If you try and compute a counter signature on this object you want to
include
* Encryption protected headers
* Encryption content
* Signed protected headers
* Signature value

This is a case where saying that we want to include all of the binary string
objects in the structure as input to the countersignature process is what is
desired.  

Jim