Re: [kitten] New Version Notification for draft-howard-gss-sanon-01.txt

Luke Howard <lukeh@padl.com> Mon, 06 April 2020 01:25 UTC

Return-Path: <lukeh@padl.com>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 357173A0AB3 for <kitten@ietfa.amsl.com>; Sun, 5 Apr 2020 18:25:14 -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_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=padl.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 N_D1tZzyX93N for <kitten@ietfa.amsl.com>; Sun, 5 Apr 2020 18:25:12 -0700 (PDT)
Received: from us.padl.com (us.padl.com [216.154.215.154]) (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 EA9123A0AB0 for <kitten@ietf.org>; Sun, 5 Apr 2020 18:25:11 -0700 (PDT)
Received: by us.padl.com with ESMTP id 0361OWdP027781; Mon, 6 Apr 2020 01:24:36 GMT
DKIM-Filter: OpenDKIM Filter v2.11.0 us.padl.com 0361OWdP027781
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=padl.com; s=default; t=1586136278; bh=bBIVwVA86l4EqgDBg+/PPafsybKaIgfGULlDr4HnBMw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=yDNKEx6zbG0lvGveO2WBUQSCwjgxcfk1KvYtxbvb+mO/H8nI7ybMdCKBlH9o4/Pjo Kw/zi+Rg3TKNVdiSN6YnclO1+2wyWbAKbfkkE7xxFALk90SX417IOE+9FeNIFOd+y9 fuHJ1QW9mqZo76BhMf8YXqZcBzeQsz5eG1gu4g55TzhXC4/4qbbbWBdi6GyLGgL+e/ Nwif1/2J89HZeDxTclqFmxmvEMQjVgKSweq2NEdwH0H3iyqInpgOEq0a456uplXiJh QOYVXq1XBBjMop5galor3l7hJIqaHzZwCSFvsYbVl2Va8B21oygZ7gXfzfIIwEGboI hC7k0maJd8PAA==
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
From: Luke Howard <lukeh@padl.com>
In-Reply-To: <20200406004444.GE18021@localhost>
Date: Mon, 06 Apr 2020 11:24:31 +1000
Cc: "kitten@ietf.org" <kitten@ietf.org>, Jeffrey Altman <jaltman@auristor.com>, Greg Hudson <ghudson@mit.edu>
Content-Transfer-Encoding: quoted-printable
Message-Id: <DB682CC6-808B-45A6-998E-9EFBF50702B0@padl.com>
References: <158604472122.27168.16112727090339772628@ietfa.amsl.com> <B2497A4F-81B3-42F9-AED1-CFECF1D9F7C0@padl.com> <20200405234929.GD18021@localhost> <20200406004444.GE18021@localhost>
To: Nicolas Williams <nico@cryptonector.com>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/kitten/UVz9NqVruewa798QrnFULVSGZww>
Subject: Re: [kitten] New Version Notification for draft-howard-gss-sanon-01.txt
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Apr 2020 01:25:14 -0000

Hi Nico,

> Even better: base64(dh_pubkey).
> 
> And even better too if that can be used as a target name.
> 
> Then we'd have the building blocks of a modern mech_dh.

Agreed. I would like to implement mech_ecdh. :) But I would also like to avoid scope creep for SAnon due to time and funding constraints.

> - Section 6.1.2
> 
>   The acceptor should also send a MIC along with the key, thus proving
>   it has possession of the shared secret.  This is important, otherwise
>   reply tokens could be replayed, and though it wouldn't be much of an
>   attack, it's worth doing.

Happy to add this, but is it much of an attack? Both parties are anonymous, so (as we discovered with GS2) this mechanism is completely superfluous unless you intend to use a message protection service (or PRF), which will fail in a replay attack.

Having said that: is there value in the putative MIC being of the public keys (as opposed to a constant) given the public keys are already input to the KDF?

> - Section 6
> 
>   There should be a requirement that new DH keys be generated every
>   time, no?  Especially on the initiator side, and especially if you
>   don't add the use of a MIC in the response token (see previous
>   comment).

I will clarify the text to say that it must be a fresh key pair.

> - If you allow a target name to be imported as an anonymous name whose
>   value is the base64 encoding of a raw public key, then the initial
>   context token should send two public keys, and the response token
>   should be just a MIC.
> 
>   I->A: {PK_i, PK_a}
>   A->I: MIC(SK, {PK_i, PK_a}) || <error>
> 
>         (ahh, you'd have to define an error message, but it could just
>          be a 1-byte code)
> 
>   Note that to reuse keys really does require nonces.  So those would
>   have to be added:
> 
>   I->A: {PK_i, PK_a, nonce}
>   A->I: MIC(SK, {PK_i, PK_a}) || <error>
> 
>   You could even have a half round-trip variant where the initiator
>   sends {PK_i, PK_a, nonce, MIC} and the acceptor sends nothing.

How does the initiator learn of the acceptor’s public key? It seems to me this is useful for mech_ecdh but not SAnon?

> - Section 7
> 
> |  context       the concatenation of the initiator and acceptor public
> |                keys, along with the channel binding application data
> |                (if present)
> 
>   Add "in that order”?

Fixed.

> - Section 7
> 
> |  The session key K1 is used as the base key for the generation of per-
> |  message tokens and the GSS-API PRF.  The encryption type of K1 is
> |  aes128-cts-hmac-sha256-128 as defined in [RFC8009].
> 
>   There should be a reference here to RFC4121.  Also, RFC4121 doesn't
>   mention a K1.  I suspect you need to state how to derive a key of the
>   enctype (aes128-cts-hmac-sha256-128) that would be equivalent to the
>   AcceptorSubkey.  You might want to mention that four keys are to be
>   derived from that per RFC4121 section 2, plus the GSS_Pseudo_random()
>   key (GSS_C_PRF_KEY_FULL) [RFC8009].

How about:

   This session key is equivalent to the acceptor-asserted subkey
   defined in [RFC4121] Section 2 and is used as the base key for
   generating keys for per-message tokens and the GSS-API PRF.

   The session key encryption type is aes128-cts-hmac-sha256-128 as
   defined in [RFC8009].  The [RFC3961] algorithm protocol parameters
   are as given in [RFC8009] Section 5.

I’ll also add a note in 6.2 that AcceptorSubkey MUST be set.

> - Test vectors?

I will add.

> - Section 10
> 
>   This section should repeat something about the importance of SAnon
>   not being negotiated when it's not appropriate.

“It MUST not be selected if either party requires identification of its peer.” – is that OK? I would prefer not to use the word negotiated, as SAnon can be explicitly selected outside of SPNEGO/NegoEx.

Cheers,
Luke