[openpgp] Request on Adding ChaCha20-Poly1305 to the OpenPGP Standardization

"Tanveer.Salim" <Tanveer.Salim@protonmail.com> Wed, 15 April 2020 17:53 UTC

Return-Path: <Tanveer.Salim@protonmail.com>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost []) by ietfa.amsl.com (Postfix) with ESMTP id E31063A0D1D for <openpgp@ietfa.amsl.com>; Wed, 15 Apr 2020 10:53:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Status: No, score=-2.1 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_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=protonmail.com
Received: from mail.ietf.org ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id 2r6BpQypsnYg for <openpgp@ietfa.amsl.com>; Wed, 15 Apr 2020 10:53:41 -0700 (PDT)
Received: from mail-40130.protonmail.ch (mail-40130.protonmail.ch []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B31333A0D1C for <openpgp@ietf.org>; Wed, 15 Apr 2020 10:53:40 -0700 (PDT)
Date: Wed, 15 Apr 2020 17:53:31 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1586973217; bh=RbJD481IZkqeJ9MM9t46Ux9aWFnKxhDvuu9k/Da2ogU=; h=Date:To:From:Reply-To:Subject:From; b=IlDwXw6RmZhOfZx7CpXjHXsc52prlYZsYQiO2Z594SNTJmMJP7nrDgbI0DouZTbGE hrBEi00bkEUJkKBOcZw9SYqndiY7/kM/MDSIdXYMoEfPm/85H2zrb2vYs2AY4GU4zy FvoWnd5ytSAmD2QC9guzNa6bXElxzTYy7abPuYjI=
To: "openpgp@ietf.org" <openpgp@ietf.org>
From: "Tanveer.Salim" <Tanveer.Salim@protonmail.com>
Reply-To: "Tanveer.Salim" <Tanveer.Salim@protonmail.com>
Message-ID: <j9dQb5ZX4J72RggcAWKiafQOwaDebpEJnA2j3Yks5ahI9kNECdscL9nGmyP-wzXN7UY5Gtc4w_HjsaJHX3IUf8xBbCJv38JtOYQgr0GNGX0=@protonmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/Fh3kUl1WT9Pa2Z2aly18FrWGMWU>
Subject: [openpgp] Request on Adding ChaCha20-Poly1305 to the OpenPGP Standardization
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 15 Apr 2020 17:53:44 -0000

Dear IETF,

Hello. I am Tanveer Salim and am a Computer Engineering Student from Texas Tech University.

Firstly, I would like to thank you for taking the time to work on GNUPG for all these years.

I personally am really glad you are willing to ensure people have a sound option for secure communication on the internet.

I discussed the pros and cons of using ChaCha20-Poly1305 first with the ProtonMail Security Team on a Reddit Forum:


and as of now with the creators of WireGuard VPN.

ProtonMail users and the ProtonMail Security Team admitted that most hardware devices already have hardware support for AES-GC 256-bit encryption and therefore AES-GCM 256-bit will be faster than a pure-software implementation of ChaCha20.

Jason Dononfeld, one of the creators of WireGuard VPN, said that although that was true ARX-512 bit vector extensions for the Intel and AMD instruction set architectures will allow hardware-accelerated implementations of ChaCha20-Poly1305 to run even faster than hardware-accelerated implemetnations of AES (e.g. AES-NI). (https://www.wireguard.com/papers/wireguard.pdf)

This was why Jason Dononfeld and the rest of the WireGuard VPN team made ChaCha20-Poly1305 the primary, exclusive AEAD in their VPN.

For now, support for AVX-512 bit instructions is not as widespread just yet. But that should be the case in a matter of a few years as cited in the WireGuard VPN Whitepaper.(https://en.wikipedia.org/wiki/AVX-512).

For now, although ProtonMail is mostly correct in their saying that hardware-accelerated AES is faster than pure-software, Jason Dononfeld definitely seems to be making a strong argument for using ChaCha20-Poly1305. Soon in the future, ARX-512 bit vector extensions will allow hardware-accelerated ChaCha20-Poly1305 to run faster than hardware-accelerated AES.

ProtonMail did admit it would be a good idea to try to add the ChaCha20-Poly1305 to OpenPGP and WebCrypto. Afterwards, they would be happy to add support for ChaCha20-Poly1305.

This is perhaps also why other projects are adding support for ChaCha20-Poly1305 as we speak.

Other famous projects that are using ChaCha20-Poly1305 in their works include NordPass (https://nordpass.com/features/xchacha20-encryption/), KeePassXC, and SSH (http://blog.djm.net.au/2013/11/chacha20-and-poly1305-in-openssh.html).

Considering the growing usage of ChaCha20-Poly1305, would you consider adding ChaCha20-Poly1305 as an additional cipher to your draft of OpenPGP standardization. I noticed you were working on a new draft for OpenPGP in RFC 4880bis: (https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-09).

Libgcrypt already supports ChaCha20 and Poly1305 individually after all. But OpenPGP does not yet accept ChaCha20-Poly1305 as an additional/experimental cipher yet.

Since you are the lead developer of GNUPG, which is the world's most influential implementation of OpenPGP, you could certainly make it an additional cipher to OpenPGP.

With saying all of this, I would like to ask if you are now considering to add ChaCha20-Poly1305 itself to the OpenPGP standardization?

I thank you for any responses to send back to me.

I actually first emailed Werner Koch directly and has given me permission to reiterate his response:


Werner Koch's Response Below:


Thanks for the long writeup but you should better direct this mail to
the IETF WG list: openpgp@ietf.org which is the appropriate place for
such requests.

The set of cipher algorithms in OpenPGP is long and actually longer than
we like it.  Most of the extra cipher algorithms are there for political
reasons (e.g. Camellia) and in practice not used.  We have settled long
ago for AES because that is a the best block cipher algorithm we have
and main stream CPUs provide hardware acceleration for it.

Regarding encryption modes, we are using CFB+MDC and are preparing to
move on to OCB and EAX (with the latter only there for political/patent
fears).  This allows us keep on using AES.  Changing to a stream cipher,
as you propose is very unlikely.

You may however use the experimental range of algo identifiers for
ChaCha but that won't be useful for production.  Replacing algorithms
takes years and we are not even there to enable OCB or EAX modes.



if you want to post to the WG list, feel free to include this mail.

Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

So Mr. Koch admits that there are political problems and technical issues with adding ChaCha20-Poly1305. Political in the sense that many implementations will be offended if the switch was made from AES to ChaCha20-Poly1305. I am not saying we should necessarily switch the official standard from AES to ChaCha20-Poly1305. Just to add ChaCha20-Poly1305 as an alternative. The technical challenge was that even the OCB and EAX mode meant to improve AES performance were not even added yet.

Finally, I have one more additional question.

According to the Autocrypt website, it would be great if Argon2 and SCrypt key derivation functions to OpenPGP as well. But Autocrypt admitted that this is yet to be done. (https://autocrypt.readthedocs.io/en/latest/faq.html)

So will the IETF be trying to add support for both key derivation functions in the current draft for RFC 4880bis?

I thank the IETF for updating OpenPGP and taking the time to send back any replies to me.


Tanveer Salim

Sent with ProtonMail Secure Email.