skip to main content
10.1145/3460120.3484814acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

The Security of ChaCha20-Poly1305 in the Multi-User Setting

Published: 13 November 2021 Publication History

Abstract

The ChaCha20-Poly1305 AEAD scheme is being increasingly widely deployed in practice. Practitioners need proven security bounds in order to set data limits and rekeying intervals for the scheme. But the formal security analysis of ChaCha20-Poly1305 currently lags behind that of AES-GCM. The only extant analysis (Procter, 2014) contains a flaw and is only for the single-user setting. We rectify this situation. We prove a multi-user security bound on the AEAD security of ChaCha20-Poly1305 and establish the tightness of each term in our bound through matching attacks. We show how our bound differs both qualitatively and quantitatively from the known bounds for AES-GCM, highlighting how subtle design choices lead to distinctive security properties. We translate our bound to the nonce-randomized setting employed in TLS 1.3 and elsewhere, and we additionally improve the corresponding security bounds for GCM. Finally, we provide a simple yet stronger variant of ChaCha20-Poly1305 that addresses the deficiencies highlighted by our analysis.

Supplementary Material

MP4 File (CCS21-fp593.mp4)
The ChaCha20-Poly1305 AEAD scheme is being increasingly widely deployed in practice. Practitioners need proven security bounds in order to set data limits and rekeying intervals for the scheme. But the formal security analysis of ChaCha20-Poly1305 currently lags behind that of AES-GCM. The only extant analysis (Procter, 2014) contains a flaw and is only for the single-user setting. In this presentation, we will show how we rectified this situation by proving a tight multi-user security bound on the AEAD security of ChaCha20-Poly1305 and, in the process, how we additionally improved the security bounds for GCM, when used in a nonce-randomized setting as in TLS 1.3 and elsewhere. We also show how our bound differs both qualitatively and quantitatively from the known bounds for AES-GCM, highlighting how subtle design choices lead to distinctive security properties.

References

