Re: [Last-Call] [openpgp] Last Call: <draft-ietf-openpgp-crypto-refresh-12.txt> (OpenPGP) to Proposed Standard

Werner Koch <wk@gnupg.org> Tue, 31 October 2023 11:31 UTC

Return-Path: <prvs=0668ae4191=wk@gnupg.org>
X-Original-To: last-call@ietfa.amsl.com
Delivered-To: last-call@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4F67CC151539 for <last-call@ietfa.amsl.com>; Tue, 31 Oct 2023 04:31:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.107
X-Spam-Level:
X-Spam-Status: No, score=-7.107 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, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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 (1024-bit key) header.d=gnupg.org
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 sMNvQw0iKcr5 for <last-call@ietfa.amsl.com>; Tue, 31 Oct 2023 04:31:52 -0700 (PDT)
Received: from ellsberg.gnupg.com (ellsberg.gnupg.com [IPv6:2a01:4f8:151:7306::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2A472C14F73F for <last-call@ietf.org>; Tue, 31 Oct 2023 04:31:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnupg.org; s=20181017; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Qy57x0wdrte0YtWVVebc79+70Of4AwqmmWlPBL0CpYA=; b=MPOgfIPZh9Al0YOEJBPlHtgetg oFK4zJuVCUV1jzgqqe2hV/uT8tUqo5LBXFSBSgPYpkyxpwgfuQhCJBcR2hH5QiL5H0eumoQPA1Rd+ gOW2mYqrd5riphabFD+2CX2qhEk6uaDODzFTJe4Ozt88dcB/xts1PnYxNDwLBBD+zuBw=;
Received: from uucp by ellsberg.gnupg.com with local-rmail (Exim 4.94.2 (Devuan)) (envelope-from <wk@gnupg.org>) id 1qxmyL-00083L-OA for <last-call@ietf.org>; Tue, 31 Oct 2023 12:31:49 +0100
Received: from wk by jacob.g10code.de with local (Exim 4.96 (Devuan)) (envelope-from <wk@gnupg.org>) id 1qxmyC-0003Vc-0G for <last-call@ietf.org>; Tue, 31 Oct 2023 12:31:40 +0100
From: Werner Koch <wk@gnupg.org>
To: last-call@ietf.org
References: <169861156708.56445.1745773510604358899@ietfa.amsl.com>
X-message-flag: Mails containing HTML will not be read! Please send only plain text.
Jabber-ID: wk@jabber.gnupg.org
Date: Tue, 31 Oct 2023 12:31:34 +0100
In-Reply-To: <169861156708.56445.1745773510604358899@ietfa.amsl.com> (The IESG's message of "Sun, 29 Oct 2023 13:32:47 -0700")
Message-ID: <87r0lbvxih.fsf@jacob.g10code.de>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=Etacs_S/Key_National_Biosurveillance_Integration_Center_Ronco_Disast"; micalg="pgp-sha256"; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/last-call/H6RmSWvc5LOcJjSig-i4awjQFFw>
Subject: Re: [Last-Call] [openpgp] Last Call: <draft-ietf-openpgp-crypto-refresh-12.txt> (OpenPGP) to Proposed Standard
X-BeenThere: last-call@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: IETF Last Calls <last-call.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/last-call>, <mailto:last-call-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/last-call/>
List-Post: <mailto:last-call@ietf.org>
List-Help: <mailto:last-call-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/last-call>, <mailto:last-call-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Oct 2023 11:31:57 -0000

Hi!

As initiater of the updated OpenPGP specification, as long time editor
of that draft, and as principal author of GnuPG (a major implementation
of the standard and de-facto successor of PGP) I see severe problems
with the draft.

Earlier versions of the following comments have been circulated in
closed groups of stakeholders.

Salam-Shalom,

   Werner
   
                   ---------------------------------
                    A CRITIQUE ON A FORK OF OPENPGP
                   ---------------------------------

                               2023-10-31


The IETF OpenPGP Working Group (WG) at some point decided to give up on
its charter to produce an updated specification and instead started to
re-invent that standard.  Whether this is in line with IETF rules is
questionable:

The charter says:
      Other work related to OpenPGP may be entertained by the
      working group as long as it does not interfere with the
      completion of the RFC4880 revision. As the revision of
      RFC4880 is the primary goal of the working group, other work
      may be undertaken, so long as [...]

Given that new features and discussions for larger updates of the
specification delayed a new RFC for many years and were the reason for
closing the WG in 2017 and re-opening in 2020, I propose to go back to
the last commonly agreed upon draft or to conclude the WG on the grounds
that no rough consensus could be found.


Symmetric Mode
══════════════

  It seems that this new scheme was introduced for the benefit of
  allowing GCM as yet another encryption mode.  GCM is a counter mode
  and, as can be seen by the large changes required, hard to get right.
  Meanwhile we have GCM in CMS (the core of S/MIME) because Microsoft
  decided to go this way.  However, OpenPGP has taken its decisions
  based on technical soundness and not based on larger vendor,
  government or committee decision.

  The WG once decided to go with OCB and EAX.  EAX was only added to
  avoid possible patent problems.  However, in the 4.5 years since the
  introduction of EAX the OCB patent expired.  Thus there is no more
  reason to reject OCB and it should be declared as RECOMMENDED mode
  with the intention to make it a MUST mode in some future OpenPGP.  It
  can also be expected that FIPS-140 will eventually allow OCB.

  My suggestion: Drop all the new AEAD ideas and use what has been
  deployed and agreed upon in this very WG a long time ago.  Further,
  turn OCB into MUST and EAX into MAY (only for backward compatibility
  to deployed implementations).


Padding Packet
══════════════

  A padding packet is introduced with the idea to mitigate traffic
  analysis.  However, it is suggested to use random data for the content
  of this packet and thus this packet opens a huge covert channel.  This
  is especially concerning for institutional users efforts regarding
  Data Leak Prevention (DLP).  Suggestions to use padding based on a
  verifiable seed, were rejected despite that this is the standard
  method to do padding.

  This padding idea has come up in discussion every once in a while over
  the last 25 years and has always been rejected because it does not
  belong into the encryption layer but into the application (plaintext)
  layer.


Changes to the ECDH Encryption
══════════════════════════════

  ECDH is the standard way to do encryption with elliptic curves.  For
  OpenPGP ECDH has been specified in RFC-6637 from 2012 and been
  implemented by PGP and GnuPG even a year earlier.  Instead of keeping
  this solid specification some details have been changed without a
  sound reason.


Proliferation for Algorithms
════════════════════════════

  The new draft not only allow the use of GCM as a third encryption mode
  but adds a couple of other required algorithms:

  • HKDF
  • Argon2 [1]
  • Optional modes [2]

  I joined the AES conference in 2000 on Phil Zimmermann's wish to talk
  about algorithm proliferation.  We agreed on pushing the forthcoming
  AES along with our MDC extension, get Twofish and so out of the focus,
  and in general resist to add new algorithms.  That is for the simple
  reason that neither PGP nor GnuPG wanted to maintain all new
  algorithms until eternity.  Later we had to do a political compromise
  to allow Camellia for the use in Japan and Brainpool curves for
  European use.  We should really stick to this and not support
  algorithms which are just a substitute for existing crypto building
  blocks.  Since added complexity makes a review harder and the larger
  codebase has to be maintained indefinitely for backwards
  compatibility.


Removal of Useful Real World Features
═════════════════════════════════════

  For example: in 2016 a 'm' flag was introduced to indicate that the
  plaintext shall be interpreted as MIME data.  This has been removed
  along with deprecating the traditional 't' flag to distingusih between
  binary and text data.  Having the ability to easily detect MIME data
  is for example required to process attachments from web mail clients
  or in air-gaped environments.

  The designated revoker feature has also been deprecated with the
  rationale that a better method is to achieve this with an “escrowed”
  revocation, pre-created by the user.  In fact, GnuPG creates such a
  revocation certificate since version 2.1 (release in 2014), to
  mitigate the common problem of a forgotten password.  But this is not
  a replacement for corporate needs: The designated revoker is an
  important feature to manage a large scale deployments of OpenPGP keys
  and acts as a CRL replacement.


Removal of Security Fixes
═════════════════════════

  Due to an implementation bug in PGP 5 the meta data of a signed file
  was not covered by the signatures.  RFC-4880 didn't fixed that for
  backward compatibility.  However, users were often surprised when they
  learned that the shown filename and file data could be changed while
  keeping the signature intact.  With the introduction of the new v5
  signature packet format, the opportunity to fix that was taken.
  However, the crypto-refresh group then introduced v6 signatures and
  removed the fix [3] with the flimsy explanation that the way to
  populate that the field is not clear in a theoretical
  encrypt-then-sign scenario and that signatures could not be detached
  and reattached (which is obvioulsy wrong).  A later proposed fix for
  v4 signature packets (Meta Hash subpacket) [4] was not considered.


Salted signature issue
══════════════════════

  Salted signature have been introduced with the idea that they might
  mitigate a choosen prefix attack in the same way as they will do for a
  certain SHA-1 based Web-of-Trust attack.  No research for that
  statement has been cited just an assumuption and a concern related to
  fault attacks on EdDSA for Wireguard-like protocols [5].  However,
  such fault attacks can be more securely detected by checking the
  signature after verification in the same way as the mitigation to
  Lenstra's attack on RSA's CRT.

  Anyway, the major concern here is that this adds another 32 octet
  covert channel to each message (and also blow the signature up by 64
  octets) In this case it is not an optional feature as with the padding
  packet.  This is a clear violation of best current practices in
  sensitive areas where signed mails are mandatory and encryption is not
  enforced (or monitored by a gateway).


Regression from Deployed Formats and Standard Behavior
══════════════════════════════════════════════════════

  In general the crypto-refresh draft tends to ignore the requirements
  of long term storage needs and considers online communication and
  software deployment pattern as the major OpenPGP usage.  Data and
  software life-cycle management has not been adequately taken in
  consideration and thus the draft regresses heavily from 30 years of
  PGP history.



Footnotes
─────────

[1] “It is RECOMMENDED that implementations use Argon2.”

[2] EAX, OCB, GCM and a way to define even more

[3] See commit 390055d408d8611bc37707f81c13215cf5a05348

[4] See commit a397df29704ab65c2565d12ec29a703efbaf7f8c

[5] https://mailarchive.ietf.org/arch/msg/cfrg/Ev8hgyojKeObXMZ7SF2m3_yekMo/


-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein