Re: [COSE] Authentication tag

Ilari Liusvaara <ilariliusvaara@welho.com> Sat, 18 March 2017 21:09 UTC

Return-Path: <ilariliusvaara@welho.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 1E9DA1270AC for <cose@ietfa.amsl.com>; Sat, 18 Mar 2017 14:09:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-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 GsvCBn22BUmC for <cose@ietfa.amsl.com>; Sat, 18 Mar 2017 14:09:23 -0700 (PDT)
Received: from welho-filter1.welho.com (welho-filter1.welho.com [83.102.41.23]) by ietfa.amsl.com (Postfix) with ESMTP id A08EE12943F for <cose@ietf.org>; Sat, 18 Mar 2017 14:09:23 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter1.welho.com (Postfix) with ESMTP id 0F4861F125; Sat, 18 Mar 2017 23:09:22 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter1.welho.com [::ffff:83.102.41.23]) (amavisd-new, port 10024) with ESMTP id 6LWyFfmxiF-5; Sat, 18 Mar 2017 23:09:21 +0200 (EET)
Received: from LK-Perkele-V2 (87-92-51-204.bb.dnainternet.fi [87.92.51.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPSA id BE5C92310; Sat, 18 Mar 2017 23:09:21 +0200 (EET)
Date: Sat, 18 Mar 2017 23:09:14 +0200
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Samuel Erdtman <samuel@erdtman.se>
Cc: Jim Schaad <ietf@augustcellars.com>, cose <cose@ietf.org>
Message-ID: <20170318210914.GA28878@LK-Perkele-V2.elisa-laajakaista.fi>
References: <CAF2hCbYALonNaZ6BrmEhYosCrNsJqLmHs3YMupjOCeRxav2X9A@mail.gmail.com> <00f701d29f43$c278fd60$476af820$@augustcellars.com> <CAF2hCbbsEm7YNpPmQj_e2b-zfKyZ9B9E1BjLUPyZjbd44jtcNw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <CAF2hCbbsEm7YNpPmQj_e2b-zfKyZ9B9E1BjLUPyZjbd44jtcNw@mail.gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/pcOIIoHZxNB4_0V9tc0S0Rx2xbM>
Subject: Re: [COSE] Authentication tag
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: Sat, 18 Mar 2017 21:09:26 -0000

On Sat, Mar 18, 2017 at 09:08:09PM +0100, Samuel Erdtman wrote:
> Thanks Jim and Ilari for the quick replies.
> 
> So if I understand it correctly RFC 5116 defines AE and AEAD with the
> requirement to bundle the tag with the ciphertext, so it would not be
> allowed to put the tag in the COSE headers.

Yes.

> Section 10 Content Encryption Algorithms, gives a hint of where to find the
> tag, 'normally' appended. Forgive me my ignorance, but does GCM have a more
> normative requirement on the location of the tag in a ciphertext?

RFC 5116 gives the tag location for AEAD_AES_{128,256}_GCM: It is
appended.

AEAD_CHACHA20_POLY1305 initially got it wrong, the document has
errata that the tag is also appended.

But there are RFC 5116-framework AEAD algorithms that don't append
the tag. E.g AEAD_AES_SIV_CMAC_* prepends the equivalent of tag,
not appends.

> If GCM does not mandate the location of the tag in the ciphertext and we
> cannot put it in a header attribute then I would like more explicit
> language about where to find/put the tag.

Funkily enough, COSE has AES-192-GCM, but there is no registered AEAD
cipher for that. And then COSE has plenty of CCM ciphers, which
probably don't have registed counterparts.

Also, I didn't find any reference based on quick look that would
say that the tags are definitely appended (but that's the only
sane way).
 

-Ilari