[1]
Mohamed Ahmed Abdelraheem, Peter Beelen, Andrey Bogdanov, and Elmar Tischhauser. 2015. Twisted Polynomials and Forgery Attacks on GCM. In EUROCRYPT 2015, Part I (LNCS, Vol. 9056), Elisabeth Oswald and Marc Fischlin (Eds.). Springer, Heidelberg, 762--786. https://doi.org/10.1007/978--3--662--46800--5_29
[2]
Divesh Aggarwal and Priyanka Mukhopadhyay. 2018. Improved Algorithms for the Shortest Vector Problem and the Closest Vector Problem in the Infinity Norm. In 29th International Symposium on Algorithms and Computation (ISAAC 2018) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 123), Wen-Lian Hsu, Der-Tsai Lee, and Chung-Shou Liao (Eds.). Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 35:1--35:13. https://doi.org/10.4230/LIPIcs.ISAAC.2018.35
[3]
Mihir Bellare and Phillip Rogaway. 1996. The Exact Security of Digital Signatures: How to Sign with RSA and Rabin. In EUROCRYPT'96 (LNCS, Vol. 1070), Ueli M. Maurer (Ed.). Springer, Heidelberg, 399--416. https://doi.org/10.1007/3--540--68339--9_34
[4]
Mihir Bellare and Björn Tackmann. 2016. The Multi-user Security of Authenticated Encryption: AES-GCM in TLS 1.3. In CRYPTO 2016, Part I (LNCS, Vol. 9814), Matthew Robshaw and Jonathan Katz (Eds.). Springer, Heidelberg, 247--276. https://doi.org/10.1007/978--3--662--53018--4_10
[5]
Daniel J Bernstein. 2005 a. The Poly1305-AES message-authentication code. In International Workshop on Fast Software Encryption. Springer, 32--49.
[6]
Daniel J Bernstein. 2005 b. Salsa20 specification. eSTREAM Project algorithm description, http://www.ecrypt.eu.org/stream/salsa20pf.html (2005).
[7]
Daniel J Bernstein. 2008. ChaCha, a variant of Salsa20. In Workshop Record of SASC, Vol. 8. 3--5.
[8]
Eli Biham. 2002. How to decrypt or even substitute DES-encrypted messages in 228 steps. Inform. Process. Lett., Vol. 84, 3 (2002), 117--124. https://doi.org/10.1016/S0020-0190(02)00269--7
[9]
Alex Biryukov, Sourav Mukhopadhyay, and Palash Sarkar. 2006. Improved Time-Memory Trade-Offs with Multiple Data. In Selected Areas in Cryptography, Bart Preneel and Stafford Tavares (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 110--127.
[10]
Priyanka Bose, Viet Tung Hoang, and Stefano Tessaro. 2018. Revisiting AES-GCM-SIV: Multi-user Security, Faster Key Derivation, and Better Bounds. In EUROCRYPT 2018, Part I (LNCS, Vol. 10820), Jesper Buus Nielsen and Vincent Rijmen (Eds.). Springer, Heidelberg, 468--499. https://doi.org/10.1007/978--3--319--78381--9_18
[11]
Shan Chen and John P. Steinberger. 2014. Tight Security Bounds for Key-Alternating Ciphers. In EUROCRYPT 2014 (LNCS, Vol. 8441), Phong Q. Nguyen and Elisabeth Oswald (Eds.). Springer, Heidelberg, 327--350. https://doi.org/10.1007/978--3--642--55220--5_19
[12]
Marc Fischlin, Felix Günther, and Christian Janson. 2020. Robust Channels: Handling Unreliable Networks in the Record Layers of QUIC and DTLS 1.3. Cryptology ePrint Archive, Report 2020/718. https://eprint.iacr.org/2020/718.
[13]
Shoni Gilboa and Shay Gueron. 2021. The advantage of truncated permutations. Discrete Applied Mathematics, Vol. 294 (2021), 214--223. https://doi.org/10.1016/j.dam.2021.01.029
[14]
Felix Günther, Martin Thomson, and Christopher A. Wood. 2021. Usage Limits on AEAD Algorithms -- draft-irtf-cfrg-aead-limits-03. https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-aead-limits-03.
[15]
Viet Tung Hoang, Stefano Tessaro, and Aishwarya Thiruvengadam. 2018. The Multi-user Security of GCM, Revisited: Tight Bounds for Nonce Randomization. In ACM CCS 2018, David Lie, Mohammad Mannan, Michael Backes, and XiaoFeng Wang (Eds.). ACM Press, 1429--1440. https://doi.org/10.1145/3243734.3243816
[16]
Tetsu Iwata, Keisuke Ohashi, and Kazuhiko Minematsu. 2012. Breaking and Repairing GCM Security Proofs. In CRYPTO 2012 (LNCS, Vol. 7417), Reihaneh Safavi-Naini and Ran Canetti (Eds.). Springer, Heidelberg, 31--49. https://doi.org/10.1007/978--3--642--32009--5_3
[17]
KryptosLogic. 2021. Faster Poly1305 key multicollisions. Kryptos Logic Blog. https://www.kryptoslogic.com/blog/2021/01/faster-poly1305-key-multicollisions.
[18]
A Langley. 2013. ChaCha20 and Poly1305 based Cipher suites for TLS, draft-agl-tls-chacha20poly1305-00. IETF Internet Draft. https://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-00.
[19]
Atul Luykx, Bart Mennink, and Kenneth G. Paterson. 2017. Analyzing Multi-key Security Degradation. In ASIACRYPT 2017, Part II (LNCS, Vol. 10625), Tsuyoshi Takagi and Thomas Peyrin (Eds.). Springer, Heidelberg, 575--605. https://doi.org/10.1007/978--3--319--70697--9_20
[20]
Atul Luykx and Kenneth G Paterson. 2015. Limits on authenticated encryption use in TLS. Personal webpage: http://www. isg. rhul. ac. uk/ kp/TLS-AEbounds. pdf (2015).
[21]
David A. McGrew and John Viega. 2004. The Security and Performance of the Galois/Counter Mode (GCM) of Operation. In INDOCRYPT 2004 (LNCS, Vol. 3348), Anne Canteaut and Kapalee Viswanathan (Eds.). Springer, Heidelberg, 343--355.
[22]
Daniele Micciancio and Shafi Goldwasser. 2012. Complexity of lattice problems: a cryptographic perspective. Vol. 671. Springer Science & Business Media.
[23]
Y. Nir and A. Langley. 2018. ChaCha20 and Poly1305 for IETF Protocols. RFC 8439 (Informational). https://doi.org/10.17487/RFC8439
[24]
Yuichi Niwa, Keisuke Ohashi, Kazuhiko Minematsu, and Tetsu Iwata. 2015. GCM Security Bounds Reconsidered. In FSE 2015 (LNCS, Vol. 9054), Gregor Leander (Ed.). Springer, Heidelberg, 385--407. https://doi.org/10.1007/978--3--662--48116--5_19
[25]
Jacques Patarin. 2009. The "Coefficients H" Technique (Invited Talk). In SAC 2008 (LNCS, Vol. 5381), Roberto Maria Avanzi, Liam Keliher, and Francesco Sica (Eds.). Springer, Heidelberg, 328--345. https://doi.org/10.1007/978--3--642-04159--4_21
[26]
Gordon Procter. 2014. A Security Analysis of the Composition of ChaCha20 and Poly1305. Cryptology ePrint Archive, Report 2014/613. https://eprint.iacr.org/2014/613.
[27]
Gordon Procter and Carlos Cid. 2015. On Weak Keys and Forgery Attacks Against Polynomial-Based MAC Schemes. Journal of Cryptology, Vol. 28, 4 (Oct. 2015), 769--795. https://doi.org/10.1007/s00145-014--9178--9
[28]
Martin Raab and Angelika Steger. 1998. "Balls into Bins" -- A Simple and Tight Analysis. In Randomization and Approximation Techniques in Computer Science, Michael Luby, José D. P. Rolim, and Maria Serna (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 159--170.
[29]
E. Rescorla. 2018. The Transport Layer Security (TLS) Protocol Version 1.3. RFC 8446 (Proposed Standard). https://doi.org/10.17487/RFC8446
[30]
Eric Rescorla, Hannes Tschofenig, and Nagendra Modadugu. 2021. The Datagram Transport Layer Security (DTLS) Protocol Version 1.3 -- draft-ietf-tls-dtls13--43. https://tools.ietf.org/html/draft-ietf-tls-dtls13--43.
[31]
M. Thomson (Ed.) and S. Turner (Ed.). 2021. Using TLS to Secure QUIC. RFC 9001 (Proposed Standard). https://doi.org/10.17487/RFC9001

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CCS '21: Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security
November 2021
3558 pages
ISBN:9781450384544
DOI:10.1145/3460120
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 November 2021

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. AEAD
  2. ChaCha20-Poly1305
  3. GCM
  4. TLS 1.3
  5. multi-user security
  6. nonce randomization
  7. tight security

Qualifiers

  • Research-article

Conference

CCS '21
Sponsor:
CCS '21: 2021 ACM SIGSAC Conference on Computer and Communications Security
November 15 - 19, 2021
Virtual Event, Republic of Korea

Acceptance Rates

Overall Acceptance Rate 1,261 of 6,999 submissions, 18%

Upcoming Conference

CCS '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)87
  • Downloads (Last 6 weeks)3
Reflects downloads up to 03 Feb 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media