Correction about AES using IV in docs

This commit is contained in:
Anthony Hu
2022-03-23 13:34:28 -04:00
parent d864fc9a3f
commit 1bc71da1df

View File

@ -207,12 +207,12 @@ WOLFSSL_API int wc_AesCtrEncrypt(Aes* aes, byte* out,
/*! /*!
\ingroup AES \ingroup AES
\brief This function is a one-block encrypt of the input block, in, into \brief This function is a one-block encrypt of the input block, in, into
the output block, out. It uses the key and iv (initialization vector) the output block, out. It uses the key of the provided AES structure, which
of the provided AES structure, which should be initialized with should be initialized with wc_AesSetKey before calling this function.
wc_AesSetKey before calling this function. It is only enabled if the wc_AesSetKey should have been called with the iv set to NULL. This is only
configure option WOLFSSL_AES_DIRECT is enabled. __Warning:__ In nearly all enabled if the configure option WOLFSSL_AES_DIRECT is enabled. __Warning:__
use cases ECB mode is considered to be less secure. Please avoid using ECB In nearly all use cases ECB mode is considered to be less secure. Please
APIs directly whenever possible avoid using ECB APIs directly whenever possible.
\return int integer values corresponding to wolfSSL error or success \return int integer values corresponding to wolfSSL error or success
status status
@ -240,13 +240,12 @@ WOLFSSL_API int wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in);
/*! /*!
\ingroup AES \ingroup AES
\brief This function is a one-block decrypt of the input block, in, into \brief This function is a one-block decrypt of the input block, in, into
the output block, out. It uses the key and iv (initialization vector) of the output block, out. It uses the key of the provided AES structure, which
the provided AES structure, which should be initialized with wc_AesSetKey should be initialized with wc_AesSetKey before calling this function.
before calling this function. It is only enabled if the configure option wc_AesSetKey should have been called with the iv set to NULL. This is only
WOLFSSL_AES_DIRECT is enabled, and there is support for direct AES enabled if the configure option WOLFSSL_AES_DIRECT is enabled. __Warning:__
encryption on the system in question. __Warning:__ In nearly all use cases In nearly all use cases ECB mode is considered to be less secure. Please
ECB mode is considered to be less secure. Please avoid using ECB APIs avoid using ECB APIs directly whenever possible.
directly whenever possible
\return int integer values corresponding to wolfSSL error or success \return int integer values corresponding to wolfSSL error or success
status status