ChaCha20 and Poly1305 for IETF Protocols
RFC 8439

Document Type RFC - Informational (June 2018; No errata)
Obsoletes RFC 7539
Last updated 2018-06-19
Stream IRTF
Formats plain text pdf html bibtex
IETF conflict review conflict-review-nir-cfrg-rfc7539bis
Stream IRTF state Published RFC (wg milestone: Feb 2018 - Send "ChaCha20 and P... )
Consensus Boilerplate Yes
RFC Editor Note (last changed )
IESG IESG state RFC 8439 (Informational)
Telechat date
Responsible AD (None)
Send notices to irsg@irtf.org
IANA IANA review state IANA - Not OK
IANA action state RFC-Ed-Ack
Internet Research Task Force (IRTF)                               Y. Nir
Request for Comments: 8439                                      Dell EMC
Obsoletes: 7539                                               A. Langley
Category: Informational                                     Google, Inc.
ISSN: 2070-1721                                                June 2018

                ChaCha20 and Poly1305 for IETF Protocols

Abstract

   This document defines the ChaCha20 stream cipher as well as the use
   of the Poly1305 authenticator, both as stand-alone algorithms and as
   a "combined mode", or Authenticated Encryption with Associated Data
   (AEAD) algorithm.

   RFC 7539, the predecessor of this document, was meant to serve as a
   stable reference and an implementation guide.  It was a product of
   the Crypto Forum Research Group (CFRG).  This document merges the
   errata filed against RFC 7539 and adds a little text to the Security
   Considerations section.

Status of This Memo

   This document is not an Internet Standards Track specification; it is
   published for informational purposes.

   This document is a product of the Internet Research Task Force
   (IRTF).  The IRTF publishes the results of Internet-related research
   and development activities.  These results might not be suitable for
   deployment.  This RFC represents the consensus of the Crypto Forum
   Research Group of the Internet Research Task Force (IRTF).  Documents
   approved for publication by the IRSG are not candidates for any level
   of Internet Standard; see Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8439.

Nir & Langley                 Informational                     [Page 1]
RFC 8439                   ChaCha20 & Poly1305                 June 2018

Copyright Notice

   Copyright (c) 2018 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.

Nir & Langley                 Informational                     [Page 2]
RFC 8439                   ChaCha20 & Poly1305                 June 2018

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   4
     1.1.  Conventions Used in This Document . . . . . . . . . . . .   5
   2.  The Algorithms  . . . . . . . . . . . . . . . . . . . . . . .   5
     2.1.  The ChaCha Quarter Round  . . . . . . . . . . . . . . . .   5
       2.1.1.  Test Vector for the ChaCha Quarter Round  . . . . . .   6
     2.2.  A Quarter Round on the ChaCha State . . . . . . . . . . .   6
       2.2.1.  Test Vector for the Quarter Round on the ChaCha State   7
     2.3.  The ChaCha20 Block Function . . . . . . . . . . . . . . .   7
       2.3.1.  The ChaCha20 Block Function in Pseudocode . . . . . .   9
       2.3.2.  Test Vector for the ChaCha20 Block Function . . . . .  10
     2.4.  The ChaCha20 Encryption Algorithm . . . . . . . . . . . .  11
       2.4.1.  The ChaCha20 Encryption Algorithm in Pseudocode . . .  12
       2.4.2.  Example and Test Vector for the ChaCha20 Cipher . . .  12
     2.5.  The Poly1305 Algorithm  . . . . . . . . . . . . . . . . .  14
       2.5.1.  The Poly1305 Algorithms in Pseudocode . . . . . . . .  16
       2.5.2.  Poly1305 Example and Test Vector  . . . . . . . . . .  17
     2.6.  Generating the Poly1305 Key Using ChaCha20  . . . . . . .  18
       2.6.1.  Poly1305 Key Generation in Pseudocode . . . . . . . .  19
       2.6.2.  Poly1305 Key Generation Test Vector . . . . . . . . .  19
     2.7.  A Pseudorandom Function for Crypto Suites Based on
           ChaCha/Poly1305 . . . . . . . . . . . . . . . . . . . . .  20
     2.8.  AEAD Construction . . . . . . . . . . . . . . . . . . . .  20
       2.8.1.  Pseudocode for the AEAD Construction  . . . . . . . .  23
       2.8.2.  Example and Test Vector for AEAD_CHACHA20_POLY1305  .  23
   3.  Implementation Advice . . . . . . . . . . . . . . . . . . . .  25
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  26
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  27
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  27
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  27
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  28
   Appendix A.  Additional Test Vectors  . . . . . . . . . . . . . .  30
Show full document text