7 - EVP ChaCha20 stream cipher
11 #include <openssl/evp.h>
13 const EVP_CIPHER *EVP_chacha20(void)
14 const EVP_CIPHER *EVP_chacha20_poly1305(void)
18 The ChaCha20 stream cipher for EVP.
24 The ChaCha20 stream cipher. The key length is 256 bits, the IV is 128 bits long.
25 The first 32 bits consists of a counter in little-endian order followed by a 96
26 bit nonce. For example a nonce of:
28 000000000000000000000002
30 With an initial counter of 42 (2a in hex) would be expressed as:
32 2a000000000000000000000000000002
34 =item EVP_chacha20_poly1305()
36 Authenticated encryption with ChaCha20-Poly1305. Like EVP_chacha20(), the key
37 is 256 bits and the IV is 96 bits. This supports additional authenticated data
38 (AAD) and produces a 128-bit authentication tag. See the
39 L<EVP_EncryptInit(3)/AEAD Interface> section for more information.
45 These functions return an B<EVP_CIPHER> structure that contains the
46 implementation of the symmetric cipher. See L<EVP_CIPHER_meth_new(3)> for
47 details of the B<EVP_CIPHER> structure.
52 L<EVP_EncryptInit(3)>,
53 L<EVP_CIPHER_meth_new(3)>
57 Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
59 Licensed under the Apache License 2.0 (the "License"). You may not use
60 this file except in compliance with the License. You can obtain a copy
61 in the file LICENSE in the source distribution or at
62 L<https://www.openssl.org/source/license.html>.