Re: [CFRG] draft-gueron-cfrg-dndkgcm-00 (Double Nonce Derive Key AES-GCM (DNDK-GCM) has been posted)

Maximilian Lorlacks <maxlorlax@protonmail.com> Fri, 19 April 2024 13:37 UTC

Return-Path: <maxlorlax@protonmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ED175C14F5EE for <cfrg@ietfa.amsl.com>; Fri, 19 Apr 2024 06:37:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.094
X-Spam-Level:
X-Spam-Status: No, score=-7.094 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=protonmail.com
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 MVyIV1ph2N2U for <cfrg@ietfa.amsl.com>; Fri, 19 Apr 2024 06:36:57 -0700 (PDT)
Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) (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) by ietfa.amsl.com (Postfix) with ESMTPS id B5911C14F5FA for <cfrg@irtf.org>; Fri, 19 Apr 2024 06:36:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1713533815; x=1713793015; bh=L5O/swmVPdRZ0hv4yNMzEFwNR+td5fcche59sEmwQLE=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=llbnK5XyXCM8M75plNN6rgMK15bUtye/Vx7xHZwgC6ksuD0RtEC4+/Vb3gwfbmrI7 tWYdKfbhdBz7O4T7ylT7+cxO4FzwXVQZQE+ClPmkugG46cLKm6GgaOENrdIB2EBK+R xqGL4RqnCNk9nvYMYZv4MuoRh8z/b4eNSlNGeWBF2CgZ5/62gPEqgiG+dK5ygfcxQs yeG9/g/QH927f7YmF1Kb4B3/OJfMdFvnYNKBH8hwfJtsucA0/AZv6SO61rCKuUCzy1 xPd6FS/IQKvApfrHhg2EYvJkttdn3mamupw1bnZrA8vPgbkrmKxMsGBGYBBUG+1MrD XI+iYbQNfMv8A==
Date: Fri, 19 Apr 2024 13:36:27 +0000
To: Shay Gueron <shay.gueron@gmail.com>
From: Maximilian Lorlacks <maxlorlax@protonmail.com>
Cc: cfrg@irtf.org
Message-ID: <cAcnLYw-WSHHE8WKK8UvYtL-XwKR21wBfJeg15fQeEi6r522t-kDkc5GHEs7GCRBLn5tH-3WwyZN3ZihyRSZqIcxcFIGarH1BNT2RPPBkOI=@protonmail.com>
Feedback-ID: 10084778:user:proton
X-Pm-Message-ID: 86890451e9d3e304de9da73326a2b33977e586ff
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/wWJ94TW9FyYcuUUdtpSwvIY0u2o>
Subject: Re: [CFRG] draft-gueron-cfrg-dndkgcm-00 (Double Nonce Derive Key AES-GCM (DNDK-GCM) has been posted)
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://mailman.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://mailman.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Apr 2024 13:37:02 -0000

Hi Shay,

I'm glad to see that there is interest in an XChaCha-like construction for AES-GCM.  This has been kind of an open problem that I never knew how to fix myself and I hope that the CFRG will adopt this draft.

I've been unable to find a primary publication other than the slides of your presentation at RWC 2024.  I'm looking forward to the promised analysis paper.

A few notes on the draft itself. These came out a bit lengthier than I'd originally intended.

1. I am not sure how you authored this. The HTML and PDF formats still seem to reflect the state of xml2rfc before RFC 7990, which also seems to have given up on plain text as a primary source format in section 7.3. I assume you accidentally used xml2rfc, an outdated XML template or an outdated transformation pipeline.

2.1. Am I misunderstanding the second paragraph of section 3? "Let U be an array of bytes ("array" for short) of length u (bytes), written as U = U [u-1] U [u-2] ... U [0], where U [j] is the j-th byte, j = 0, ..., u-1." If U[j] is the j-th byte, but arrays start at zero, shouldn't U[j] be the (j+1)-th byte? U[0] is the first byte.

2.2. The inverse array ordering probably stems from GCM and AES being in big-endian traditions, but this will probably catch hasty implementers off-guard. This also does not appear to mesh well with the numbering established immediately before.

3. I'm not sure what happened in algorithm 2 or what itijbucgcinnvullehcrjdiheicn and cdbd are supposed to mean.

4. The notation of the For pseudocode is not consistently used with braces.

5. The operator \ne in algorithm 4 was not defined anywhere.

6.1. I find myself a bit troubled by the novel KC parameter. I would greatly appreciate guidance on how to treat the KC value. I assume it can be public, but how would this be ideally transmitted in a backward-compatible fashion? Appended or prepended to the ciphertext?

6.2. The document attempts to get IANA to make an entry in the AEAD registry, referencing RFC 5116. However, the interface specified in your draft mismatches the interface mandated by RFC 5116, section 2.1: "The authenticated encryption operation has four inputs, each of which is an octet string", namely the secret key K, nonce N, plaintext P and associated data A. Ignoring the different names, the encryption operation inputs are fine. However, the RFC 5116, section 2.1, says that the output is a sole ciphertext C. Your interface returns a ciphertext C, an authentication tag T and a commitment value KC. Similarly, RFC 5116, section 2.2, says that the authenticated decryption operation "has four inputs: K, N, A, and C". Yours has six inputs, K, N, A, C, T, KC.

7. Nit: In paragraph 2 of section 6, "non-repeating but nonrandom" uses the "non-" prefix once with and once without hyphen.

8. I'm unsure how I feel about the fact. This makes it difficult to unconditionally recommend as a safe alternative, leading to one more  for an implementer to make.

Cheers,
Max