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

From: Michael Richardson <[email-masked]>
Date: Wed, 29 Mar 2017 18:02:23 -0400

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

Subject: [Ace] HKDF useage in ace-cose-ecdhe-05
From: Dan Harkins <[email-masked]>
To: [email-masked]
Date: Wed, 29 Mar 2017 14:55:21 -0700
List-Id: "Authentication and Authorization for Constrained Environments \(ace\)" <ace.ietf.org>

   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
[email-masked]
https://www.ietf.org/mailman/listinfo/ace

--
Michael Richardson <[email-masked]>, Sandelman Software Works
 -= IPv6 IoT consulting =-