Re: [IPsec] WG adoptation call for draft-smyslov-ipsecme-ikev2-aux-02

"Valery Smyslov" <smyslov.ietf@gmail.com> Thu, 21 March 2019 07:48 UTC

Return-Path: <smyslov.ietf@gmail.com>
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 25E96130F39 for <ipsec@ietfa.amsl.com>; Thu, 21 Mar 2019 00:48:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.5
X-Spam-Level:
X-Spam-Status: No, score=-0.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SORBS_WEB=1.5, SPF_PASS=-0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 GBH-8kzZR9rj for <ipsec@ietfa.amsl.com>; Thu, 21 Mar 2019 00:48:28 -0700 (PDT)
Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA4AC127287 for <ipsec@ietf.org>; Thu, 21 Mar 2019 00:48:27 -0700 (PDT)
Received: by mail-wr1-x436.google.com with SMTP id j9so5446363wrn.6 for <ipsec@ietf.org>; Thu, 21 Mar 2019 00:48:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=b00LSgwPVIXXX8mGyqWDF6ZXt4mBscXfyvcPPH/P16Q=; b=ZsaAkDQ7ZlWkAhrQDY3G8h+q3RXp99ryQaubbESPVD++qxiHZbKY+BAF+yqh7/TWQi Fu8hp/fM3k1x+fllQj3tQUQZDHmBRrGYQ/Z4YrLAT1id/zqHLCD8mX6HMPCVmWdeOa4Y +uvqCrX2zhwLfYdxAnX1lXgzgT5fvvqKeZJ+bZoDictxcL1Av+UKvGdn6Lp1Ww7SpsAB obB4t7ZOH2jA+yeHNyL50KX8eM1P3N4gqC7c1AnEtlAN1hnz3FThTSKtprKAoxUeD+hJ ZdPJVE3PXL8xjJVWlxV9Syh3WejEnH/2ro4WXkNJHUxBBLPLNxwZnVeYLx+0ozkow4DM iIVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=b00LSgwPVIXXX8mGyqWDF6ZXt4mBscXfyvcPPH/P16Q=; b=fWFjw1JRarGIpfKJmU3/lDRTYdkOsry5ejkU3RSUVOf/P7cCs82fVMdmvQ4uD+79Yk qNnrvrPJS8wg6l8K9MgH7oLhQFlW2aHNRvqQFSx8M4o50XNenxnT7IdP49VHeti+Dds0 O5Qeit/RrUzEq2+AW5zb6HNOKTjkWG0J8X0PTxnnuvY6iGwHfSQwl3WjYVspbU4R4kpk UPgsdElUTyz6xHx2ySENG2jLqUkVhb7Fq0L5UwniNC6Lky0UqgqCoISrlZYrkuXnOM+o pQ1DJsHsPZuUSTFVzDKgA7E+TM1NrUJxHX2UYHw8gBQas3Z10+GyY5C6CFoX6vqjttBV xySg==
X-Gm-Message-State: APjAAAWV+vZ82sqLwNKW3STGnWUVQM+SpMX+k3rtDp7UDfQJonTwHW+Q mSC2xsNWu1bd62lixyO4CG4=
X-Google-Smtp-Source: APXvYqw05svK8cplxAoKZlnLrm3MhxewWNBR2JlnywiVuJ+S0B604WZAntTA7+Cev6K64ACNSNXZzw==
X-Received: by 2002:adf:e547:: with SMTP id z7mr1393152wrm.295.1553154506317; Thu, 21 Mar 2019 00:48:26 -0700 (PDT)
Received: from buildpc ([82.138.51.4]) by smtp.gmail.com with ESMTPSA id m6sm7199265wrr.53.2019.03.21.00.48.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Mar 2019 00:48:25 -0700 (PDT)
From: Valery Smyslov <smyslov.ietf@gmail.com>
To: 'Tobias Guggemos' <guggemos@nm.ifi.lmu.de>, 'Tero Kivinen' <kivinen@iki.fi>, ipsec@ietf.org
References: <23688.31062.426962.985107@fireball.acr.fi> <01c701d4da41$3c61f890$b525e9b0$@gmail.com> <6454f07af680410e918431971f3489f2@XCH-ALN-010.cisco.com> <001e01d4ddac$5502d770$ff088650$@nm.ifi.lmu.de> <059301d4de2d$faa5a000$eff0e000$@gmail.com> <000a01d4de79$31d3cc00$957b6400$@nm.ifi.lmu.de> <06b701d4deed$706f1310$514d3930$@gmail.com> <014001d4df3f$492fcc70$db8f6550$@nm.ifi.lmu.de>
In-Reply-To: <014001d4df3f$492fcc70$db8f6550$@nm.ifi.lmu.de>
Date: Thu, 21 Mar 2019 10:48:22 +0300
Message-ID: <077201d4dfba$75e80cc0$61b82640$@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQICh2VSFjkuY0eSQrYh6iGxPAV2+AHuWDWOAmpINo8CGcLbUAMGThUEAw641ZkCdcCrbQDsH4oopTr6xRA=
Content-Language: ru
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/O7iLOTgTuOeBwSth4NXUz1lC59M>
Subject: Re: [IPsec] WG adoptation call for draft-smyslov-ipsecme-ikev2-aux-02
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: Thu, 21 Mar 2019 07:48:30 -0000

