Re: [kitten] Question about AES mode in Kerberos

Olga Kornievskaia <aglo@umich.edu> Mon, 09 January 2023 20:25 UTC

Return-Path: <olga.kornievskaia@gmail.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 6C1D7C131C47 for <kitten@ietfa.amsl.com>; Mon, 9 Jan 2023 12:25:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.497
X-Spam-Level:
X-Spam-Status: No, score=-1.497 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=umich.edu
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CkgzxuGGLSfz for <kitten@ietfa.amsl.com>; Mon, 9 Jan 2023 12:25:45 -0800 (PST)
Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 323F1C13CCE0 for <kitten@ietf.org>; Mon, 9 Jan 2023 12:25:45 -0800 (PST)
Received: by mail-pj1-x102a.google.com with SMTP id c8-20020a17090a4d0800b00225c3614161so14009794pjg.5 for <kitten@ietf.org>; Mon, 09 Jan 2023 12:25:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=google-2016-06-03; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MWf1kISW6X/xqIn5sbuJsMw/+C12wbuOCNjep1mkN1o=; b=krUcWDTk9/aulDxRhKPEG4A3pbyXcurWvubq95wWdjEKQfu6js96ty2rrvV4jShfr+ 3xvsXYVq5KdCSPAWbQtO9ojfLAmmgvzGMTFqjTNUhbJDo5gp4tD+J8jlhJjhokFwGd4c NoM/z1pCWw/JdeKdEFLpLQ86lfig7qmcLblOyyKhHg+W+bKT1tKXXnKvP6VYeEICk8Ig SdX4u2xj27UHfTQweyfic46nJBO6rLrKbphBUGliQ0R2nw6iLcukPjT9PUDAX6btSnXI Wu7ox0hz9Jj80Sx7NZkxtAVLwHJz8QAdopnsuEbPq2WLpSFEwSUhC1EQaqqKEBwbYTlr BXEQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MWf1kISW6X/xqIn5sbuJsMw/+C12wbuOCNjep1mkN1o=; b=T4vN0fzMHRhJ6CBlUtNENLeooM8g8cvel9osAd4WHkL+sPaqJq3Y0DCr6MW0rSyXEY yrkVcA4JJTstmEIZbFIyblByV5Z7oBeehaoDYd7NnJz2KRokh2SM4rzlmZh0mRw4sosp dFWXdVy9HnboNvs+IOgLbMRP+xeGs6zHR1B+6e0P/XD9s4psjU5J3+Z/sSVPIH6WmV6b xlYKSpkAysFazpWn3yggO+tw4/R7p8ugCWUyU4EAMHnNP/9VMB0Ce13NJkzdDMAWSOLJ xo5FSGGPCg7q+1TwgcXs3t/P4HcKoB7lf9V4UNQV0fkX7+RMzU9V10B47kLJPHNelat/ pYHA==
X-Gm-Message-State: AFqh2ko56WBAuohlKFuU/dBRnyQdo3hDUxYfwhE/lmyrf6NEfUU754br E2sqcLRRsd5o0en1cm5ux629Jy7zFCOdFcr3Thdq1yJp5d0=
X-Google-Smtp-Source: AMrXdXsDukD8kfa/BDyqqSTlHX7MNXlBEOds/RtkzsSLS8VfFHCA8BoJf4UPcsg69qwQmG7TRSGR2w/RMr50G+doPGA=
X-Received: by 2002:a17:90b:3c85:b0:225:c8f6:852f with SMTP id pv5-20020a17090b3c8500b00225c8f6852fmr4452809pjb.104.1673295944686; Mon, 09 Jan 2023 12:25:44 -0800 (PST)
MIME-Version: 1.0
References: <CAN-5tyGGJXoo9RfKEGTsk8XeQDpZ--VSnO7nunzvnBBzrRB0WQ@mail.gmail.com> <558f31de-7fac-26c7-fe81-8e486968f0ef@secure-endpoints.com> <7B46A5A4-4415-4627-B964-44F2516D84FE@padl.com> <9464B1FF-6784-4D59-A4F6-1B5D58C2B94F@padl.com> <CAN-5tyE4eau116TkDLbvn+pTOjK_C+WEvi9SnUELr+4riTpZcw@mail.gmail.com> <cb3ff38f-7e62-0711-9a6c-50a96b571e2d@mit.edu>
In-Reply-To: <cb3ff38f-7e62-0711-9a6c-50a96b571e2d@mit.edu>
From: Olga Kornievskaia <aglo@umich.edu>
Date: Mon, 09 Jan 2023 15:25:33 -0500
Message-ID: <CAN-5tyFA41VMz_3tBmh+FeefBBJOxfi1AoUCqUkRHR3z43qrKg@mail.gmail.com>
To: Greg Hudson <ghudson@mit.edu>
Cc: Luke Howard Bentata <lukeh=40padl.com@dmarc.ietf.org>, "kitten@ietf.org" <kitten@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/kitten/WxKbeuNTSeRYs5oXZJG-9SdQ75Y>
Subject: Re: [kitten] Question about AES mode in Kerberos
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.39
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, 09 Jan 2023 20:25:49 -0000

