Re: [IPsec] Proposed method to achieve quantum resistant IKEv2

Paul Wouters <paul@nohats.ca> Thu, 03 August 2017 16:06 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 68B55132474 for <ipsec@ietfa.amsl.com>; Thu, 3 Aug 2017 09:06:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001] 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 R44zb8EOFNbF for <ipsec@ietfa.amsl.com>; Thu, 3 Aug 2017 09:06:43 -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 DC126132456 for <ipsec@ietf.org>; Thu, 3 Aug 2017 09:06:42 -0700 (PDT)
Received: from localhost (localhost [IPv6:::1]) by mx.nohats.ca (Postfix) with ESMTP id 3xNZgM3xxDz3KG; Thu, 3 Aug 2017 18:06:39 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nohats.ca; s=default; t=1501776399; bh=TymIoxuMzIbeN6ljltVDWHqS00OULEpSN6g0n6x32/0=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=pZVcGKT3OD6TcvI0h9qLX8ddIifpfzfJfEOZa2E3qesqvqcko9jj9G28t4PUZoCfF lw7+4trvcuUuE6d4JCAVldzSU4Pro56WV1+9DHp5xPYi5UavvbU/CBWwI9orXHQMb5 eIvih8UBQQfCdNucVMooDnp5irAnxMNDXvgLQNAo=
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 ZQM1YVRCNjCt; Thu, 3 Aug 2017 18:06:37 +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, 3 Aug 2017 18:06:36 +0200 (CEST)
Received: by bofh.nohats.ca (Postfix, from userid 1000) id 121F830AFA2; Thu, 3 Aug 2017 12:06:36 -0400 (EDT)
DKIM-Filter: OpenDKIM Filter v2.11.0 bofh.nohats.ca 121F830AFA2
Received: from localhost (localhost [127.0.0.1]) by bofh.nohats.ca (Postfix) with ESMTP id 0CA7640D3592; Thu, 3 Aug 2017 12:06:35 -0400 (EDT)
Date: Thu, 03 Aug 2017 12:06:35 -0400
From: Paul Wouters <paul@nohats.ca>
To: "Graham Bartlett (grbartle)" <grbartle@cisco.com>
cc: "ipsec@ietf.org" <ipsec@ietf.org>
In-Reply-To: <BBEB2C9C-9B96-4C6C-BB9B-4415F096FAE1@cisco.com>
Message-ID: <alpine.LRH.2.21.1708031149180.11277@bofh.nohats.ca>
References: <BBEB2C9C-9B96-4C6C-BB9B-4415F096FAE1@cisco.com>
User-Agent: Alpine 2.21 (LRH 202 2017-01-01)
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/R2yg9-bmswbAclMc-djOqncrLlM>
Subject: Re: [IPsec] Proposed method to achieve quantum resistant IKEv2
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, 03 Aug 2017 16:06:46 -0000

On Thu, 3 Aug 2017, Graham Bartlett (grbartle) wrote:

> 1.      The IKE_AUTH exchange is protected using the quantum secure algorithms. So all attributes within the IKE
> exchange are protected against passive attacks, which wouldn’t be the case should the quantum resistant ‘blob’ be
> sent in IKE_AUTH.

Depends on what you mean with "protected". Sure it could be seen in
plaintext, but still not broken. But sure, it would be nice to have
this message fully protected against passive eavesdroppers.

> 3.      A simple method to fragment the quantum secure key exchange data in IKE_SA_INIT is included

> 4.      The large quantum resistant ‘blob’ of data is only sent when it is known that the peer will accept this.

I don't understand this? You mean known by preconfiguration? That would
make migration really difficult and introduce a flag day. It would also
not be true for Opportunistic IPsec, where there is no preconfiguration
between peers.

> 7.      With regards to fragmentation attacks, the use of fragmentation in this idea has the same security as of
> RFC7383. Whereby an attacker that reveals her true IP address can send multiple fragments, but not the complex chain.

I'm not sure how that can be, if it is the IKE_INIT that is getting
fragmented.

> For devices that are operating in a mesh network, where many devices have multiple peers, where peers are using
> varying QSKE groups. In these instances the QSKE that is preferred by the Initiator might not be available or
> preferred on the Responder. To overcome scenarios where the Initiator will send a QSKE which is large in size and not
> supported by the Responder, (therefore wasting time and resource), the QSKE Notify payload can be used to query the
> responder to determine the supported security association attributes. The QSKE Notify payload is sent by the
> Initiator, which also excludes the QSKE payload (however a single KE payload should be included for backwards
> compatibility). If the Responder supports the QSKE notify payload it replies with the accepted security associations

Isn't this all unsafe against downgrade attacks?

> For implementations that do not support the use of the QSKE, the QSKE Notify payload will be ignored and the IKEv2
> exchange will continue as per RFC7296.

What prevents an attacker from stripping out the QSKE Notify payload in
the IKE_INIT request?

> The QSKE is nearly identical to the KE payload, however the Fragment bit identifies if the receiver should handle
> this in a different manner to the KE payload. The KE and QSKE are negotiated/advertised using the transform type 4
> (Diffie Hellman groups).  By including the QSKE in the same transform type 4 as classic DH allows for minimal
> configuration changes for current implementations when configuring both DH and QSKE Groups.

Can this not be abused for an amplification attack by sending a really
small QSKE payload and causing the responder to send back a large QSKE
payload in multiple fragments?

> The use of the Fragmentation bit is not mandatory. Implementations can attempt to send the IKE_SA_INIT payload
> containing the QSKE payload without fragmentation at the IKE layer, opting for fragmentation at the IP layer instead.
> Implementations can initially exclude the the use of fragmentation in the QSKE payload, however if connectivity fails
> when not using fragmentation of the QSKE, it is assumed that that traffic has been denied due to fragmentation at the
> IP layer and fragmentation of the QSKE should be used instead.

How does that work on the responder side? In IKEv2, the responder never
retransmits. What if fragments from responder to initiator fail?

>                   <--  HDR,QSKEi-2/3                        (QSKE1 is Group 30, fragment 2 of 3)
> 
>                   <--  HDR,QSKEi-3/3                        (QSKE1 is Group 30, fragment 3 of 3)
> 
>                   <--  HDR,QSKEi2-1/4                       (QSKE2 is Group 35, fragment 1 of 4)
> 
>                   <--  HDR,QSKEi2-2/4                       (QSKE2 is Group 35, fragment 2 of 4)
> 
>                   <--  HDR,QSKEi2-3/4                       (QSKE2 is Group 35, fragment 3 of 4)

Why would the responder reply to two group suggestions with QSKE payloads?
Normally in IKEv2, the initiator sends a list of proposals/options, and
the responder picks one from it.

> As three groups were used, the keymat is generated with the combination of the output from the three public values.

How did the initiator signal support for all groups _and_ support for
combining them? What is gained by combining multiple groups?

Paul