From 0eabd81445d096eca59b14586f5716649ef12527 Mon Sep 17 00:00:00 2001 From: Fabio Scotoni <34964387+fscoto@users.noreply.github.com> Date: Fri, 11 Jun 2021 20:33:40 +0200 Subject: [PATCH] doc: Use canonical spelling of ChaCha20 Spelled with two capital Cs according to Daniel J. Bernstein. "ChaCha, a variant of Salsa20." Workshop Record of SASC 2008: The State of the Art of Stream Ciphers. --- AUTHORS.md | 4 +-- README.md | 2 +- .../man3/advanced/crypto_chacha20.3monocypher | 32 +++++++++---------- .../advanced/crypto_hchacha20.3monocypher | 16 +++++----- .../advanced/crypto_ietf_chacha20.3monocypher | 14 ++++---- doc/man/man3/crypto_blake2b.3monocypher | 8 ++--- doc/man/man3/crypto_key_exchange.3monocypher | 6 ++-- doc/man/man3/crypto_lock.3monocypher | 18 +++++------ .../crypto_chacha20_encrypt.3monocypher | 14 ++++---- doc/man/man3/intro.3monocypher | 8 ++--- 10 files changed, 61 insertions(+), 61 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 007c4c6..91394d0 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,7 +1,7 @@ Designers --------- -- **Chacha20:** Daniel J. Bernstein. +- **ChaCha20:** Daniel J. Bernstein. - **Poly1305:** Daniel J. Bernstein. - **Blake2:** Jean-Philippe Aumasson, Christian Winnerlein, Samuel Neves, and Zooko Wilcox-O'Hearn @@ -13,7 +13,7 @@ Designers Implementors ------------ -- **Chacha20:** Loup Vaillant, implemented from spec. +- **ChaCha20:** Loup Vaillant, implemented from spec. - **Poly1305:** Loup Vaillant, implemented from spec. - **Blake2b:** Loup Vaillant, implemented from spec. - **Argon2i:** Loup Vaillant, implemented from spec. diff --git a/README.md b/README.md index 217df5d..1b13569 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ speed of [Libsodium][]. Features -------- -- [Authenticated Encryption][AEAD] with XChacha20 and Poly1305 +- [Authenticated Encryption][AEAD] with XChaCha20 and Poly1305 (RFC 8439). - [Hashing][HASH] with Blake2b. - [Password Hashing][PWH] with Argon2i. diff --git a/doc/man/man3/advanced/crypto_chacha20.3monocypher b/doc/man/man3/advanced/crypto_chacha20.3monocypher index a6e1c2b..bcfd03f 100644 --- a/doc/man/man3/advanced/crypto_chacha20.3monocypher +++ b/doc/man/man3/advanced/crypto_chacha20.3monocypher @@ -10,7 +10,7 @@ .\" .\" Copyright (c) 2017-2019 Loup Vaillant .\" Copyright (c) 2018 Michael Savage -.\" Copyright (c) 2017, 2019-2020 Fabio Scotoni +.\" Copyright (c) 2017, 2019-2021 Fabio Scotoni .\" All rights reserved. .\" .\" @@ -40,7 +40,7 @@ .\" .\" ---------------------------------------------------------------------------- .\" -.\" Written in 2017-2020 by Loup Vaillant, Michael Savage and Fabio Scotoni +.\" Written in 2017-2021 by Loup Vaillant, Michael Savage and Fabio Scotoni .\" .\" To the extent possible under law, the author(s) have dedicated all copyright .\" and related neighboring rights to this software to the public domain @@ -50,7 +50,7 @@ .\" with this software. If not, see .\" .\" -.Dd March 31, 2020 +.Dd June 11, 2021 .Dt CRYPTO_CHACHA20 3MONOCYPHER .Os .Sh NAME @@ -58,7 +58,7 @@ .Nm crypto_chacha20_ctr , .Nm crypto_xchacha20 , .Nm crypto_xchacha20_ctr -.Nd Chacha20 and XChacha20 encryption functions +.Nd ChaCha20 and XChaCha20 encryption functions .Sh SYNOPSIS .In monocypher.h .Ft void @@ -96,10 +96,10 @@ .Fa "uint64_t ctr" .Fc .Sh DESCRIPTION -These functions provide an interface for the Chacha20 encryption +These functions provide an interface for the ChaCha20 encryption primitive. .Pp -Chacha20 is a low-level primitive. +ChaCha20 is a low-level primitive. Consider using authenticated encryption, implemented by .Xr crypto_lock 3monocypher . .Pp @@ -127,7 +127,7 @@ It is allowed to be .Dv NULL , in which case it will be interpreted as an all zero input. .Fa cipher_text -will then contain the raw Chacha20 stream. +will then contain the raw ChaCha20 stream. .It Fa cipher_text The encrypted message. .It Fa text_size @@ -152,12 +152,12 @@ must either be the same buffer (for in-place encryption), or non-overlapping. .Pp .Fn crypto_chacha20 -performs a Chacha20 operation. +performs a ChaCha20 operation. It uses an 8-byte nonce, which is too small to be selected at random. Use a message counter as a nonce instead. .Pp .Fn crypto_xchacha20 -performs an XChacha20 operation. +performs an XChaCha20 operation. It uses a 24-byte nonce, which is large enough to be selected at random. .Pp .Fn crypto_xchacha20 @@ -211,7 +211,7 @@ The .Fn crypto_chacha20_ctr and .Fn crypto_xchacha20_ctr -perform a Chacha20 or XChacha20 encryption, respectively, +perform a ChaCha20 or XChaCha20 encryption, respectively, starting the stream at the block .Fa ctr (which is the byte @@ -325,8 +325,8 @@ crypto_wipe(plain_text, 500); .Xr crypto_wipe 3monocypher , .Xr intro 3monocypher .Sh STANDARDS -These functions implement Chacha20 and XChacha20. -Chacha20 is described in: +These functions implement ChaCha20 and XChaCha20. +ChaCha20 is described in: .Rs .%A Daniel J. Bernstein .%J SASC 2008 \(en The State of the Art of Stream Ciphers @@ -334,9 +334,9 @@ Chacha20 is described in: .%T ChaCha, a variant of Salsa20 .Re The nonce and counter sizes were modified in RFC 8439. -XChacha20 derives from Chacha20 the same way XSalsa20 derives from +XChaCha20 derives from ChaCha20 the same way XSalsa20 derives from Salsa20, and benefits from the same security reduction (proven secure -as long as Chacha20 itself is secure). +as long as ChaCha20 itself is secure). .Sh HISTORY .Fn crypto_chacha20 , .Fn crypto_chacha20_ctr , @@ -354,7 +354,7 @@ and that were deprecated in Monocypher 3.0.0. .Sh SECURITY CONSIDERATIONS .Ss Encrypted does not mean secure -Chacha20 only protects against eavesdropping, not forgeries. +ChaCha20 only protects against eavesdropping, not forgeries. Most applications need protection against forgeries to be properly secure. To ensure the integrity of a message, use Blake2b in keyed mode, or @@ -387,5 +387,5 @@ Secrets should not dwell in memory longer than needed. Use .Xr crypto_wipe 3monocypher to erase secrets you no longer need. -For Chacha20, this means the key and in some cases the +For ChaCha20, this means the key and in some cases the plain text itself. diff --git a/doc/man/man3/advanced/crypto_hchacha20.3monocypher b/doc/man/man3/advanced/crypto_hchacha20.3monocypher index f7fa0b3..45e8726 100644 --- a/doc/man/man3/advanced/crypto_hchacha20.3monocypher +++ b/doc/man/man3/advanced/crypto_hchacha20.3monocypher @@ -10,7 +10,7 @@ .\" .\" Copyright (c) 2017-2019 Loup Vaillant .\" Copyright (c) 2017-2018 Michael Savage -.\" Copyright (c) 2019-2020 Fabio Scotoni +.\" Copyright (c) 2019-2021 Fabio Scotoni .\" All rights reserved. .\" .\" @@ -40,7 +40,7 @@ .\" .\" ---------------------------------------------------------------------------- .\" -.\" Written in 2017-2020 by Loup Vaillant, Michael Savage and Fabio Scotoni +.\" Written in 2017-2021 by Loup Vaillant, Michael Savage and Fabio Scotoni .\" .\" To the extent possible under law, the author(s) have dedicated all copyright .\" and related neighboring rights to this software to the public domain @@ -50,12 +50,12 @@ .\" with this software. If not, see .\" .\" -.Dd March 2, 2020 +.Dd June 11, 2021 .Dt CRYPTO_HCHACHA20 3MONOCYPHER .Os .Sh NAME .Nm crypto_hchacha20 -.Nd HChacha20 special-purpose hashing +.Nd HChaCha20 special-purpose hashing .Sh SYNOPSIS .In monocypher.h .Ft void @@ -68,7 +68,7 @@ .Fn crypto_hchacha20 provides a not-so-cryptographic hash. It may be used for some specific purposes, such as X25519 key -derivation, or XChacha20 initialisation. +derivation, or XChaCha20 initialisation. If in doubt, do not use directly. Use .Xr crypto_blake2b 3monocypher @@ -80,7 +80,7 @@ The arguments are: A sufficiently random key, such as the output of .Xr crypto_x25519 3monocypher . .It Fa in -The space reserved for the Chacha20 nonce and counter. +The space reserved for the ChaCha20 nonce and counter. It does not have to be random. .It Fa out A cryptographically secure random number @@ -117,8 +117,8 @@ crypto_wipe(in , 16); .Xr crypto_key_exchange 3monocypher , .Xr intro 3monocypher .Sh STANDARDS -This function implements HChacha20. -HChacha20 derives from Chacha20 the same way HSalsa20 derives from +This function implements HChaCha20. +HChaCha20 derives from ChaCha20 the same way HSalsa20 derives from Salsa20. .Sh HISTORY The diff --git a/doc/man/man3/advanced/crypto_ietf_chacha20.3monocypher b/doc/man/man3/advanced/crypto_ietf_chacha20.3monocypher index a08d580..1346ea2 100644 --- a/doc/man/man3/advanced/crypto_ietf_chacha20.3monocypher +++ b/doc/man/man3/advanced/crypto_ietf_chacha20.3monocypher @@ -8,7 +8,7 @@ .\" .\" ---------------------------------------------------------------------------- .\" -.\" Copyright (c) 2019-2020 Fabio Scotoni +.\" Copyright (c) 2019-2021 Fabio Scotoni .\" All rights reserved. .\" .\" @@ -38,7 +38,7 @@ .\" .\" ---------------------------------------------------------------------------- .\" -.\" Written in 2019-2020 by Fabio Scotoni +.\" Written in 2019-2021 by Fabio Scotoni .\" .\" To the extent possible under law, the author(s) have dedicated all copyright .\" and related neighboring rights to this software to the public domain @@ -48,13 +48,13 @@ .\" with this software. If not, see .\" .\" -.Dd March 31, 2020 +.Dd June 11, 2021 .Dt CRYPTO_IETF_CHACHA20 3MONOCYPHER .Os .Sh NAME .Nm crypto_ietf_chacha20 , .Nm crypto_ietf_chacha20_ctr -.Nd IETF Chacha20 encryption functions +.Nd IETF ChaCha20 encryption functions .Sh SYNOPSIS .In monocypher.h .Ft void @@ -75,7 +75,7 @@ .Fa "const uint32_t ctr" .Fc .Sh DESCRIPTION -These functions provide an interface for the Chacha20 encryption +These functions provide an interface for the ChaCha20 encryption primitive as specified by the IETF in RFC 8439. They are provided strictly for compatibility with existing systems or strict standards compliance. @@ -83,7 +83,7 @@ New programs are strongly encouraged to use .Xr crypto_xchacha20 3monocypher instead. .Pp -Chacha20 is a low-level primitive. +ChaCha20 is a low-level primitive. Consider using authenticated encryption, implemented by .Xr crypto_lock 3monocypher . .Pp @@ -124,7 +124,7 @@ plus one if there was a remainder. .Xr crypto_wipe 3monocypher , .Xr intro 3monocypher .Sh STANDARDS -These functions implement Chacha20 as described in RFC 8439. +These functions implement ChaCha20 as described in RFC 8439. .Sh HISTORY .Fn crypto_ietf_chacha20 and diff --git a/doc/man/man3/crypto_blake2b.3monocypher b/doc/man/man3/crypto_blake2b.3monocypher index 67f59d1..9473baf 100644 --- a/doc/man/man3/crypto_blake2b.3monocypher +++ b/doc/man/man3/crypto_blake2b.3monocypher @@ -10,7 +10,7 @@ .\" .\" Copyright (c) 2017-2019 Loup Vaillant .\" Copyright (c) 2018 Michael Savage -.\" Copyright (c) 2017, 2020 Fabio Scotoni +.\" Copyright (c) 2017, 2020-2021 Fabio Scotoni .\" All rights reserved. .\" .\" @@ -40,7 +40,7 @@ .\" .\" ---------------------------------------------------------------------------- .\" -.\" Written in 2017-2020 by Loup Vaillant, Michael Savage and Fabio Scotoni +.\" Written in 2017-2021 by Loup Vaillant, Michael Savage and Fabio Scotoni .\" .\" To the extent possible under law, the author(s) have dedicated all copyright .\" and related neighboring rights to this software to the public domain @@ -50,7 +50,7 @@ .\" with this software. If not, see .\" .\" -.Dd March 31, 2020 +.Dd June 11, 2021 .Dt CRYPTO_BLAKE2B 3MONOCYPHER .Os .Sh NAME @@ -102,7 +102,7 @@ .Fc .Sh DESCRIPTION BLAKE2b is a fast cryptographically secure hash, based on the ideas of -Chacha20. +ChaCha20. It is faster than MD5, yet just as secure as SHA-3. .Pp Note that BLAKE2b itself is not suitable for hashing passwords and diff --git a/doc/man/man3/crypto_key_exchange.3monocypher b/doc/man/man3/crypto_key_exchange.3monocypher index b0ce22f..62df574 100644 --- a/doc/man/man3/crypto_key_exchange.3monocypher +++ b/doc/man/man3/crypto_key_exchange.3monocypher @@ -10,7 +10,7 @@ .\" .\" Copyright (c) 2017-2021 Loup Vaillant .\" Copyright (c) 2017-2018 Michael Savage -.\" Copyright (c) 2017, 2019-2020 Fabio Scotoni +.\" Copyright (c) 2017, 2019-2021 Fabio Scotoni .\" Copyright (c) 2020 Richard Walmsley .\" All rights reserved. .\" @@ -52,7 +52,7 @@ .\" with this software. If not, see .\" .\" -.Dd June 6, 2021 +.Dd June 11, 2021 .Dt CRYPTO_KEY_EXCHANGE 3MONOCYPHER .Os .Sh NAME @@ -166,7 +166,7 @@ crypto_wipe(your_sk, 32); .Sh STANDARDS These functions implement X25519, described in RFC 7748. .Fn crypto_key_exchange -uses HChacha20 as well. +uses HChaCha20 as well. .Sh HISTORY The .Fn crypto_key_exchange diff --git a/doc/man/man3/crypto_lock.3monocypher b/doc/man/man3/crypto_lock.3monocypher index 32af8c0..79e4454 100644 --- a/doc/man/man3/crypto_lock.3monocypher +++ b/doc/man/man3/crypto_lock.3monocypher @@ -10,7 +10,7 @@ .\" .\" Copyright (c) 2017-2019 Loup Vaillant .\" Copyright (c) 2017-2018 Michael Savage -.\" Copyright (c) 2017, 2019-2020 Fabio Scotoni +.\" Copyright (c) 2017, 2019-2021 Fabio Scotoni .\" All rights reserved. .\" .\" @@ -40,7 +40,7 @@ .\" .\" ---------------------------------------------------------------------------- .\" -.\" Written in 2017-2020 by Loup Vaillant, Michael Savage and Fabio Scotoni +.\" Written in 2017-2021 by Loup Vaillant, Michael Savage and Fabio Scotoni .\" .\" To the extent possible under law, the author(s) have dedicated all copyright .\" and related neighboring rights to this software to the public domain @@ -50,7 +50,7 @@ .\" with this software. If not, see .\" .\" -.Dd February 29, 2020 +.Dd June 11, 2021 .Dt CRYPTO_LOCK 3MONOCYPHER .Os .Sh NAME @@ -315,10 +315,10 @@ if (crypto_unlock(text, key, nonce, mac, text, 12)) { .Xr crypto_wipe 3monocypher , .Xr intro 3monocypher .Sh STANDARDS -These functions implement RFC 8439, with XChacha20 instead of Chacha20. -XChacha20 derives from Chacha20 the same way XSalsa20 derives from +These functions implement RFC 8439, with XChaCha20 instead of ChaCha20. +XChaCha20 derives from ChaCha20 the same way XSalsa20 derives from Salsa20, and benefits from the same security reduction (proven secure -as long as Chacha20 itself is secure). +as long as ChaCha20 itself is secure). .Sh HISTORY The .Fn crypto_lock @@ -330,9 +330,9 @@ and .Fn crypto_unlock_aead were introduced in Monocypher 1.1.0. In Monocypher 2.0.0, the underlying algorithms for these functions were -changed from a custom XChacha20/Poly1305 construction to an -implementation of RFC 7539 (now RFC 8439) with XChacha20 instead of -Chacha20. +changed from a custom XChaCha20/Poly1305 construction to an +implementation of RFC 7539 (now RFC 8439) with XChaCha20 instead of +ChaCha20. The .Fn crypto_lock_encrypt and diff --git a/doc/man/man3/deprecated/crypto_chacha20_encrypt.3monocypher b/doc/man/man3/deprecated/crypto_chacha20_encrypt.3monocypher index a987ed7..fadbca2 100644 --- a/doc/man/man3/deprecated/crypto_chacha20_encrypt.3monocypher +++ b/doc/man/man3/deprecated/crypto_chacha20_encrypt.3monocypher @@ -8,7 +8,7 @@ .\" .\" ---------------------------------------------------------------------------- .\" -.\" Copyright (c) 2019 Fabio Scotoni +.\" Copyright (c) 2019, 2021 Fabio Scotoni .\" All rights reserved. .\" .\" @@ -38,7 +38,7 @@ .\" .\" ---------------------------------------------------------------------------- .\" -.\" Written in 2019 by Fabio Scotoni +.\" Written in 2019 and 2021 by Fabio Scotoni .\" .\" To the extent possible under law, the author(s) have dedicated all copyright .\" and related neighboring rights to this software to the public domain @@ -48,7 +48,7 @@ .\" with this software. If not, see .\" .\" -.Dd December 2, 2019 +.Dd June 11, 2021 .Dt CRYPTO_CHACHA20_ENCRYPT 3MONOCYPHER .Os .Sh NAME @@ -57,7 +57,7 @@ .Nm crypto_chacha20_x_init , .Nm crypto_chacha20_stream , .Nm crypto_chacha20_set_ctr -.Nd deprecated Chacha20 and XChacha20 encryption functions +.Nd deprecated ChaCha20 and XChaCha20 encryption functions .Sh SYNOPSIS .In monocypher.h .Ft void @@ -91,7 +91,7 @@ .Fa "uint64_t ctr" .Fc .Sh DESCRIPTION -These functions provided an incremental interface for the Chacha20 +These functions provided an incremental interface for the ChaCha20 cipher. They are deprecated in favor of .Xr crypto_chacha20 3monocypher , @@ -111,14 +111,14 @@ The new functions This means that input ciphertexts or plaintexts whose lengths are not exactly multiples of 64 bytes advance the counter, even though there is theoretically some space left -in a Chacha20 block. +in a ChaCha20 block. New applications should design their code so that either the protocl is not reliant on the counter covering the entire text (e.g. by cutting input into independent chunks) or inputs are always such that their lengths are multiples of 64 bytes (e.g. by buffering input until 64 bytes have been obtained). .Pp -To obtain the raw Chacha20 stream previously provided by +To obtain the raw ChaCha20 stream previously provided by .Fn crypto_chacha20_stream , pass .Dv NULL diff --git a/doc/man/man3/intro.3monocypher b/doc/man/man3/intro.3monocypher index be8c2c4..7a43dc8 100644 --- a/doc/man/man3/intro.3monocypher +++ b/doc/man/man3/intro.3monocypher @@ -10,7 +10,7 @@ .\" .\" Copyright (c) 2017-2021 Loup Vaillant .\" Copyright (c) 2018 Michael Savage -.\" Copyright (c) 2017, 2019-2020 Fabio Scotoni +.\" Copyright (c) 2017, 2019-2021 Fabio Scotoni .\" All rights reserved. .\" .\" @@ -50,7 +50,7 @@ .\" with this software. If not, see .\" .\" -.Dd June 6, 2021 +.Dd June 11, 2021 .Dt INTRO 3MONOCYPHER .Os .Sh NAME @@ -64,9 +64,9 @@ hashing and key derivation, key exchange, and public key signatures. .Xr crypto_lock 3monocypher and .Xr crypto_unlock 3monocypher -use the Chacha20 cipher and the Poly1305 one-time authenticator. +use the ChaCha20 cipher and the Poly1305 one-time authenticator. .Pp -Chacha20 is a stream cipher based on a cryptographic hash function. +ChaCha20 is a stream cipher based on a cryptographic hash function. It runs efficiently on a wide variety of hardware, and unlike AES naturally runs in constant time on all hardware. .Pp -- 2.47.3