[CFRG] Re: RGLC on draft-irtf-cfrg-aead-limits

"D. J. Bernstein" <djb@cr.yp.to> Tue, 11 March 2025 11:27 UTC

Return-Path: <djb-dsn2-1406711340.7506@cr.yp.to>
X-Original-To: cfrg@mail2.ietf.org
Delivered-To: cfrg@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 8EA299EC985 for <cfrg@mail2.ietf.org>; Tue, 11 Mar 2025 04:27:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -4.197
X-Spam-Level:
X-Spam-Status: No, score=-4.197 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aj1NBF2XWwih for <cfrg@mail2.ietf.org>; Tue, 11 Mar 2025 04:27:43 -0700 (PDT)
Received: from salsa.cs.uic.edu (salsa.cs.uic.edu [131.193.32.108]) by mail2.ietf.org (Postfix) with SMTP id 4BEDB9EC980 for <cfrg@irtf.org>; Tue, 11 Mar 2025 04:27:43 -0700 (PDT)
Received: (qmail 11608 invoked by uid 1010); 11 Mar 2025 11:27:42 -0000
Received: from unknown (unknown) by unknown with QMTP; 11 Mar 2025 11:27:42 -0000
Received: (qmail 444090 invoked by uid 1000); 11 Mar 2025 11:27:39 -0000
Date: Tue, 11 Mar 2025 11:27:39 -0000
Message-ID: <20250311112739.444088.qmail@cr.yp.to>
From: "D. J. Bernstein" <djb@cr.yp.to>
To: cfrg@irtf.org
Mail-Followup-To: cfrg@irtf.org
In-Reply-To: <be5a2807-29a4-4e66-8ea7-cc1a5acd200f@betaapp.fastmail.com>
Message-ID-Hash: DGY33NFFVXLCYW3SDYGZ3UKDPXOYGLNM
X-Message-ID-Hash: DGY33NFFVXLCYW3SDYGZ3UKDPXOYGLNM
X-MailFrom: djb-dsn2-1406711340.7506@cr.yp.to
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cfrg.irtf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [CFRG] Re: RGLC on draft-irtf-cfrg-aead-limits
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/aM6QKG-AMp7Gs04JBH45HL4qLyY>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Owner: <mailto:cfrg-owner@irtf.org>
List-Post: <mailto:cfrg@irtf.org>
List-Subscribe: <mailto:cfrg-join@irtf.org>
List-Unsubscribe: <mailto:cfrg-leave@irtf.org>

Martin Thomson writes:
> In most of the papers we cite, offline work is not considered
> directly, so presumably it is inherent in the baseline PRP (or PRF)
> advantage

Yes, that's where computation contributes to attack success in these
theorems. A billion dollars today is far below some attacker budgets
(e.g., NSA's yearly budget was $10.8 billion in 2013) and buys more than
2^94 AES-128 computations, so the single-target success probability is
above 2^-34, and the multi-target success probability is basically 100%
in the common situation that many keys encrypt a known plaintext.

I spotted a comment indicating that the draft looks only at particular
protocols with lower multi-target success probability. I'd think that
most readers looking at the tables will miss this restriction and won't
realize that AES-128 is already breakable today for other protocols.

Anyway, the draft says the tables are supposed to limit the attacker's
success probability to 2^-50; but a billion-dollar attack will break an
AES-128 key with probability far above 2^-50 even if the protocol puts
severe limits on q and v and is never used for another key. So there's
definitely a major problem with the draft's AES-128 table entries.

Another reason not to ignore PRF terms is that there's a fast PRF attack
against both AES-128 and AES-256 with probability about (q+v)^2/2^129.
This isn't an issue for ChaCha20, and maybe all of the cited AES bounds
are in the part of the literature that removes the issue by starting
with PRP instead of PRF, but this is something to check carefully;
otherwise there can be real attacks, scaling up https://sweet32.info.
Note that https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8537.pdf
says "Paul Crowley emphasized that Google is moving petabytes of data
with a single key".

Yet another proof gap comes from the fact that even faster attacks exist
against PRP and PRF, at least for some cost metrics; see generally
https://cr.yp.to/papers.html#nonuniform. These aren't real-world attacks
against PRP and PRF, but they _can_ turn into real-world attacks against
protocols that have non-constructive proofs. Formalizing constructivity
is tricky, so you can't expect to detect it from the theorem statement.
My own proofs in this area are constructive, but some other proofs such
as https://eprint.iacr.org/archive/2006/043/20060206:214630 aren't, as
https://eprint.iacr.org/2012/074 pointed out.

There are quite a few proofs cited in this draft, and I wonder how
carefully they've been reviewed, not just for constructivity but for
whether the stated theorems have in fact been proven. We've just seen
devastating breaks of XCB version 2, despite years of standardization
and two refereed provable-security papers; should we really be assuming
that theorems are correct? See https://cr.yp.to/proofs/errors.html for
XCB links and further examples of errors. For the question of how often
proofs are correct, see https://cr.yp.to/papers.html#eraa.

---D. J. Bernstein