[6tisch-security] [Ace] HKDF useage in ace-cose-ecdhe-05 (fwd) Dan Harkins: [Ace] HKDF useage in ace-cose-ecdhe-05

Michael Richardson <mcr+ietf@sandelman.ca> Wed, 29 March 2017 22:02 UTC

Return-Path: <mcr+ietf@sandelman.ca>
X-Original-To: 6tisch-security@ietfa.amsl.com
Delivered-To: 6tisch-security@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 46C60126C23 for <6tisch-security@ietfa.amsl.com>; Wed, 29 Mar 2017 15:02: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, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 ZrtG3Ual1Z7o for <6tisch-security@ietfa.amsl.com>; Wed, 29 Mar 2017 15:02:24 -0700 (PDT)
Received: from tuna.sandelman.ca (tuna.sandelman.ca [IPv6:2607:f0b0:f:3:216:3eff:fe7c:d1f3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8A885129622 for <6tisch-security@ietf.org>; Wed, 29 Mar 2017 15:02:24 -0700 (PDT)
Received: from sandelman.ca (obiwan.sandelman.ca [IPv6:2607:f0b0:f:2::247]) by tuna.sandelman.ca (Postfix) with ESMTP id A2561203B0 for <6tisch-security@ietf.org>; Wed, 29 Mar 2017 18:26:19 -0400 (EDT)
Received: from obiwan.sandelman.ca (localhost [IPv6:::1]) by sandelman.ca (Postfix) with ESMTP id C58FA636E0 for <6tisch-security@ietf.org>; Wed, 29 Mar 2017 18:02:23 -0400 (EDT)
From: Michael Richardson <mcr+ietf@sandelman.ca>
To: 6tisch-security@ietf.org
X-Mailer: MH-E 8.6; nmh 1.6+dev; GNU Emacs 24.5.1
X-Face: $\n1pF)h^`}$H>Hk{L"x@)JS7<%Az}5RyS@k9X%29-lHB$Ti.V>2bi.~ehC0; <'$9xN5Ub# z!G,p`nR&p7Fz@^UXIn156S8.~^@MJ*mMsD7=QFeq%AL4m<nPbLgmtKK-5dC@#:k
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature"
Date: Wed, 29 Mar 2017 18:02:23 -0400
Message-ID: <6536.1490824943@obiwan.sandelman.ca>
Archived-At: <https://mailarchive.ietf.org/arch/msg/6tisch-security/99IHunD7TebkLB1opPekcqKwYNg>
Subject: [6tisch-security] [Ace] HKDF useage in ace-cose-ecdhe-05 (fwd) Dan Harkins: [Ace] HKDF useage in ace-cose-ecdhe-05
X-BeenThere: 6tisch-security@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Extended Design Team for 6TiSCH security architecture <6tisch-security.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/6tisch-security>, <mailto:6tisch-security-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/6tisch-security/>
List-Post: <mailto:6tisch-security@ietf.org>
List-Help: <mailto:6tisch-security-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6tisch-security>, <mailto:6tisch-security-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 29 Mar 2017 22:02:26 -0000

At least, for the archival and consideration of anyone who wasn't in ACE.

--- Begin Message ---
   Hello,

   I want to expand on my comments I made at the mic on Monday regarding
key derivation with symmetric key authentication in draft-selander-ace-
cose-ecdhe-05. When doing authentication with symmetric keys message 1 is
encrypted using K_1 and K_1 is generated by passing (as far as I can tell,
and I did admit at the mic that it's a little fuzzy) the PSK as salt and
an empty key to HKDF. This poses some problems I think.

   - The only source of entropy in K_1 is the PSK and this makes the
protocol
     susceptible to a passive dictionary attack[1] that would,
otherwise, not
     be possible.

   - It seems somewhat unhygienic, from a crypto point of view, to pass
     a NULL key to a key derivation function.

   - Use of the PSK in messages 2 and 3 authenticate the particular key
     used in the AEAD and decryption/verification provides authentication of
     the sender to the receiver. But for message 1 is different. There is
     no benefit to the key exchange provided by encryption of message 1.

   The sole benefit of encrypting in message 1 seems to be that EXT_1 gets
encrypted. But EXT_1 in the asymmetric case is not encrypted so there
doesn't really seem there can be much that needs protection; seems like
this is more of an opportunistic thing. That being the case, there is
little upside and considerable downside to generating K_1 and encrypting
a portion of message 1. I recommend that being removed from the draft.

   regards,

   Dan.

[1] a dictionary attack is defined as one where the attacker gains an
advantage from computation as opposed to interaction. The size of the
dictionary (e.g. all numbers between 0 and 2^256) only affects the
probability of success of the attack not whether it is a dictionary
attack or not.




_______________________________________________
Ace mailing list
Ace@ietf.org
https://www.ietf.org/mailman/listinfo/ace
--- End Message ---
--
Michael Richardson <mcr+IETF@sandelman.ca>ca>, Sandelman Software Works
 -= IPv6 IoT consulting =-