XChaCha: eXtended-nonce ChaCha and AEAD_XChaCha20_Poly1305
draft-arciszewski-xchacha-02

Document Type Active Internet-Draft (individual)
Last updated 2018-10-11
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
(No Working Group)                                        S. Arciszewski
Internet-Draft                            Paragon Initiative Enterprises
Intended status: Informational                          October 11, 2018
Expires: April 14, 2019

       XChaCha: eXtended-nonce ChaCha and AEAD_XChaCha20_Poly1305
                      draft-arciszewski-xchacha-02

Abstract

   The eXtended-nonce ChaCha cipher construction (XChaCha) allows for
   ChaCha-based ciphersuites to accept a 192-bit nonce with similar
   guarantees to the original construction, except with a much lower
   probability of nonce misuse occurring.  This enables XChaCha
   constructions to be stateless, while retaining the same security
   assumptions as ChaCha.

   This document defines XChaCha20, which uses HChaCha20 to convert the
   key and part of the nonce into a subkey, which is in turn used with
   the remainder of the nonce with ChaCha20 to generate a pseudorandom
   keystream (e.g. for message encryption).

   This document also defines AEAD_XChaCha20_Poly1305, a variant of
   [RFC7539] that utilizes the XChaCha20 construction in place of
   ChaCha20.

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 https://datatracker.ietf.org/drafts/current/.

   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 April 14, 2019.

Arciszewski              Expires April 14, 2019                 [Page 1]
Internet-Draft                                              October 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.  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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Notation and Conventions  . . . . . . . . . . . . . . . .   3
   2.  AEAD_XChaCha20_Poly1305 . . . . . . . . . . . . . . . . . . .   3
     2.1.  Motivation for XChaCha20-Poly1305 . . . . . . . . . . . .   3
     2.2.  HChaCha20 . . . . . . . . . . . . . . . . . . . . . . . .   4
       2.2.1.  Test Vector for the HChaCha20 Block Function  . . . .   5
     2.3.  XChaCha20 . . . . . . . . . . . . . . . . . . . . . . . .   5
       2.3.1.  XChaCha20 Pseudocode  . . . . . . . . . . . . . . . .   6
   3.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     3.1.  Normative References  . . . . . . . . . . . . . . . . . .   6
     3.2.  URIs  . . . . . . . . . . . . . . . . . . . . . . . . . .   6
   Appendix A.  Additional Test Vectors  . . . . . . . . . . . . . .   7
     A.1.  Example and Test Vector for AEAD_XCHACHA20_POLY1305 . . .   7
     A.2.  Example and Test Vector for XChaCha20 . . . . . . . . . .   9
     A.3.  Developer-Friendly Test Vectors . . . . . . . . . . . . .  10
       A.3.1.  AEAD_XCHACHA20_POLY1305 . . . . . . . . . . . . . . .  10
       A.3.2.  XChaCha20 . . . . . . . . . . . . . . . . . . . . . .  11
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  12

1.  Introduction

   AEAD constructions (Authenticated Encryption with Associated Data)
   allow for message confidentiality to be assured even in the presence
   of adaptive chosen-ciphertext attacks, but they're known to be
   brittle to nonce-misuse conditions [1].

   Several nonce misuse resistant cipher constructions have been
   proposed over the years, including AES-SIV ([RFC5297]), AES-GCM-SIV
   [2], and several CAESAR candidates [3].

Arciszewski              Expires April 14, 2019                 [Page 2]
Internet-Draft                                              October 2018

   However, a more straightforward strategy can prevent nonce misuse
   conditions in environments where a large number of messages are
   encrypted.  Simply use a large enough nonce such that applications
   can generate them randomly for each message and the probability of a
   collision remains low.

   To this end, we propose a solution that is already implemented in
Show full document text