diff --git a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c index 9314d7583..5f85b1907 100644 --- a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c +++ b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c @@ -433,7 +433,7 @@ cryerror_t cry_lld_aes_loadkey(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -450,11 +450,38 @@ cryerror_t cry_lld_encrypt_AES(CRYDriver *cryp, crykey_t key_id, const uint8_t *in, uint8_t *out) { + uint32_t cr; + unsigned i; (void)cryp; - (void)key_id; - (void)in; - (void)out; + + /* Only key zero is supported.*/ + if (key_id != 0U) { + return CRY_ERR_INV_KEY_ID; + } + + /* Enabling AES mode, caching accesses to the volatile field.*/ + cr = CRYP->CR; + cr &= ~CRYP_CR_ALGOMODE_Msk; + cr |= CRYP_CR_ALGOMODE_AES_ECB; + CRYP->CR = cr; + + /* Enabling unit.*/ + cr |= CRYP_CR_CRYPEN; + CRYP->CR = cr; + + /* Pushing the AES block in the FIFO, it is assumed to be empty.*/ + CRYP->DR = __UNALIGNED_UINT32_READ(&in[0]); + CRYP->DR = __UNALIGNED_UINT32_READ(&in[4]); + CRYP->DR = __UNALIGNED_UINT32_READ(&in[8]); + CRYP->DR = __UNALIGNED_UINT32_READ(&in[12]); + + /* Reading the result.*/ + for (i = 0U; i < 4; i++, out += 4) { + while ((CRYP->SR & CRYP_SR_OFNE) == 0U) { + } + __UNALIGNED_UINT32_WRITE(out, CRYP->DOUT); + } return CRY_ERR_INV_ALGO; } @@ -468,7 +495,7 @@ cryerror_t cry_lld_encrypt_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] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -510,7 +537,7 @@ cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -551,7 +578,7 @@ cryerror_t cry_lld_encrypt_AES_ECB(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -594,7 +621,7 @@ cryerror_t cry_lld_decrypt_AES_ECB(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -638,7 +665,7 @@ cryerror_t cry_lld_encrypt_AES_CBC(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -681,7 +708,7 @@ cryerror_t cry_lld_decrypt_AES_CBC(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -722,7 +749,7 @@ cryerror_t cry_lld_encrypt_AES_CFB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -765,7 +792,7 @@ cryerror_t cry_lld_decrypt_AES_CFB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector + counter, it contains * a 96 bits IV and a 32 bits counter * @return The operation status. @@ -806,7 +833,7 @@ cryerror_t cry_lld_encrypt_AES_CTR(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] size size of both buffers - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @param[in] iv 128 bits initial vector + counter, it contains * a 96 bits IV and a 32 bits counter @@ -853,7 +880,7 @@ cryerror_t cry_lld_decrypt_AES_CTR(CRYDriver *cryp, * @param[in] auth_in buffer containing the data to be authenticated * @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[out] text_out buffer for the output ciphertext * @param[in] iv 128 bits input vector * @param[in] tag_size size of the authentication tag, this number * must be between 1 and 16 @@ -907,7 +934,7 @@ cryerror_t cry_lld_encrypt_AES_GCM(CRYDriver *cryp, * @param[in] auth_in buffer containing the data to be authenticated * @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[out] text_out buffer for the output ciphertext * @param[in] iv 128 bits input vector * @param[in] tag_size size of the authentication tag, this number * must be between 1 and 16 @@ -989,7 +1016,7 @@ cryerror_t cry_lld_des_loadkey(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -1025,7 +1052,7 @@ cryerror_t cry_lld_encrypt_DES(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] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -1067,7 +1094,7 @@ cryerror_t cry_lld_decrypt_DES(CRYDriver *cryp, * @param[in] size size of the plaintext buffer, this number must * be a multiple of 8 * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -1107,7 +1134,7 @@ cryerror_t cry_lld_encrypt_DES_ECB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of the plaintext buffer, this number must * be a multiple of 8 - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return T he operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -1151,7 +1178,7 @@ cryerror_t cry_lld_decrypt_DES_ECB(CRYDriver *cryp, * @param[in] size size of the plaintext buffer, this number must * be a multiple of 8 * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 64 bits input vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -1194,7 +1221,7 @@ cryerror_t cry_lld_encrypt_DES_CBC(CRYDriver *cryp, * in an unspecified way * @param[in] size size of the plaintext buffer, this number must * be a multiple of 8 - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @param[in] iv 64 bits input vector * @return The operation status. diff --git a/os/hal/src/hal_crypto.c b/os/hal/src/hal_crypto.c index 4ea802484..0a67df67d 100644 --- a/os/hal/src/hal_crypto.c +++ b/os/hal/src/hal_crypto.c @@ -170,7 +170,7 @@ cryerror_t cryLoadAESTransientKey(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -215,7 +215,7 @@ cryerror_t cryEncryptAES(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] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -265,7 +265,7 @@ cryerror_t cryDecryptAES(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -316,7 +316,7 @@ cryerror_t cryEncryptAES_ECB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers, this number must be a * multiple of 16 - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -369,7 +369,7 @@ cryerror_t cryDecryptAES_ECB(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @param[in] iv 128 bits input vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -423,7 +423,7 @@ cryerror_t cryEncryptAES_CBC(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers, this number must be a * multiple of 16 - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @param[in] iv 128 bits input vector * @return The operation status. @@ -476,7 +476,7 @@ cryerror_t cryDecryptAES_CBC(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 128 bits input vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -527,7 +527,7 @@ cryerror_t cryEncryptAES_CFB(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] size size of both buffers - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @param[in] iv 128 bits input vector * @return The operation status. @@ -580,7 +580,7 @@ cryerror_t cryDecryptAES_CFB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 128 bits input vector + counter, it contains * a 96 bits IV and a 32 bits counter * @return The operation status. @@ -632,7 +632,7 @@ cryerror_t cryEncryptAES_CTR(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] size size of both buffers - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @param[in] iv 128 bits input vector + counter, it contains * a 96 bits IV and a 32 bits counter @@ -688,7 +688,7 @@ cryerror_t cryDecryptAES_CTR(CRYDriver *cryp, * @param[in] auth_in buffer containing the data to be authenticated * @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[out] text_out buffer for the output ciphertext * @param[in] iv 128 bits input vector * @param[in] tag_size size of the authentication tag, this number * must be between 1 and 16 @@ -760,7 +760,7 @@ cryerror_t cryEncryptAES_GCM(CRYDriver *cryp, * @param[in] auth_in buffer containing the data to be authenticated * @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[out] text_out buffer for the output ciphertext * @param[in] iv 128 bits input vector * @param[in] tag_size size of the authentication tag, this number * must be between 1 and 16 @@ -866,7 +866,7 @@ cryerror_t cryLoadDESTransientKey(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -912,7 +912,7 @@ cryerror_t cryEncryptDES(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] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -962,7 +962,7 @@ cryerror_t cryDecryptDES(CRYDriver *cryp, * @param[in] size size of both buffers, this number must be a * multiple of 8 * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -1013,7 +1013,7 @@ cryerror_t cryEncryptDES_ECB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers, this number must be a * multiple of 8 - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -1066,7 +1066,7 @@ cryerror_t cryDecryptDES_ECB(CRYDriver *cryp, * @param[in] size size of both buffers, this number must be a * multiple of 8 * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 64 bits input vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -1120,7 +1120,7 @@ cryerror_t cryEncryptDES_CBC(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers, this number must be a * multiple of 8 - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @param[in] iv 64 bits input vector * @return The operation status. diff --git a/os/hal/templates/hal_crypto_lld.c b/os/hal/templates/hal_crypto_lld.c index b7c2153d2..c14929325 100644 --- a/os/hal/templates/hal_crypto_lld.c +++ b/os/hal/templates/hal_crypto_lld.c @@ -130,7 +130,7 @@ cryerror_t cry_lld_aes_loadkey(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -165,7 +165,7 @@ cryerror_t cry_lld_encrypt_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] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -207,7 +207,7 @@ cryerror_t cry_lld_decrypt_AES(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -248,7 +248,7 @@ cryerror_t cry_lld_encrypt_AES_ECB(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -291,7 +291,7 @@ cryerror_t cry_lld_decrypt_AES_ECB(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -335,7 +335,7 @@ cryerror_t cry_lld_encrypt_AES_CBC(CRYDriver *cryp, * @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[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -378,7 +378,7 @@ cryerror_t cry_lld_decrypt_AES_CBC(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -419,7 +419,7 @@ cryerror_t cry_lld_encrypt_AES_CFB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -462,7 +462,7 @@ cryerror_t cry_lld_decrypt_AES_CFB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of both buffers * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 128 bits initial vector + counter, it contains * a 96 bits IV and a 32 bits counter * @return The operation status. @@ -503,7 +503,7 @@ cryerror_t cry_lld_encrypt_AES_CTR(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] size size of both buffers - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @param[in] iv 128 bits initial vector + counter, it contains * a 96 bits IV and a 32 bits counter @@ -550,7 +550,7 @@ cryerror_t cry_lld_decrypt_AES_CTR(CRYDriver *cryp, * @param[in] auth_in buffer containing the data to be authenticated * @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[out] text_out buffer for the output ciphertext * @param[in] iv 128 bits input vector * @param[in] tag_size size of the authentication tag, this number * must be between 1 and 16 @@ -604,7 +604,7 @@ cryerror_t cry_lld_encrypt_AES_GCM(CRYDriver *cryp, * @param[in] auth_in buffer containing the data to be authenticated * @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[out] text_out buffer for the output ciphertext * @param[in] iv 128 bits input vector * @param[in] tag_size size of the authentication tag, this number * must be between 1 and 16 @@ -686,7 +686,7 @@ cryerror_t cry_lld_des_loadkey(CRYDriver *cryp, * the transient key, other values are keys stored * in an unspecified way * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -722,7 +722,7 @@ cryerror_t cry_lld_encrypt_DES(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] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -764,7 +764,7 @@ cryerror_t cry_lld_decrypt_DES(CRYDriver *cryp, * @param[in] size size of the plaintext buffer, this number must * be a multiple of 8 * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -804,7 +804,7 @@ cryerror_t cry_lld_encrypt_DES_ECB(CRYDriver *cryp, * in an unspecified way * @param[in] size size of the plaintext buffer, this number must * be a multiple of 8 - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @return T he operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -848,7 +848,7 @@ cryerror_t cry_lld_decrypt_DES_ECB(CRYDriver *cryp, * @param[in] size size of the plaintext buffer, this number must * be a multiple of 8 * @param[in] in buffer containing the input plaintext - * @param[out] out buffer for the output cyphertext + * @param[out] out buffer for the output ciphertext * @param[in] iv 64 bits input vector * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. @@ -891,7 +891,7 @@ cryerror_t cry_lld_encrypt_DES_CBC(CRYDriver *cryp, * in an unspecified way * @param[in] size size of the plaintext buffer, this number must * be a multiple of 8 - * @param[in] in buffer containing the input cyphertext + * @param[in] in buffer containing the input ciphertext * @param[out] out buffer for the output plaintext * @param[in] iv 64 bits input vector * @return The operation status.