Re: [Cbor] [Secdispatch] Ciphertext format draft

Carsten Bormann <cabo@tzi.org> Fri, 15 January 2021 15:28 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: cbor@ietfa.amsl.com
Delivered-To: cbor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 48C673A0B17; Fri, 15 Jan 2021 07:28:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.92
X-Spam-Level:
X-Spam-Status: No, score=-1.92 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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 PoXoNdZ-OVjL; Fri, 15 Jan 2021 07:28:49 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8BACE3A0B12; Fri, 15 Jan 2021 07:28:46 -0800 (PST)
Received: from [192.168.217.118] (p548dc939.dip0.t-ipconnect.de [84.141.201.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4DHQ7c4HS1z1057; Fri, 15 Jan 2021 16:28:44 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <FC7E2454-C6F2-4FEC-9502-2B9CB6C4096B@gmail.com>
Date: Fri, 15 Jan 2021 16:28:44 +0100
Cc: Francesca Palombini <francesca.palombini@ericsson.com>, "cbor@ietf.org" <cbor@ietf.org>, Cose Wg <cose@ietf.org>, "secdispatch@ietf.org" <secdispatch@ietf.org>, "Keselman, Gleb" <Gleb_Keselman@intuit.com>, Yoav Nir <ynir.ietf@gmail.com>
X-Mao-Original-Outgoing-Id: 632417324.134828-f610ff8ad399fc9f990d00f68eea93cc
Content-Transfer-Encoding: quoted-printable
Message-Id: <92C2FB28-1F0A-43E6-9D17-9609400C0A7E@tzi.org>
References: <2EA9CFF4-BB15-4337-ABDF-0BEEEF3A6163@ericsson.com> <FC7E2454-C6F2-4FEC-9502-2B9CB6C4096B@gmail.com>
To: Yaron Sheffer <yaronf.ietf@gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cbor/2mfNNttdAViDgzlW29HfDnlojdY>
Subject: Re: [Cbor] [Secdispatch] Ciphertext format draft
X-BeenThere: cbor@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Concise Binary Object Representation \(CBOR\)" <cbor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cbor>, <mailto:cbor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cbor/>
List-Post: <mailto:cbor@ietf.org>
List-Help: <mailto:cbor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cbor>, <mailto:cbor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Jan 2021 15:28:51 -0000

Hi Yaron,

Here is a quick update proposal to the CDDL:


var_header = {
        K_KEY_PROVIDER => uint,
        K_KEY_ID => bstr,
        ? K_KEY_VERSION => uint,
        ? K_AUX_DATA => bstr,
        ? K_NONCE => bstr,
        ? K_AUTH_TAG => bstr,
        ? K_AAD => bstr,
        * (k_ext .feature "header-extension") => any
}

k_ext = uint .ge K__EXTENSIONS

; K_RESERVED = 0
K_KEY_PROVIDER = 1
K_KEY_ID = 2
K_KEY_VERSION = 3
K_AUX_DATA = 4
K_NONCE = 5
K_AUTH_TAG = 6
K_AAD = 7
        ; extend from here
K__EXTENSIONS = 8



The idea is to use “.feature” to clearly identify extensions from the base set.

This would give you validator output like

** Features potentially used: header-extension: [1577, 4416, 3178, 2698]
/var_header/ {1: 2286, 2: /bstr/ h'686F74626564', 3: 4661,
 5: /bstr/ h'756E70726F70656E7365',
 6: /bstr/ h'6F7879616E746872617175696E6F6E65',
 7: /bstr/ h'636572656272616C6C79', 1577: /any/ "feeze",
 4416: /any/ "bronchiolitis", 3178: /any/ "mesole", 2698: /any/ "parvoline”}

so you know which extensions are in use.

Grüße, Carsten