Using ChaCha20-Poly1305 Authenticated Encryption in the Cryptographic Message Syntax (CMS)

The information below is for an old version of the document
Document Type Active Internet-Draft (curdle WG)
Last updated 2016-11-24 (latest revision 2016-10-28)
Replaces draft-housley-cms-chacha20-poly1305
Stream IETF
Intended RFC status Proposed Standard
Formats plain text pdf html bibtex
Stream WG state Submitted to IESG for Publication
Document shepherd Daniel Migault
Shepherd write-up Show (last changed 2016-11-01)
IESG IESG state AD Evaluation::Revised I-D Needed
Consensus Boilerplate Yes
Telechat date
Responsible AD Stephen Farrell
Send notices to "Daniel Migault" <>
Internet-Draft                                                R. Housley
Intended status: Standards Track                          Vigil Security
Expires: 28 April 2017                                   28 October 2016

             Using ChaCha20-Poly1305 Authenticated Encryption
                 in the Cryptographic Message Syntax (CMS)



   This document describes the conventions for using ChaCha20-Poly1305
   Authenticated Encryption in the Cryptographic Message Syntax (CMS).
   ChaCha20-Poly1305 is an authenticated encryption algorithm
   constructed of the ChaCha stream cipher and Poly1305 authenticator.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 22 March 2017.

Copyright Notice

   Copyright (c) 2016 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
   ( 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.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Housley           Using AEAD_CHACHA20_POLY1305 with CMS         [Page 1]
Internet-Draft                                           28 October 2016

1.  Introduction

   This document specifies the conventions for using the
   ChaCha20-Poly1305 Authenticated Encryption as the content-
   authenticated-encryption algorithm with the Cryptographic Message
   Syntax (CMS) [CMS] authenticated-enveloped-data content type

   ChaCha [CHACHA] is a stream cipher developed by D. J. Bernstein in
   2008.  It is a refinement of Salsa20, which is one of the ciphers in
   the eSTREAM portfolio [ESTREAM].

   ChaCha20 is the 20-round variant of ChaCha; it requires a 256-bit key
   and a 96-bit nonce.  ChaCha20 is described in [FORIETF].

   Poly1305 [POLY1305] is a Wegman-Carter, one-time authenticator
   designed by D. J. Bernstein.  Poly1305 produces a 16-byte
   authentication tag; it requires a 256-bit, single-use key.  Poly1305
   is also described in [FORIETF].

   ChaCha20 and Poly1305 have been designed for high performance
   software implementations.  They can typically be implemented with few
   resources and inexpensive operations, making them suitable on a wide
   range of systems.  They have also been designed to minimize leakage
   of information through side channels.

1.1.  The ChaCha20 and Poly1305 AEAD Construction

   ChaCha20 and Poly1305 have been combined to create an Authenticated
   Encryption with Associated Data (AEAD) algorithm [AEAD].  This AEAD
   algorithm is often referred to as AEAD_CHACHA20_POLY1305, and it is
   described [FORIETF].

   AEAD_CHACHA20_POLY1305 accepts four inputs: a 256-bit key, a 96-bit
   nonce, an arbitrary length plaintext, and an arbitrary length
   additional authenticated data (AAD).  As the name implies, a nonce
   value cannot be used securely more than once with the same key.

   A high-level summary of AEAD_CHACHA20_POLY1305 authenticated
   encryption processing is:

      1) A 256-bit Poly1305 one-time key is generated from the input
         256-bit key and nonce using the procedure described in
         Section 2.6 of [FORIETF].

      2) The ChaCha20 encryption function is used to encrypt the
         plaintext, using the same 256-bit key and nonce, and with the
         initial counter set to 1.

Housley           Using AEAD_CHACHA20_POLY1305 with CMS         [Page 2]
Internet-Draft                                           28 October 2016

      3) The Poly1305 function is used with the Poly1305 key from
         step 1, and a buffer constructed as a concatenation of the AAD,
         padding1, the ciphertext, padding2, the length of the AAD in
         octets, and the length of the ciphertext in octets.  The
         padding fields contain up to 15 octets, with all bits set to
         zero, and the padding brings the total length of the buffer so
         far to an integral multiple of 16.  If the buffer length was
Show full document text