[IPsec] draft-fluhrer-qr-ikev2 AUTH issue

Paul Wouters <paul@nohats.ca> Thu, 17 August 2017 02:16 UTC

Return-Path: <paul@nohats.ca>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2F77213217D for <ipsec@ietfa.amsl.com>; Wed, 16 Aug 2017 19:16:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nohats.ca
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 OwObnGthBXHI for <ipsec@ietfa.amsl.com>; Wed, 16 Aug 2017 19:16:18 -0700 (PDT)
Received: from mx.nohats.ca (mx.nohats.ca [193.110.157.68]) (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 439F41321F0 for <ipsec@ietf.org>; Wed, 16 Aug 2017 19:16:18 -0700 (PDT)
Received: from localhost (localhost [IPv6:::1]) by mx.nohats.ca (Postfix) with ESMTP id 3xXqZh2R6tz3Ch; Thu, 17 Aug 2017 04:16:12 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nohats.ca; s=default; t=1502936172; bh=GUSPjTbgLxYR4f2UPtgtkP7tKu/hXoYN81HmFQyxotA=; h=Date:From:To:cc:Subject; b=jxdyo3Ufy6GrKaXiYV8M+su00WupOKKtDcuaxdiK7/231BT/mx/2y8w1xG4ivxKJt l+CfiFmdB/AOy9hnJg2dcs0vuDgu/vPcHYvFaGaviIXwnv9/MqifZZN68ONcUjjHr3 wfrbDRfBXG6CI7NCq2i/zTHyEl3pxl6jKwij7xQw=
X-Virus-Scanned: amavisd-new at mx.nohats.ca
Received: from mx.nohats.ca ([IPv6:::1]) by localhost (mx.nohats.ca [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 4fjZoiBT9spt; Thu, 17 Aug 2017 04:16:09 +0200 (CEST)
Received: from bofh.nohats.ca (bofh.nohats.ca [76.10.157.69]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.nohats.ca (Postfix) with ESMTPS; Thu, 17 Aug 2017 04:16:09 +0200 (CEST)
Received: by bofh.nohats.ca (Postfix, from userid 1000) id 785E52E75B2; Wed, 16 Aug 2017 22:16:08 -0400 (EDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 bofh.nohats.ca 785E52E75B2
Received: from localhost (localhost [127.0.0.1]) by bofh.nohats.ca (Postfix) with ESMTP id 68EE840D3592; Wed, 16 Aug 2017 22:16:08 -0400 (EDT)
Date: Wed, 16 Aug 2017 22:16:08 -0400
From: Paul Wouters <paul@nohats.ca>
To: "ipsec@ietf.org WG" <ipsec@ietf.org>
cc: "Scott Fluhrer (sfluhrer)" <sfluhrer@cisco.com>, Vukasin Karadzic <vukasin.karadzic@gmail.com>
Message-ID: <alpine.LRH.2.21.1708162147570.26093@bofh.nohats.ca>
User-Agent: Alpine 2.21 (LRH 202 2017-01-01)
MIME-Version: 1.0
Content-Type: text/plain; format="flowed"; charset="US-ASCII"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/oRgLmBxsg--557hqgJ9GifMyGhw>
Subject: [IPsec] draft-fluhrer-qr-ikev2 AUTH issue
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 17 Aug 2017 02:16:21 -0000

Hi,

Vukasin Karadzic is working on implementing draft-fluhrer-qr-ikev2
for libreswan and stumbled upon a problem. The relevant text:

    When the initiator receives this reply, it checks whether the
    responder included the PPK_SUPPORT notify.  If the responder did not,
    then the initiator MUST either proceed with the standard IKE
    negotiation (without using a PPK), or abort the exchange (for
    example, because the initiator has the PPK marked as mandatory).  If
    the responder did include the PPK_SUPPORT notify, then it selects a
    PPK, along with its identifier PPK_id.  Then, it computes this
    modification of the standard IKE key derivation:

A responder answering an IKE_INIT containing PPK_SUPPORT needs to
reply without knowing for which connection this IKE_INIT will be.

The responder has not yet received the initiator's ID. If the responder
has some connections that require a PPK and some connections that
require NO PPK, then it has to flip a coin on whether or not to send
the PPK_SUPPORT notify and if it guessed wrong, the AUTH payload on
the initiator will be wrong. Sending the notify commits to using a PPK
because the initiator uses it as input to the AUTH payload.

So this table from the RFC is incomplete:

    This table summarizes the above logic by the responder

  Received PPK_SUPPORT  Have PPK   PPK Mandatory    Action
  ------------------------------------------------------------------
       No                  No          *            Standard IKE protocol
       No                 Yes         No            Standard IKE protocol
       No                 Yes        Yes            Abort negotiation
      Yes                  No          *            Standard IKE protocol
      Yes                 Yes          *            Include PPK_SUPPORT

Basically, we are in the case where "Have PPK" is not yet known.


One way of solving this could be to allow PPK_SUPPORT to have some
notify data, which could for instance be a hash of the connection/group
name used by the responder. Another option is to use the PPK as one
of the inputs to some hash algorithm as PPK_SUPPORT data, so the
responder can go through its list of PPKs to match it back to a
connection/group. But we would need to be sure that this does not
open up the PPK to attacks (classic and quantum)

Paul