Re: [Cose] Key management for MACs (was Re: Review of draft-schaad-cose-msg-01)

Derek Atkins <derek@ihtfp.com> Mon, 13 July 2015 17:36 UTC

Return-Path: <derek@ihtfp.com>
X-Original-To: cose@ietfa.amsl.com
Delivered-To: cose@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 69ADB1B2CB8 for <cose@ietfa.amsl.com>; Mon, 13 Jul 2015 10:36:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.389
X-Spam-Level:
X-Spam-Status: No, score=-1.389 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HELO_MISMATCH_ORG=0.611] autolearn=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 NeRXwrAIlx_i for <cose@ietfa.amsl.com>; Mon, 13 Jul 2015 10:36:52 -0700 (PDT)
Received: from mail2.ihtfp.org (MAIL2.IHTFP.ORG [204.107.200.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CD77F1B2CBA for <cose@ietf.org>; Mon, 13 Jul 2015 10:36:50 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail2.ihtfp.org (Postfix) with ESMTP id 46739E2035; Mon, 13 Jul 2015 13:36:49 -0400 (EDT)
Received: from mail2.ihtfp.org ([127.0.0.1]) by localhost (mail2.ihtfp.org [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 26566-02; Mon, 13 Jul 2015 13:36:47 -0400 (EDT)
Received: from securerf.ihtfp.org (unknown [IPv6:fe80::ea2a:eaff:fe7d:235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mocana.ihtfp.org", Issuer "IHTFP Consulting Certification Authority" (verified OK)) by mail2.ihtfp.org (Postfix) with ESMTPS id 49BF9E2034; Mon, 13 Jul 2015 13:36:47 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ihtfp.com; s=default; t=1436809007; bh=gSmjAtGAzy47owrDbl6GS92hpTBDS7jeEWJCgk6ygq4=; h=From:To:Cc:Subject:References:Date:In-Reply-To; b=fl8IGy4rbcNbG/UpTtmyoOxG2wmcYhB3T2bcJofaLg+MefuvdpkfL8tzNrtoMQK3b sO9qtj4MKX0FIF3X0wfImZHbT80GpT7cmwccy37dqE8pnIzK/EY8BI9ConqmtMwRCH TFZj/RJfRF76hrhU86f0mnvnb5VWZpv4Rckizs24=
Received: (from warlord@localhost) by securerf.ihtfp.org (8.14.8/8.14.8/Submit) id t6DHajOZ003076; Mon, 13 Jul 2015 13:36:45 -0400
From: Derek Atkins <derek@ihtfp.com>
To: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
References: <CA+k3eCQUPxZfWM9XcKaTLN-WOx2cHEi9SAGSRFTtv71iSCUqdQ@mail.gmail.com> <559576A9.9090002@gmx.net> <BY2PR03MB442C02F758E34B29BBD0CEAF5970@BY2PR03MB442.namprd03.prod.outlook.com> <001001d0b90c$3c874af0$b595e0d0$@augustcellars.com> <00c501d0b9a5$c8f869d0$5ae93d70$@augustcellars.com> <CA+k3eCS-7UK9RDfnkKCLK0ApTdNhSamYY3LL73+e1=rBvz7vDA@mail.gmail.com> <sjmlheo6t1j.fsf@securerf.ihtfp.org> <20150710171118.GA20991@LK-Perkele-VII>
Date: Mon, 13 Jul 2015 13:36:45 -0400
In-Reply-To: <20150710171118.GA20991@LK-Perkele-VII> (Ilari Liusvaara's message of "Fri, 10 Jul 2015 20:11:18 +0300")
Message-ID: <sjm4ml86jte.fsf@securerf.ihtfp.org>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: Maia Mailguard 1.0.2a
Archived-At: <http://mailarchive.ietf.org/arch/msg/cose/geOnH7Em2EqMNUHugdnNHRcX_wI>
Cc: Jim Schaad <ietf@augustcellars.com>, Brian Campbell <bcampbell@pingidentity.com>, Derek Atkins <derek@ihtfp.com>, Mike Jones <Michael.Jones@microsoft.com>, cose@ietf.org
Subject: Re: [Cose] Key management for MACs (was Re: Review of draft-schaad-cose-msg-01)
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.15
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: Mon, 13 Jul 2015 17:36:53 -0000

Ilari Liusvaara <ilari.liusvaara@elisanet.fi> writes:

> On Fri, Jul 10, 2015 at 09:28:24AM -0400, Derek Atkins wrote:
>> 
>> Performing a MAC using the output of a DH (be it ECDH, AEDH, or raw DH)
>> can still tell you that the transmission has not been modified between
>> you and the party you're talking to.  You're right that it tells you
>> nothing about the party you're talking to (i.e., without authentication
>> of the DH keys you have no idea if you're talking to a MITM or the real
>> endpoint).  However, using DH + MAC does tell you that you're not being
>> spoofed by a "passive" eavesdropper.
>> 
>> So IMHO it does have some benefit.
>
> It occurs to me that any sort of asymmetric key management with MACs
> is unsafe, since knowing just public key enables message forgery.

Pardon?  I don't understand that.  Just knowing your Public Key does not
mean I can send messages that appear to come from you.  The key used for
the MAC is the derived shared secret, so I would need to know your
Private Key as well in order to generate the correct shared secret.

At worst I could record and replay the session, assuming the other end
also uses a static public/private keypair.  Or I could act as an active
man-in-the-middle.

> This does not straightforwardly extend to symmetric schems (like
> key wrapping), but are those useful with MACs?
>
>
> -Ilari

-derek
-- 
       Derek Atkins                 617-623-3745
       derek@ihtfp.com             www.ihtfp.com
       Computer and Internet Security Consultant