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

Felix Günther <mail@felixguenther.info> Fri, 07 March 2025 15:58 UTC

Return-Path: <SRS0=gNGB=V2=felixguenther.info=mail@cdc02.comdc.de>
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 915338D8AEE for <cfrg@mail2.ietf.org>; Fri, 7 Mar 2025 07:58:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_PASS=-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 QnIwV1VzCFf3 for <cfrg@mail2.ietf.org>; Fri, 7 Mar 2025 07:58:30 -0800 (PST)
Received: from cdc02.comdc.de (cdc02.comdc.de [136.243.4.87]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id 3EF2C8D8AD7 for <cfrg@irtf.org>; Fri, 7 Mar 2025 07:58:30 -0800 (PST)
Received: from cdc02.comdc.de (cdc02.comdc.de.local [127.0.0.1]) by cdc02.comdc.de (Postfix) with ESMTP id 636474F2071D for <cfrg@irtf.org>; Fri, 7 Mar 2025 16:58:29 +0100 (CET)
Received: from [192.168.178.33] (20.202.40.145.ftth.as8758.net [145.40.202.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mail@felixguenther.info) by cdc02.comdc.de (Postfix) with ESMTPSA id 4184B4F2071C for <cfrg@irtf.org>; Fri, 7 Mar 2025 16:58:29 +0100 (CET)
Message-ID: <58c3d21f-e569-4a95-a1f4-4d36264fb7c9@felixguenther.info>
Date: Fri, 07 Mar 2025 16:58:28 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <20250306143247.85841.qmail@cr.yp.to>
From: Felix Günther <mail@felixguenther.info>
Autocrypt: addr=mail@felixguenther.info; keydata= xsDiBE04qkIRBADtFenVz1DuqethtPkoKAazBeKjyrr5Znbi8mQT1gOrkuli6i0/umf2uJ9V uI6NgjR0uM68UFGIHZlAoWk5Nfo8BTkYsdXl4R08pePmwRwwtq9LALZrGkeLeQtOFdLJt7G2 iQgqq2XpZc9AXW3/+j0I6MmsWMQKCkCA1s6IRLtH+wCgk85oP1adRYaEpi82Z3oG7vztEOkE AMccj8RgnjWcbB13HxxRk2C/4mgLEmCBWO3nmcCPZP5t/5GZSe7Kt5HQoygjxxcro/2e+9wF YsYwLUpHKMOjyvtcU0jLtIv0m6I+GQ3HOz89erVpa7G7EUoEsbQ7FEuyW4mVEaQZ3XE1Mxvp /3Ca1rBJjoxXhxKaDJYWsc5fdO6RA/44xXLdiE2f6NDoTJY7Z97VXUnJskpDNnwePOJyX4GT DwII2kl6JSYOAmkcOpINOSVsS0XDLZpBuKqsibUF/t53BkNfR/aF/BzIUJ5dykqrHvi75aQb ltSum1+kIo8Q6ZI+MzAAwmbqLfuRHZP5y0fjxdHLhfMrvacrNHnaoUWrVc0oRmVsaXggR8O8 bnRoZXIgPG1haWxAZmVsaXhndWVudGhlci5pbmZvPsJ8BBMRAgA8AhsjBgsJCAcDAgYVCAIJ CgsEFgIDAQIeAQIXgBYhBCuuSm95RkYbcAFhs1KvAgDT8XAOBQJdE93OAhkBAAoJEFKvAgDT 8XAOVSwAn0QmRYzMtqFZejCnMakizqsaWHJlAJ4jR3nDqw5h3Ct4Xyz1CEQrUdJ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3Y3jf0GJbDn lj4v3ZrIxcI3RmUIGf0CQDSpqrUHppgKwiBPSLLRRQruGw7jzLpMqu7ar+2fhNQB3GLSmygi kdYXROfmIIq0J5g/rZLSFQ1GZmL3S8pqS9sJQh0KZEUE+1PtzAoYUYp9btR5Jo3pbyAn6M/g SNlSNDUwa2Eai6fy3fBu1KT1AYgntLzVyJr2Q/Wd85MjF/a9GI5X8lmnvPSAJ/ofSI/bRjLq yNj6frKLrztFV9ucWhKQoQd4iE9qe284KYqdQq4BZUhO4J2nl2rWbEquoFe9ACdIVBIuRoCH EUrreMG0tdymwkkEGBECAAkFAk04qkICGwwACgkQUq8CANPxcA6jYACfYd8EkV8G70iuPkyA HMZZ8W8lWUoAoJElB4EzU8opYiwQw02HRvW/qYuJ
To: cfrg@irtf.org
In-Reply-To: <20250306143247.85841.qmail@cr.yp.to>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: ClamAV using ClamSMTP
Message-ID-Hash: GUXW45DFUYZNJNHJLRCYA4S2XBXXJFID
X-Message-ID-Hash: GUXW45DFUYZNJNHJLRCYA4S2XBXXJFID
X-MailFrom: SRS0=gNGB=V2=felixguenther.info=mail@cdc02.comdc.de
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/rRUxU0gQgsGl8Y90U1AqRoo6-JQ>
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>

Hi Dan,

Indeed, single-key bounds are not to be used when rekeying or in any 
setting where the security target is indeed not a single key. The draft 
already says this, but we'll emphasize it more prominently.

Thanks for the suggestion to augment the slightly general multi-key 
bounds in Table 3 with concrete numbers for two illustrative 
scenarios/sets of parameters; we'll add this.

Regards,
Felix


On 2025-03-06 15:32 +0100, Daniel J. Bernstein <djb@cr.yp.to> wrote:
> John Mattsson writes:
>> Attackers will go for most bang-for-the-buck and will do whatever
>> gives most benefit for the least amount of cost. Single--key is a
>> theoretical simplification. Rekeying based on single-key advantages
>> turn the system into multi-key and may easily lower security instead
>> of increasing security.
> 
> Yes, this last point is what makes single-key analyses dangerous. The
> "tightness" section of https://eprint.iacr.org/2019/1336 surveys various
> examples of attacks exploiting looseness, including multi-key looseness.
> 
> It's safe to compensate by requiring the single-key success probability
> to be at most p/T, implying success probability at most p for a T-target
> attack. Unfortunately, single-key analyses typically fail to include
> this division by T. Section 5 of this document doesn't include this
> division by T, so Table 2 is flawed.
> 
> Section 6 looks like it's fixing this, but is unnecessarily hard to use
> because Table 3 isn't concrete. Obviously formulas are useful (and a
> Python script would be even more useful), but they aren't a substitute
> for presenting concrete numbers. When applications vary in parameters
> such as B, there should be at least two illustrative tables with
> concrete numbers for different choices of those parameters.
> 
>> For a PRP in counter mode an attacker cannot recover
>> more than ≈ σ2 / 2b bits of the plaintext.
> 
> That depends on the plaintext structure used by the application.
> 
> For example, consider an attacker looking at a two-block ciphertext
> (c,d), where the attacker knows that the plaintext was either (4,4) or
> (4,5) and is trying to determine that one secret bit.
> 
> With a permutation P in counter mode, (4,4) is encrypted as (c,d) =
> (4+P(0),4+P(1)) so d-c is P(1)-P(0), while (4,5) is encrypted as (c,d) =
> (4+P(0),5+P(1)) so d-c is 1+P(1)-P(0).
> 
> The attacker knows that P(1)-P(0) is nonzero, so if the attacker sees
> that d-c = 0 then the attacker knows that the plaintext is (4,5), and if
> the attacker sees that d-c = 1 then the attacker knows that the
> plaintext is (4,4).
> 
> Is this limiting the attacker to recovering only 1/2^b bits of plaintext
> for a b-bit block size? No. With probability 1/2^b (the chance of
> P(1)-P(0) being the right value), the ciphertext is telling the attacker
> the _entire_ plaintext, reducing 1 secret bit to 0 secret bits.
> 
> The _average_ number of bits leaked here is 1/2^b, but this misses the
> variation between the attacker being certain about the secret in some
> cases while not learning anything about the secret in other cases.
> 
> Of course, 1/2^b is very small, but practical attacks against CTR (such
> as https://sweet32.info demonstrating low-cost attacks for b = 64) use
> more blocks to scale up, typically triggering applications to use
> plaintext structures that give away secrets.
> 
> ---D. J. Bernstein
> 
> 
> _______________________________________________
> CFRG mailing list -- cfrg@irtf.org
> To unsubscribe send an email to cfrg-leave@irtf.org