Re: [openpgp] OpenPGP encryption block modes

Bruce Walzer <bwalzer@59.ca> Mon, 15 August 2022 14:35 UTC

Return-Path: <bwalzer@59.ca>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A3A3AC1524BC for <openpgp@ietfa.amsl.com>; Mon, 15 Aug 2022 07:35:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.91
X-Spam-Level:
X-Spam-Status: No, score=-6.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
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 x_HwY3-aBClR for <openpgp@ietfa.amsl.com>; Mon, 15 Aug 2022 07:35:06 -0700 (PDT)
Received: from mail.59.ca (mail.59.ca [205.200.229.83]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA512) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 213FAC1524B9 for <openpgp@ietf.org>; Mon, 15 Aug 2022 07:35:05 -0700 (PDT)
Received: from [10.0.0.2] (helo=ohm.59.ca) by mail.59.ca with esmtpsa (TLS1.3) tls TLS_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from <bwalzer@59.ca>) id 1oNbBG-0002KV-M4; Mon, 15 Aug 2022 09:35:02 -0500
Date: Mon, 15 Aug 2022 09:35:01 -0500
From: Bruce Walzer <bwalzer@59.ca>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: openpgp@ietf.org
Message-ID: <YvpZlQzW1yEOrqzq@ohm.59.ca>
References: <87bktajjvq.fsf@thinkbox> <YuKpxp0/Dy1DfC19@watt.59.ca> <875yjhjg2c.fsf@thinkbox> <87r124m64c.fsf@wheatstone.g10code.de> <YulX9jI1+wOCwLJq@ohm.59.ca> <Q6EUpbQm0e5f1OiU-77Old9p9FXyLCaFZ8pMm7PTt8VTLQJaXRQzWIDSwc3db6yI-56imyOaTNdt9TC8Zrm1jN_kPKxFYH4OqEu6o-Wfquo=@protonmail.com> <YuvlHdLz0Sfle7Ot@ohm.59.ca> <87a68ji1bv.fsf@wheatstone.g10code.de> <YvPGY8ArcKD7Hr1p@watt.59.ca> <YvQoC1g5rzKCfCVp@tapette.crustytoothpaste.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <YvQoC1g5rzKCfCVp@tapette.crustytoothpaste.net>
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/DCJAI3CsnnN6b1JlR2KuC2hdGDA>
Subject: Re: [openpgp] OpenPGP encryption block modes
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Aug 2022 14:35:09 -0000

On Wed, Aug 10, 2022 at 09:50:03PM +0000, brian m. carlson wrote:
[...]
> AES-256-GCM can encrypt 16 KiB chunks at over 6 GB/s on my machine, and
> AES-256-OCB can encrypt similar chunks at over 8 GB/s, whereas a
> hardware-accelerated SHA-1 tops out at 2 GB/s and AES-256-CFB only runs
> at 866 MB/s.  This is a laptop with a Core i7-1280P and 32 GB of RAM
> using OpenSSL 3.0.5[0], which tends to have excellent performance.

So the ratio of OCB vs OCFB-MDC comes out to 8/.866=9.2 . That *is*
significant but does not imply that OCFB-MDC is ridiculously slow. The
0.866 GB/s result strongly implies that there is not any sort of
performance problem for messaging. Since the proposed change is
entirely incompatible with the present encryption, why is this even
being considered as part of OpenPGP? Why is it not being developed as
some sort of high performance, high reliably disk format standard? Why
do we have to bother people doing messaging clients with all this
extra and unneeded complexity? Just a quick list:

* Up to 3 more block cipher modes for a total of 5.

* A chunking system that goes on top of cipher blocking and the packet
  extension blocking to bring the blocking to 3 deep.

* A whole new preference system for block cipher modes that goes on
  top of the existing preference for the block encryption mode.

BTW, why was increased performance for the block cipher mode included
as a goal for the cryptography refresh anyway? So far it does not seem
possible to gain such an increase in a compatible way. Was it ever
considered a possibility?

Bruce