1=pod 2 3=head1 NAME 4 5EVP_chacha20, 6EVP_chacha20_poly1305 7- EVP ChaCha20 stream cipher 8 9=head1 SYNOPSIS 10 11 #include <openssl/evp.h> 12 13 const EVP_CIPHER *EVP_chacha20(void) 14 const EVP_CIPHER *EVP_chacha20_poly1305(void) 15 16=head1 DESCRIPTION 17 18The ChaCha20 stream cipher for EVP. 19 20=over 4 21 22=item EVP_chacha20() 23 24The ChaCha20 stream cipher. The key length is 256 bits, the IV is 128 bits long. 25The first 32 bits consists of a counter in little-endian order followed by a 96 26bit nonce. For example a nonce of: 27 28000000000000000000000002 29 30With an initial counter of 42 (2a in hex) would be expressed as: 31 322a000000000000000000000000000002 33 34=item EVP_chacha20_poly1305() 35 36Authenticated encryption with ChaCha20-Poly1305. Like EVP_chacha20(), the key 37is 256 bits and the IV is 96 bits. This supports additional authenticated data 38(AAD) and produces a 128-bit authentication tag. See the 39L<EVP_EncryptInit(3)/AEAD Interface> section for more information. 40 41=back 42 43=head1 RETURN VALUES 44 45These functions return an B<EVP_CIPHER> structure that contains the 46implementation of the symmetric cipher. See L<EVP_CIPHER_meth_new(3)> for 47details of the B<EVP_CIPHER> structure. 48 49=head1 SEE ALSO 50 51L<evp(7)>, 52L<EVP_EncryptInit(3)>, 53L<EVP_CIPHER_meth_new(3)> 54 55=head1 COPYRIGHT 56 57Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved. 58 59Licensed under the OpenSSL license (the "License"). You may not use 60this file except in compliance with the License. You can obtain a copy 61in the file LICENSE in the source distribution or at 62L<https://www.openssl.org/source/license.html>. 63 64=cut 65 66