aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorBernd Edlinger <[email protected]>2026-08-15 07:33:34 +0200
committerBernd Edlinger <[email protected]>2026-10-19 08:04:41 +0200
commitcfb89e50a06a00917bdfa6142665ffee08ca79bd (patch)
treee601d644138108736cf0f3e170ed33b8eae671a2 /crypto/evp
parentfips: improve reporting of failure CRNG tests (diff)
downloadopenssl-cfb89e50a06a00917bdfa6142665ffee08ca79bd.tar.gz
openssl-cfb89e50a06a00917bdfa6142665ffee08ca79bd.zip
Make it clear that chacha20 is a stream cipher
by explicitly using the define EVP_CIPH_STREAM_CIPHER instead of the value 0 for the mode parameter. Reviewed-by: Jakub Zelenka <[email protected]> Reviewed-by: Frederik Wedel-Heinen <[email protected]> Merge-date: Mon Oct 19 06:04:43 2026 Merged-from: https://github.com/openssl/openssl/pull/32393
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/e_chacha20_poly1305.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/evp/e_chacha20_poly1305.c b/crypto/evp/e_chacha20_poly1305.c
index 78dbe45ce44..1a44e29b535 100644
--- a/crypto/evp/e_chacha20_poly1305.c
+++ b/crypto/evp/e_chacha20_poly1305.c
@@ -19,7 +19,7 @@ static const EVP_CIPHER chacha20 = {
1, /* block_size */
CHACHA_KEY_SIZE, /* key_len */
CHACHA_CTR_SIZE, /* iv_len, 128-bit counter in the context */
- EVP_CIPH_CUSTOM_IV | EVP_CIPH_ALWAYS_CALL_INIT,
+ EVP_CIPH_STREAM_CIPHER | EVP_CIPH_CUSTOM_IV | EVP_CIPH_ALWAYS_CALL_INIT,
EVP_ORIG_GLOBAL
};
@@ -35,7 +35,7 @@ static const EVP_CIPHER chacha20_poly1305 = {
1, /* block_size */
CHACHA_KEY_SIZE, /* key_len */
12, /* iv_len, 96-bit nonce in the context */
- EVP_CIPH_FLAG_AEAD_CIPHER | EVP_CIPH_CUSTOM_IV | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT | EVP_CIPH_CUSTOM_COPY | EVP_CIPH_FLAG_CUSTOM_CIPHER | EVP_CIPH_CUSTOM_IV_LENGTH,
+ EVP_CIPH_STREAM_CIPHER | EVP_CIPH_FLAG_AEAD_CIPHER | EVP_CIPH_CUSTOM_IV | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT | EVP_CIPH_CUSTOM_COPY | EVP_CIPH_FLAG_CUSTOM_CIPHER | EVP_CIPH_CUSTOM_IV_LENGTH,
EVP_ORIG_GLOBAL
};