From d4f877ea3c16cd6b3c2b7071b427aff6af2ae345 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 29 Apr 2021 15:30:25 -0400 Subject: [PATCH] Reference the newer ChaCha20-Poly1305 RFC. Just some errata applied, otherwise the same. https://tools.ietf.org/rfcdiff?url2=rfc8439&url1=rfc7539 Change-Id: I0cf5d50eeca7840d0ab99c54e06f1008ac423211 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/47264 Reviewed-by: Adam Langley --- crypto/cipher_extra/test/chacha20_poly1305_tests.txt | 2 +- crypto/poly1305/poly1305_tests.txt | 4 ++-- include/openssl/aead.h | 2 +- include/openssl/chacha.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crypto/cipher_extra/test/chacha20_poly1305_tests.txt b/crypto/cipher_extra/test/chacha20_poly1305_tests.txt index 018eb56b3..4e6552986 100644 --- a/crypto/cipher_extra/test/chacha20_poly1305_tests.txt +++ b/crypto/cipher_extra/test/chacha20_poly1305_tests.txt @@ -1,4 +1,4 @@ -# Test vector from RFC 7539 Section 2.8.1. +# Test vector from RFC 8439 Section 2.8.1. KEY: 808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f NONCE: 070000004041424344454647 diff --git a/crypto/poly1305/poly1305_tests.txt b/crypto/poly1305/poly1305_tests.txt index 611007a05..adaa022ae 100644 --- a/crypto/poly1305/poly1305_tests.txt +++ b/crypto/poly1305/poly1305_tests.txt @@ -1,11 +1,11 @@ -# RFC 7539, section 2.5.2. +# RFC 8439, section 2.5.2. Key = 85d6be7857556d337f4452fe42d506a80103808afb0db2fd4abff6af4149f51b Input = "Cryptographic Forum Research Group" MAC = a8061dc1305136c6c22b8baf0c0127a9 -# RFC 7539, section A.3. +# RFC 8439, section A.3. Key = 0000000000000000000000000000000000000000000000000000000000000000 Input = 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 diff --git a/include/openssl/aead.h b/include/openssl/aead.h index eb51de13d..38eb0761c 100644 --- a/include/openssl/aead.h +++ b/include/openssl/aead.h @@ -122,7 +122,7 @@ OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_192_gcm(void); OPENSSL_EXPORT const EVP_AEAD *EVP_aead_aes_256_gcm(void); // EVP_aead_chacha20_poly1305 is the AEAD built from ChaCha20 and -// Poly1305 as described in RFC 7539. +// Poly1305 as described in RFC 8439. OPENSSL_EXPORT const EVP_AEAD *EVP_aead_chacha20_poly1305(void); // EVP_aead_xchacha20_poly1305 is ChaCha20-Poly1305 with an extended nonce that diff --git a/include/openssl/chacha.h b/include/openssl/chacha.h index 684fc5b0b..cfbaa7568 100644 --- a/include/openssl/chacha.h +++ b/include/openssl/chacha.h @@ -23,7 +23,7 @@ extern "C" { // ChaCha20. // -// ChaCha20 is a stream cipher. See https://tools.ietf.org/html/rfc7539. +// ChaCha20 is a stream cipher. See https://tools.ietf.org/html/rfc8439. // CRYPTO_chacha_20 encrypts |in_len| bytes from |in| with the given key and