[I snipped some text to make message more readable]

> > > I know that the main motivation for IKE_INTERMEDIATE is PQKE, but I
> > > don't feel that we're at a point where we can actually say for sure
> > > that this is the one and only way for PQKE and, thus, I'd prefer
> > IKE_INTERMEDIATE to be completely independent of any Key Exchange
> > related stuff!
> >
> > That's my intention too, we are in concert here.
> > And in my opinion the draft makes no hint that QSKE is the only application,
> > quite the opposite.
> 
> You're right it doesn't, but it leaves the impression that it's designed for the use case.

It's a false impression :-)

> > > I'm not an expert in this kind of (framework) documents at all. My
> > > question is, is an empty IKE_INTERMEDIATE a potential security issue?
> >
> > Which security issue? Can you please elaborate?
> 
> Ok, I'm basically only speculating now:
> 1) What about an attacker who just sends empty messages to an responder supporting IKE_INTERMEDIATE?
> The state machine will never leave the state of waiting for an IKE_AUTH.
> 2) What about a quantum attacker who breaks the IKE_INIT (in real-time) and just floods the responder with
> empty IKE_INTERMEDIATE.
> 
> This might not be a very realistic attack, but my question is, can you make sure that it is not an issue?

In my view it's not how INTERMEDIATE should be dealt with. 
Firstly, sole exchange of INTERMEDIATE_EXCHANGE_SUPPORTED
notifications is not enough condition for INTERMEDIATE exchange to happen. 
There must be some other conditions, that must be defined
in the documents utilizing this exchange. Moreover, both peers
must have common view on how many such exchanges should be done
and in what order. Secondly, I cannot see any relevance to empty
SK payload in the examples you provided. The same attacks can
happen regardless on whether the content of SK is empty or not.
For example, in hybrid-qske the initiator could initiate more
INTERMEDIATE exchanges than the number of negotiated PQ methods,
so that the responder would receive the unexpected request.
And thirdly, the similar situation could also take place even with
core IKEv2, if the initiator sends, say INFORMATIONAL
instead of IKE_AUTH.

So, in your examples above, the responder would treat unexpected 
INTERMEDIATE as inappropriate exchange (as it would treat there 
any exchange except for IKE_AUTH). Since ICV is verified, there is
a clear protocol error and responder would silently delete half-created
SA. However, if your implementation is smart enough and you are concerned
about Quantum Computers breaking initial DH (your example 2),
then you can just ignore unexpected exchange and continue to wait
some (short period of) time for a proper one. If it wouldn't come - 
delete SA.

> The important thing I'd like to mention:
> I think, if we can avoid an issue by design - by excluding an option we don't necessarily need - we should do
> that and not the other way around.

I don't see it's an issue. More precisely, I can see it as a generic issue,
not particularly concerned with empty INTERMEDIATE messages.

