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