More fixes to the crypto driver, made clear which functions are stream ciphers. Fixed documentation errors.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12778 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
b68fc92f0b
commit
7e5944e6a9
|
@ -359,7 +359,7 @@ cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_ECB == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-ECB.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
*
|
||||
|
@ -367,8 +367,8 @@ cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp,
|
|||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @return The operation status.
|
||||
|
@ -400,7 +400,7 @@ cryerror_t cry_lld_encrypt_AES_ECB(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-ECB.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
*
|
||||
|
@ -408,8 +408,8 @@ cryerror_t cry_lld_encrypt_AES_ECB(CRYDriver *cryp,
|
|||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @return The operation status.
|
||||
|
@ -443,7 +443,7 @@ cryerror_t cry_lld_decrypt_AES_ECB(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_CBC == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-CBC.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
*
|
||||
|
@ -451,8 +451,8 @@ cryerror_t cry_lld_decrypt_AES_ECB(CRYDriver *cryp,
|
|||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector
|
||||
|
@ -487,7 +487,7 @@ cryerror_t cry_lld_encrypt_AES_CBC(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-CBC.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
*
|
||||
|
@ -495,8 +495,8 @@ cryerror_t cry_lld_encrypt_AES_CBC(CRYDriver *cryp,
|
|||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector
|
||||
|
@ -533,16 +533,13 @@ cryerror_t cry_lld_decrypt_AES_CBC(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_CFB == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-CFB.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector
|
||||
|
@ -577,16 +574,13 @@ cryerror_t cry_lld_encrypt_AES_CFB(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-CFB.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector
|
||||
|
@ -623,16 +617,13 @@ cryerror_t cry_lld_decrypt_AES_CFB(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_CTR == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-CTR.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of 16
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector + counter, it contains
|
||||
|
@ -668,16 +659,13 @@ cryerror_t cry_lld_encrypt_AES_CTR(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-CTR.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of 16
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input cyphertext
|
||||
* @param[out] out buffer for the output plaintext
|
||||
* @param[in] iv 128 bits initial vector + counter, it contains
|
||||
|
@ -715,9 +703,7 @@ cryerror_t cry_lld_decrypt_AES_CTR(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_GCM == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-GCM.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
|
@ -725,8 +711,7 @@ cryerror_t cry_lld_decrypt_AES_CTR(CRYDriver *cryp,
|
|||
* in an unspecified way
|
||||
* @param[in] auth_size size of the data buffer to be authenticated
|
||||
* @param[in] auth_in buffer containing the data to be authenticated
|
||||
* @param[in] text_size size of the text buffer, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] text_size size of the text buffer
|
||||
* @param[in] text_in buffer containing the input plaintext
|
||||
* @param[out] text_out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits input vector
|
||||
|
@ -772,9 +757,7 @@ cryerror_t cry_lld_encrypt_AES_GCM(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-GCM.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
|
@ -782,8 +765,7 @@ cryerror_t cry_lld_encrypt_AES_GCM(CRYDriver *cryp,
|
|||
* in an unspecified way
|
||||
* @param[in] auth_size size of the data buffer to be authenticated
|
||||
* @param[in] auth_in buffer containing the data to be authenticated
|
||||
* @param[in] text_size size of the text buffer, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] text_size size of the text buffer
|
||||
* @param[in] text_in buffer containing the input plaintext
|
||||
* @param[out] text_out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits input vector
|
||||
|
|
|
@ -469,16 +469,13 @@ cryerror_t cryDecryptAES_CBC(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Encryption operation using AES-CFB.
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits input vector
|
||||
|
@ -502,7 +499,7 @@ cryerror_t cryEncryptAES_CFB(CRYDriver *cryp,
|
|||
const uint8_t *iv) {
|
||||
|
||||
osalDbgCheck((cryp != NULL) && (in != NULL) && (out != NULL) &&
|
||||
(iv != NULL) && ((size & (size_t)15) == (size_t)0));
|
||||
(iv != NULL) && (size > (size_t)0));
|
||||
|
||||
osalDbgAssert(cryp->state == CRY_READY, "not ready");
|
||||
|
||||
|
@ -524,16 +521,13 @@ cryerror_t cryEncryptAES_CFB(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-CFB.
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input cyphertext
|
||||
* @param[out] out buffer for the output plaintext
|
||||
* @param[in] iv 128 bits input vector
|
||||
|
@ -557,7 +551,7 @@ cryerror_t cryDecryptAES_CFB(CRYDriver *cryp,
|
|||
const uint8_t *iv) {
|
||||
|
||||
osalDbgCheck((cryp != NULL) && (in != NULL) && (out != NULL) &&
|
||||
(iv != NULL) && ((size & (size_t)15) == (size_t)0));
|
||||
(iv != NULL) && (size > (size_t)0));
|
||||
|
||||
osalDbgAssert(cryp->state == CRY_READY, "not ready");
|
||||
|
||||
|
@ -579,16 +573,13 @@ cryerror_t cryDecryptAES_CFB(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Encryption operation using AES-CTR.
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits input vector + counter, it contains
|
||||
|
@ -613,7 +604,7 @@ cryerror_t cryEncryptAES_CTR(CRYDriver *cryp,
|
|||
const uint8_t *iv) {
|
||||
|
||||
osalDbgCheck((cryp != NULL) && (in != NULL) && (out != NULL) &&
|
||||
(iv != NULL) && ((size & (size_t)15) == (size_t)0));
|
||||
(iv != NULL) && (size > (size_t)0));
|
||||
|
||||
osalDbgAssert(cryp->state == CRY_READY, "not ready");
|
||||
|
||||
|
@ -635,16 +626,13 @@ cryerror_t cryEncryptAES_CTR(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-CTR.
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input cyphertext
|
||||
* @param[out] out buffer for the output plaintext
|
||||
* @param[in] iv 128 bits input vector + counter, it contains
|
||||
|
@ -669,7 +657,7 @@ cryerror_t cryDecryptAES_CTR(CRYDriver *cryp,
|
|||
const uint8_t *iv) {
|
||||
|
||||
osalDbgCheck((cryp != NULL) && (in != NULL) && (out != NULL) &&
|
||||
(iv != NULL) && ((size & (size_t)15) == (size_t)0));
|
||||
(iv != NULL) && (size > (size_t)0));
|
||||
|
||||
osalDbgAssert(cryp->state == CRY_READY, "not ready");
|
||||
|
||||
|
@ -691,9 +679,7 @@ cryerror_t cryDecryptAES_CTR(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Encryption operation using AES-GCM.
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
|
@ -701,8 +687,7 @@ cryerror_t cryDecryptAES_CTR(CRYDriver *cryp,
|
|||
* in an unspecified way
|
||||
* @param[in] auth_size size of the data buffer to be authenticated
|
||||
* @param[in] auth_in buffer containing the data to be authenticated
|
||||
* @param[in] text_size size of the text buffer, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] text_size size of the text buffer
|
||||
* @param[in] text_in buffer containing the input plaintext
|
||||
* @param[out] text_out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits input vector
|
||||
|
@ -734,7 +719,6 @@ cryerror_t cryEncryptAES_GCM(CRYDriver *cryp,
|
|||
|
||||
osalDbgCheck((cryp != NULL) && (auth_in != NULL) &&
|
||||
(text_size > (size_t)0) &&
|
||||
((text_size & (size_t)15) == (size_t)0) &&
|
||||
(text_in != NULL) && (text_out != NULL) && (iv != NULL) &&
|
||||
(tag_size >= (size_t)1) && (tag_size <= (size_t)16) &&
|
||||
(tag_out != NULL));
|
||||
|
@ -767,9 +751,7 @@ cryerror_t cryEncryptAES_GCM(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-GCM.
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
|
@ -777,8 +759,7 @@ cryerror_t cryEncryptAES_GCM(CRYDriver *cryp,
|
|||
* in an unspecified way
|
||||
* @param[in] auth_size size of the data buffer to be authenticated
|
||||
* @param[in] auth_in buffer containing the data to be authenticated
|
||||
* @param[in] text_size size of the text buffer, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] text_size size of the text buffer
|
||||
* @param[in] text_in buffer containing the input plaintext
|
||||
* @param[out] text_out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits input vector
|
||||
|
@ -811,7 +792,6 @@ cryerror_t cryDecryptAES_GCM(CRYDriver *cryp,
|
|||
|
||||
osalDbgCheck((cryp != NULL) && (auth_in != NULL) &&
|
||||
(text_size > (size_t)0) &&
|
||||
((text_size & (size_t)15) == (size_t)0) &&
|
||||
(text_in != NULL) && (text_out != NULL) && (iv != NULL) &&
|
||||
(tag_size >= (size_t)1) && (tag_size <= (size_t)16) &&
|
||||
(tag_in != NULL));
|
||||
|
|
|
@ -196,7 +196,7 @@ cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_ECB == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-ECB.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
*
|
||||
|
@ -204,8 +204,8 @@ cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp,
|
|||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @return The operation status.
|
||||
|
@ -237,7 +237,7 @@ cryerror_t cry_lld_encrypt_AES_ECB(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-ECB.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
*
|
||||
|
@ -245,8 +245,8 @@ cryerror_t cry_lld_encrypt_AES_ECB(CRYDriver *cryp,
|
|||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @return The operation status.
|
||||
|
@ -280,7 +280,7 @@ cryerror_t cry_lld_decrypt_AES_ECB(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_CBC == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-CBC.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
*
|
||||
|
@ -288,8 +288,8 @@ cryerror_t cry_lld_decrypt_AES_ECB(CRYDriver *cryp,
|
|||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector
|
||||
|
@ -324,7 +324,7 @@ cryerror_t cry_lld_encrypt_AES_CBC(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-CBC.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* @note The function operates on data buffers whose length is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
*
|
||||
|
@ -332,8 +332,8 @@ cryerror_t cry_lld_encrypt_AES_CBC(CRYDriver *cryp,
|
|||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector
|
||||
|
@ -370,16 +370,13 @@ cryerror_t cry_lld_decrypt_AES_CBC(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_CFB == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-CFB.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector
|
||||
|
@ -414,16 +411,13 @@ cryerror_t cry_lld_encrypt_AES_CFB(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-CFB.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of the selected key size
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector
|
||||
|
@ -460,16 +454,13 @@ cryerror_t cry_lld_decrypt_AES_CFB(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_CTR == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-CTR.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of 16
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input plaintext
|
||||
* @param[out] out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits initial vector + counter, it contains
|
||||
|
@ -505,16 +496,13 @@ cryerror_t cry_lld_encrypt_AES_CTR(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-CTR.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
* the transient key, other values are keys stored
|
||||
* in an unspecified way
|
||||
* @param[in] size size of the plaintext buffer, this number must
|
||||
* be a multiple of 16
|
||||
* @param[in] size size of both buffers
|
||||
* @param[in] in buffer containing the input cyphertext
|
||||
* @param[out] out buffer for the output plaintext
|
||||
* @param[in] iv 128 bits initial vector + counter, it contains
|
||||
|
@ -552,9 +540,7 @@ cryerror_t cry_lld_decrypt_AES_CTR(CRYDriver *cryp,
|
|||
#if (CRY_LLD_SUPPORTS_AES_GCM == TRUE) || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief Encryption operation using AES-GCM.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
|
@ -562,8 +548,7 @@ cryerror_t cry_lld_decrypt_AES_CTR(CRYDriver *cryp,
|
|||
* in an unspecified way
|
||||
* @param[in] auth_size size of the data buffer to be authenticated
|
||||
* @param[in] auth_in buffer containing the data to be authenticated
|
||||
* @param[in] text_size size of the text buffer, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] text_size size of the text buffer
|
||||
* @param[in] text_in buffer containing the input plaintext
|
||||
* @param[out] text_out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits input vector
|
||||
|
@ -609,9 +594,7 @@ cryerror_t cry_lld_encrypt_AES_GCM(CRYDriver *cryp,
|
|||
|
||||
/**
|
||||
* @brief Decryption operation using AES-GCM.
|
||||
* @note The function operates on data buffers whose lenght is a multiple
|
||||
* of an AES block, this means that padding must be done by the
|
||||
* caller.
|
||||
* @note This is a stream cipher, there are no size restrictions.
|
||||
*
|
||||
* @param[in] cryp pointer to the @p CRYDriver object
|
||||
* @param[in] key_id the key to be used for the operation, zero is
|
||||
|
@ -619,8 +602,7 @@ cryerror_t cry_lld_encrypt_AES_GCM(CRYDriver *cryp,
|
|||
* in an unspecified way
|
||||
* @param[in] auth_size size of the data buffer to be authenticated
|
||||
* @param[in] auth_in buffer containing the data to be authenticated
|
||||
* @param[in] text_size size of the text buffer, this number must be a
|
||||
* multiple of 16
|
||||
* @param[in] text_size size of the text buffer
|
||||
* @param[in] text_in buffer containing the input plaintext
|
||||
* @param[out] text_out buffer for the output cyphertext
|
||||
* @param[in] iv 128 bits input vector
|
||||
|
|
Loading…
Reference in New Issue