Re: [lisp] Deriving Map-Register/Notify authentication key from PSK [Was: Re: Benjamin Kaduk's Discuss on draft-ietf-lisp-rfc6833bis-24: (with DISCUSS and COMMENT)]

Benjamin Kaduk <kaduk@mit.edu> Sat, 23 March 2019 22:22 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: lisp@ietfa.amsl.com
Delivered-To: lisp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6401B1228B7; Sat, 23 Mar 2019 15:22:57 -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, 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 GGXEk8twJP0p; Sat, 23 Mar 2019 15:22:56 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C316D1200B3; Sat, 23 Mar 2019 15:22:55 -0700 (PDT)
Received: from kduck.mit.edu (24-107-191-124.dhcp.stls.mo.charter.com [24.107.191.124]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x2NMMnjc014134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Mar 2019 18:22:51 -0400
Date: Sat, 23 Mar 2019 17:22:49 -0500
From: Benjamin Kaduk <kaduk@mit.edu>
To: Dino Farinacci <farinacci@gmail.com>
Cc: Fabio Maino <fmaino@cisco.com>, lisp-chairs@ietf.org, The IESG <iesg@ietf.org>, draft-ietf-lisp-rfc6833bis@ietf.org, lisp@ietf.org
Message-ID: <20190323222249.GK88959@kduck.mit.edu>
References: <154954743968.23471.9935733647283605722.idtracker@ietfa.amsl.com> <0d5057bf-46a4-afa2-0794-09c444cfde99@cisco.com> <20190320150544.GE80498@kduck.mit.edu> <BB32AA11-8316-4FB5-900B-234D87E140AF@gmail.com> <20190323130834.GX88959@kduck.mit.edu> <C2350CED-72A0-40E7-A467-6F3C0975C794@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <C2350CED-72A0-40E7-A467-6F3C0975C794@gmail.com>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/lisp/SecLKmkSWw8ZoFhvKfxyf6Y8UJQ>
Subject: Re: [lisp] Deriving Map-Register/Notify authentication key from PSK [Was: Re: Benjamin Kaduk's Discuss on draft-ietf-lisp-rfc6833bis-24: (with DISCUSS and COMMENT)]
X-BeenThere: lisp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: List for the discussion of the Locator/ID Separation Protocol <lisp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lisp>, <mailto:lisp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lisp/>
List-Post: <mailto:lisp@ietf.org>
List-Help: <mailto:lisp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lisp>, <mailto:lisp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 23 Mar 2019 22:22:58 -0000

On Sat, Mar 23, 2019 at 11:06:33AM -0700, Dino Farinacci wrote:
> > I'm not sure I understand the need for "use a different key for consecutive
> > messages", but probably we should just talk about that on Tuesday.
> 
> Well in your last reply you felt it was okay if we used the nonce in each Map-Register for a new key per message. 
> 
> What this addition brings is use of a different PSK with nonce for a new authentication key, per message. 
> 
> If you think it’s not necessary, we can leave it out. 
> 
> But it is not clear to me if you support app-key per Fabio’s suggestion. Can you clarify that a nonce and PSK by themselves is sufficient?

My sense is that it's fine to have a single configured PSK (per pair of
communicating entities, of course), provided that both a per-message nonce
and a context string identifying the type of message that the derived key
is used for are included as input to the key derivation.

For HKDF specifically, we might consider that HKDF-Extract takes a public
'salt' (a "non-secret random value") and HKDF-Expand takes an optional
'info', but also that Section 3.4 mandates that the salt must not be chosen
or manipulated by an attacker.  Since I don't think the current LISP
mechanisms can provide such a guarantee for any of the nonces (until after
we use the derived key), it seems that both the nonce and message-type
context would need to be introduced in 'info', with some length-prefix or
zero separator to enforce separation between those components of the 'info'
parameter.

-Ben