May I ask a stupid question? Is there something inherently different
about nonce handling/producing in Kerberos that's different from TLS?
TLS community seems to have chosen AES-GCM as their AES mode and do
acknowledge that nonce-reuse would lead to catastrophic failures. I'm
not familiar with a solution they've chosen to adapt to avoid nonce
reuse but it seems they are not discouraged from using GCM.

I'm not sure what kind of conclusions I should draw from the
statement: "The enctype can't fit within the RFC 3961 framework (I
believe) because it requires nonce information from an upper layer."
But say NFS wanted AES-GCM it would need to negotiated it with RFC
4537 (support for this is btw I'm not sure is implemented in an MIT
library, correct?), but to do so there needs to an IANA enctype for it
(like aes128-gcm-hmac-sha256-128, aes256-gcm-hmac-sha384-192) which
there isn't one? But there are IANA numbers for AEAD_AES_128_GCM_SIV,
AEAD_AES_256_GCM_SIV? Also, you note that mixed different security
properties is problematic.

I have no performance claims about AES-GCM over AES-CBC except for
what I've read from the web. Statements such as that because each
block can be processed individually (in parallel) that it "can" allow
for better performance over AES-CBC. I can see that an implementation
can code it up serially and then no performance gains will be had.
Also, perhaps the performance gains are very small even when
implemented in parallel and that would be useful to know.

For what it's worth, I found this --
https://calomel.org/aesni_ssl_performance.html -- which is various
CPU's performance of AES-GCM, AES-CBC, and ChaCha which seem to say
that AES-GCM is faster?

My quest was simply trying to understand why TLS has decided on GCM
(which seem to be more performant, according to some) and Kerberos did
not. All of this in hopes of improving NFS over Kerberos performance.


On Sat, Jan 7, 2023 at 12:33 PM Greg Hudson <ghudson@mit.edu> wrote:
>
> On 1/6/23 09:48, Olga Kornievskaia wrote:
> > I know you can't speak for them but what are the chances that MIT's
> > implementation would support it as well.
> Speaking for MIT krb5, I have several concerns about this direction:
>
> * The motivation appears to be performance, but meaningful performance
> gains have not been demonstrated in the context of a GSS application.
>
> * GCM is a fragile encryption mode; any mistakes in the nonce input
> would lead to a catastrophic security vulnerability.
>
> * This work creates an enctype unsuitable for general use, but which
> would require an entry in the IANA enctypes registry to be negotiable
> with RFC 4537.  Putting algorithms with very different security
> properties registered in the same registry has proven to lead to
> security issues (such as CVE-2010-1324).
>
> * The enctype can't fit within the RFC 3961 framework (I believe)
> because it requires nonce information from an upper layer.
>
> * Microsoft's reason for interest ("something [...] for post-sha256")
> doesn't seem to match up with a GSS-only enctype.
>
> A general-purpose enctype using AES-GCM-SIV (RFC 8452) and random nonces
> would be a better fit for Kerberos, but I don't see a good reason to
> specify it unless compelling performance gains can be demonstrated.
>
> _______________________________________________
> Kitten mailing list
> Kitten@ietf.org
> https://www.ietf.org/mailman/listinfo/kitten