[IPsec] Few comments to draft-ietf-ipsecme-ikev2-intermediate

Tero Kivinen <kivinen@iki.fi> Wed, 28 July 2021 11:01 UTC

Return-Path: <kivinen@iki.fi>
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 D42073A07E0; Wed, 28 Jul 2021 04:01:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=iki.fi
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 jIX0dZ8giaQL; Wed, 28 Jul 2021 04:01:51 -0700 (PDT)
Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) (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 D363F3A07D9; Wed, 28 Jul 2021 04:01:50 -0700 (PDT)
Received: from fireball.acr.fi (fireball.acr.fi [83.145.195.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kivinen@iki.fi) by meesny.iki.fi (Postfix) with ESMTPSA id 5942B200C0; Wed, 28 Jul 2021 14:01:14 +0300 (EEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1627470074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tNTx+pznFkUAOlW35YP1ntzLvfja7FBxv9tAJti3IDY=; b=bym7u8YEnC0uXjZAwcTeEalY7Fp8i+gZeGV2v/8xhUBYitUxWSucsdN7KEBmpdfQtliA/l H6KjieeP3xn1qr/JiZ5oCt3jINhefIluZM1ImL2S/JRNh3cXdouS7Aid4jARaR/UTf3gZB kyeWPrBv2FhYKxRPlWK3viW7CxtM7cE=
Received: by fireball.acr.fi (Postfix, from userid 15204) id 1E29B25C12CA; Wed, 28 Jul 2021 14:01:14 +0300 (EEST)
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <24833.14586.64495.521033@fireball.acr.fi>
Date: Wed, 28 Jul 2021 14:01:14 +0300
From: Tero Kivinen <kivinen@iki.fi>
To: ipsec@ietf.org
CC: draft-ietf-ipsecme-ikev2-intermediate@ietf.org
X-Mailer: VM 8.2.0b under 26.3 (x86_64--netbsd)
X-Edit-Time: 24 min
X-Total-Time: 24 min
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1627470074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tNTx+pznFkUAOlW35YP1ntzLvfja7FBxv9tAJti3IDY=; b=tHa5HTT/qpQZKHJ9/mN8PpI9vH/YwAL5xN42SvR1eRJ2rNQt+Knoet2oZJVjC28q8SF/vN oih94vPfy3Yh9688J7Vj/7nJzhm3H+1bdF+rMtMsv7DB52QK/pTjimyv0VxyQsFoDoo3ai xO88QRazwJqcp0UauhH0mdxN8BCoD0Y=
ARC-Seal: i=1; s=meesny; d=iki.fi; t=1627470074; a=rsa-sha256; cv=none; b=i1phQxIWAtEpBJKDQOVLn1M1eOIhsWS0eTIvSDC647YdOxK9KtxAilOpbK6V66naAWxyj2 e52DYBZAeA3RPI8/4JLbmElE37K3lRDc07VZgmnWwnsrx5pyCdDnMezTIj5VddvCdbjnNE v7n1lkdbNcUE1bh8/VAtOyZFlL+MOWY=
ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=kivinen@iki.fi smtp.mailfrom=kivinen@iki.fi
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/xzNfUN6CpD7oELeRFJ5RSRZrd-E>
Subject: [IPsec] Few comments to draft-ietf-ipsecme-ikev2-intermediate
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 28 Jul 2021 11:01:53 -0000

I was reading the draft-ietf-ipsecme-ikev2-intermediate through and I
think it might be good thing to add a note at the end of section 3.3.1
Protection of the IKE_INTERMEDIATE messages to clarify which SK_e[i/r]
and SK_a[i/r] are to be used for the IKE_AUTH after all
IKE_INTERMEDIATE exchanges (I assume it is the latest one). 

Also perhaps we should have appendix showing the full protocol
exchange example. I.e. something like this:

----------------------------------------------------------------------

Appendix A.  Example of IKE_INTERMEDIATE exchange.

   This appendix contains a short example of the messages using
   IKE_INTERMEDIATE. This appendix is purely informative; if it
   disagrees with the body of this document, the other text is
   considered correct.

   In this example there is one IKE_SA_INIT exchange, two
   IKE_INTERMEDIATE key exchanges followed by the IKE_AUTH exchange to
   authenticate the exchange. The xxx in the HDR(xxx,MID=yyy)
   indicates the exchange type, and yyy tells the message id used for
   that exchange. The keys used for each SK {} payload is indicated in
   the parenthesis after the SK. Otherwise payload notation is same as
   is used in the RFC7296.


   Initiator                      Responder
   -------------------------------------------------------------------
   HDR(IKE_SA_INIT,MID=0),
       SAi1, KEi, Ni,
       N(INTERMEDIATE_EXCHANGE_SUPPORTED)  -->

                                  <-- HDR(IKE_SA_INIT,MID=0),
				          SAr1, KEr, Nr, [CERTREQ],
                                          N(INTERMEDIATE_EXCHANGE_SUPPORTED)

   <Generate SK_[aip][ir] and store them as SK_[aip][ir]_1, start
   using them for SK {} payloads>

   HDR(IKE_INTERMEDIATE,MID=1),
       SK(SK_ei_1,SK_ai_1) { ... }  -->

   <Calculate IntAuth_1_I = prf(SK_pi_1, ...)>

                                  <-- HDR(IKE_INTERMEDIATE,MID=1),
				    	  SK(SK_er_1,SK_ai_1) { ...  }

   <Calculate IntAuth_1_R = prf(SK_pr_1, ...)>

   <If this IKE_INTERMEDIATE did a new key exchange then update
   SK_[aip][ir] and store them as SK_[aip][ir]_2, start using them for
   SK {} payloads>

   HDR(IKE_INTERMEDIATE,MID=2),
       SK(SK_ei_2,SK_ai_2) { ... }  -->

   <Calculate IntAuth_2_I = prf(SK_pi_2, ...)>

                                  <-- HDR(IKE_INTERMEDIATE,MID=2),
				      	  SK(SK_er_2,SK_ai_2) { ...  }

   <Calculate IntAuth_2_R = prf(SK_pr_2, ...)>

   <If this IKE_INTERMEDIATE did a new key exchange then update
   SK_[aip][ir] and store them as SK_[aip][ir]_3, start using them for
   SK {} payloads>

   HDR(IKE_AUTH,MID=3),
       SK(SK_ei_3,SK_ai_3) {IDi,
           [CERT,] [CERTREQ,]
       	   [IDr,] AUTH, SAi2,
       	   TSi, TSr}  -->

                                <-- HDR(IKE_AUTH,MID=3),
				        SK(SK_er_3,SK_ar_3) {IDr,
					    [CERT,] AUTH,
                                            SAr2, TSi, TSr}

----------------------------------------------------------------------

I think having such appendix would make things easier to understand.
-- 
kivinen@iki.fi