EVP_aes.pod 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. =pod
  2. =head1 NAME
  3. EVP_aes_128_cbc,
  4. EVP_aes_192_cbc,
  5. EVP_aes_256_cbc,
  6. EVP_aes_128_cfb,
  7. EVP_aes_192_cfb,
  8. EVP_aes_256_cfb,
  9. EVP_aes_128_cfb1,
  10. EVP_aes_192_cfb1,
  11. EVP_aes_256_cfb1,
  12. EVP_aes_128_cfb8,
  13. EVP_aes_192_cfb8,
  14. EVP_aes_256_cfb8,
  15. EVP_aes_128_ctr,
  16. EVP_aes_192_ctr,
  17. EVP_aes_256_ctr,
  18. EVP_aes_128_ecb,
  19. EVP_aes_192_ecb,
  20. EVP_aes_256_ecb,
  21. EVP_aes_128_ofb,
  22. EVP_aes_192_ofb,
  23. EVP_aes_256_ofb,
  24. EVP_aes_128_cbc_hmac_sha1,
  25. EVP_aes_256_cbc_hmac_sha1,
  26. EVP_aes_128_cbc_hmac_sha256,
  27. EVP_aes_256_cbc_hmac_sha256,
  28. EVP_aes_128_ccm,
  29. EVP_aes_192_ccm,
  30. EVP_aes_256_ccm,
  31. EVP_aes_128_gcm,
  32. EVP_aes_192_gcm,
  33. EVP_aes_256_gcm,
  34. EVP_aes_128_ocb,
  35. EVP_aes_192_ocb,
  36. EVP_aes_256_ocb,
  37. EVP_aes_128_wrap,
  38. EVP_aes_192_wrap,
  39. EVP_aes_256_wrap,
  40. EVP_aes_128_wrap_pad,
  41. EVP_aes_192_wrap_pad,
  42. EVP_aes_256_wrap_pad,
  43. EVP_aes_128_xts,
  44. EVP_aes_256_xts
  45. - EVP AES cipher
  46. =head1 SYNOPSIS
  47. =for comment generic
  48. #include <openssl/evp.h>
  49. const EVP_CIPHER *EVP_ciphername(void)
  50. I<EVP_ciphername> is used a placeholder for any of the described cipher
  51. functions, such as I<EVP_aes_128_cbc>.
  52. =head1 DESCRIPTION
  53. The AES encryption algorithm for EVP.
  54. =over 4
  55. =item EVP_aes_128_cbc(),
  56. EVP_aes_192_cbc(),
  57. EVP_aes_256_cbc(),
  58. EVP_aes_128_cfb(),
  59. EVP_aes_192_cfb(),
  60. EVP_aes_256_cfb(),
  61. EVP_aes_128_cfb1(),
  62. EVP_aes_192_cfb1(),
  63. EVP_aes_256_cfb1(),
  64. EVP_aes_128_cfb8(),
  65. EVP_aes_192_cfb8(),
  66. EVP_aes_256_cfb8(),
  67. EVP_aes_128_ctr(),
  68. EVP_aes_192_ctr(),
  69. EVP_aes_256_ctr(),
  70. EVP_aes_128_ecb(),
  71. EVP_aes_192_ecb(),
  72. EVP_aes_256_ecb(),
  73. EVP_aes_128_ofb(),
  74. EVP_aes_192_ofb(),
  75. EVP_aes_256_ofb()
  76. AES for 128, 192 and 256 bit keys in the following modes: CBC, CFB with 128-bit
  77. shift, CFB with 1-bit shift, CFB with 8-bit shift, CTR, ECB, and OFB.
  78. =item EVP_aes_128_cbc_hmac_sha1(),
  79. EVP_aes_256_cbc_hmac_sha1()
  80. Authenticated encryption with AES in CBC mode using SHA-1 as HMAC, with keys of
  81. 128 and 256 bits length respectively. The authentication tag is 160 bits long.
  82. WARNING: this is not intended for usage outside of TLS and requires calling of
  83. some undocumented ctrl functions. These ciphers do not conform to the EVP AEAD
  84. interface.
  85. =item EVP_aes_128_cbc_hmac_sha256(),
  86. EVP_aes_256_cbc_hmac_sha256()
  87. Authenticated encryption with AES in CBC mode using SHA256 (SHA-2, 256-bits) as
  88. HMAC, with keys of 128 and 256 bits length respectively. The authentication tag
  89. is 256 bits long.
  90. WARNING: this is not intended for usage outside of TLS and requires calling of
  91. some undocumented ctrl functions. These ciphers do not conform to the EVP AEAD
  92. interface.
  93. =item EVP_aes_128_ccm(),
  94. EVP_aes_192_ccm(),
  95. EVP_aes_256_ccm(),
  96. EVP_aes_128_gcm(),
  97. EVP_aes_192_gcm(),
  98. EVP_aes_256_gcm(),
  99. EVP_aes_128_ocb(),
  100. EVP_aes_192_ocb(),
  101. EVP_aes_256_ocb()
  102. AES for 128, 192 and 256 bit keys in CBC-MAC Mode (CCM), Galois Counter Mode
  103. (GCM) and OCB Mode respectively. These ciphers require additional control
  104. operations to function correctly, see the L<EVP_EncryptInit(3)/AEAD Interface>
  105. section for details.
  106. =item EVP_aes_128_wrap(),
  107. EVP_aes_192_wrap(),
  108. EVP_aes_256_wrap(),
  109. EVP_aes_128_wrap_pad(),
  110. EVP_aes_128_wrap(),
  111. EVP_aes_192_wrap(),
  112. EVP_aes_256_wrap(),
  113. EVP_aes_192_wrap_pad(),
  114. EVP_aes_128_wrap(),
  115. EVP_aes_192_wrap(),
  116. EVP_aes_256_wrap(),
  117. EVP_aes_256_wrap_pad()
  118. AES key wrap with 128, 192 and 256 bit keys, as according to RFC 3394 section
  119. 2.2.1 ("wrap") and RFC 5649 section 4.1 ("wrap with padding") respectively.
  120. =item EVP_aes_128_xts(),
  121. EVP_aes_256_xts()
  122. AES XTS mode (XTS-AES) is standardized in IEEE Std. 1619-2007 and described in NIST
  123. SP 800-38E. The XTS (XEX-based tweaked-codebook mode with ciphertext stealing)
  124. mode was designed by Prof. Phillip Rogaway of University of California, Davis,
  125. intended for encrypting data on a storage device.
  126. XTS-AES provides confidentiality but not authentication of data. It also
  127. requires a key of double-length for protection of a certain key size.
  128. In particular, XTS-AES-128 (B<EVP_aes_128_xts>) takes input of a 256-bit key to
  129. achieve AES 128-bit security, and XTS-AES-256 (B<EVP_aes_256_xts>) takes input
  130. of a 512-bit key to achieve AES 256-bit security.
  131. =back
  132. =head1 RETURN VALUES
  133. These functions return an B<EVP_CIPHER> structure that contains the
  134. implementation of the symmetric cipher. See L<EVP_CIPHER_meth_new(3)> for
  135. details of the B<EVP_CIPHER> structure.
  136. =head1 SEE ALSO
  137. L<evp(7)>,
  138. L<EVP_EncryptInit(3)>,
  139. L<EVP_CIPHER_meth_new(3)>
  140. =head1 COPYRIGHT
  141. Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
  142. Licensed under the OpenSSL license (the "License"). You may not use
  143. this file except in compliance with the License. You can obtain a copy
  144. in the file LICENSE in the source distribution or at
  145. L<https://www.openssl.org/source/license.html>.
  146. =cut