1EVP_CHACHA20(3ossl)                 OpenSSL                EVP_CHACHA20(3ossl)
2
3
4

NAME

6       EVP_chacha20, EVP_chacha20_poly1305 - EVP ChaCha20 stream cipher
7

SYNOPSIS

9        #include <openssl/evp.h>
10
11        const EVP_CIPHER *EVP_chacha20(void);
12        const EVP_CIPHER *EVP_chacha20_poly1305(void);
13

DESCRIPTION

15       The ChaCha20 stream cipher for EVP.
16
17       EVP_chacha20()
18           The ChaCha20 stream cipher. The key length is 256 bits, the IV is
19           128 bits long.  The first 32 bits consists of a counter in little-
20           endian order followed by a 96 bit nonce. For example a nonce of:
21
22           000000000000000000000002
23
24           With an initial counter of 42 (2a in hex) would be expressed as:
25
26           2a000000000000000000000000000002
27
28       EVP_chacha20_poly1305()
29           Authenticated encryption with ChaCha20-Poly1305. Like
30           EVP_chacha20(), the key is 256 bits and the IV is 96 bits. This
31           supports additional authenticated data (AAD) and produces a 128-bit
32           authentication tag. See the "AEAD Interface" in EVP_EncryptInit(3)
33           section for more information.
34

NOTES

36       Developers should be aware of the negative performance implications of
37       calling these functions multiple times and should consider using
38       EVP_CIPHER_fetch(3) instead.  See "Performance" in crypto(7) for
39       further information.
40

RETURN VALUES

42       These functions return an EVP_CIPHER structure that contains the
43       implementation of the symmetric cipher. See EVP_CIPHER_meth_new(3) for
44       details of the EVP_CIPHER structure.
45

SEE ALSO

47       evp(7), EVP_EncryptInit(3), EVP_CIPHER_meth_new(3)
48
50       Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved.
51
52       Licensed under the Apache License 2.0 (the "License").  You may not use
53       this file except in compliance with the License.  You can obtain a copy
54       in the file LICENSE in the source distribution or at
55       <https://www.openssl.org/source/license.html>.
56
57
58
593.1.1                             2023-08-31               EVP_CHACHA20(3ossl)
Impressum