> > Successful exchange of INTERMEDIATE_EXCHANGE_SUPPORTED notification
> > only confirms that both parties support INTERMEDIATE exchange. It is not
> > enough condition to start doing INTERMEDIATE exchange.
> > A separate documents that utilize this exchange MUST define the conditions
> > in which peers would do INTERMEDIATE exchanges, the conditions for
> > ending the sequence of these exchanges and start IKE_AUTH, and the
> > payloads these exchanges should carry.
> >
> > Is it OK for you?
> 
> At least, it makes it clearer!

OK.

> I personally would like to make it explicitly impossible to support IKE_INTERMEDIATE with an empty payload.
> (unless there is an application using an empty payload as some kind of a response)

See above.

> The current wording says: The implementation MAY support IKE_INTERMEDIATE but MUST NOT use it
> without an application.
> My preferred approach would be: The implementation MUST NOT support IKE_INTERMEDIATE without an
> application.

OK, how about:

The implementation MUST NOT negotiate support for INTERMEDIATE without an application.

> My thinking is, you'd like to negotiate an application  (e.g. PQKE) which needs IKE_INTERMEDIATE, so it's all
> about the application anyway.
> So if the application needs IKE_INTERMEDIATE, it wouldn't work if IKE_INTERMEDIATE is not supported
> anyways.

It depends. I can imagine extensions that can run w/o INTERMEDIATE, but can benefit
if it is supported...

> > > I'd completely remove the second part and only write:
> > >
> > >     The keys SK_e[i/r] and SK_a[i/r] for the Encrypted payload in the
> > >     INTERMEDIATE exchanges are computed in a standard fashion, as
> > defined
> > >     in the Section 2.14 of [RFC7296].  Every subsequent INTERMEDIATE
> > >     exchange uses the most recently calculated keys before this exchange
> > >     is started.
> >
> > I'm generally OK with this, however I'm a bit concerned here that
> > implementers might get a wrong impression that the keys calculated in
> > IKE_SA_INIT never changes. The text that you snipped has the only purpose
> > to warn implementers that this might not be the case.
> > Don't you think it's a valid concern?
> >
> 
> It's a valid concern, but a concern which should be addressed by the document describing the key update.
> On the other hand, what if the additional Key Exchange would say that you should not do that for any reason,
> which would be the ruling document?
> That would be even more confusing (although I admit the chances for this case are quite low).

I think it's enough to add some text to this draft that warns implementers that 
the IKE SA keys may change as a result of INTERMEDIATE exchanges.

> > > If we had an IANA registry for every payload allowed in
> > > IKE_INTERMEDIATE, that could easily be updated by future documents by
> > registering a new value.
> >
> > I don't think IANA registry is needed for that. In my opinion it's enough that
> > every dependent document describes the content of INTERMEDIATE
> > exchange.
> >
> > Look for example at INFORMATIONAL exchange. It's the same "Swiss army
> > knife", and is used for a lot of purposes depending on the notifications it
> > contains.
> > Somehow we managed to deal with that without IANA registry that would
> > list the notifications that could appear in INFORMATIONAL exchange.
> > I don't see a big difference with INTERMEDIATE here, except that instead of
> > notifications the dependent documents will define payload types for this
> > exchange.
> >
> 
> The difference with INFORMATIONAL is, that you have a secured channel.
> At the time of INTERMEDIATE, you still build this channel and, thus, I think a more conservative approach of
> white-listing is better.
>
> That doesn't mean that an IANA registry is the right way to go, it's just one.
> I'd just like to prevent any miss-use of INTERMEDIATE, as I beliebe it's a highly security critical step.
> There are definitely multiple ways of doing that, but I think that should be the goal.

In my opinion it's enough if dependent document define the content.

> > > I don't say this is the only way to go, but I feel it's cleaner than
> > > just saying it could be anything. I'd actually prefer what I mentioned
> > > above, not allowing IKE_INTERMEDIATE to be implemented without
> > another document defining the actual payload.
> >
> > Exactly, except that I'd s/implemented/used. You can implement a pure
> > framework (just for the future), but you cannot use it without implementing
> > another document utilizing it.
> 
> Maybe we could replace "used" with "supported"?

is "negotiated" or "advertised support for" OK here?

Regards,
Valery.

> Regards
> Tobias