This file provides high level functions to encrypt and decrypt an input message using AES in ECB/CBC/CTR/GCM/CCM modes. It uses the stm32f4xx_cryp.c/.h drivers to access the STM32F4xx CRYP peripheral. AES-ECB/CBC/CTR/GCM/CCM modes are available on STM32F437x Devices. For STM32F41xx Devices, only AES-ECB/CBC/CTR modes are available. More...
#include "stm32f4xx_cryp.h"
Go to the source code of this file.
Macros | |
#define | AESBUSY_TIMEOUT ((uint32_t) 0x00010000) |
Functions | |
ErrorStatus | CRYP_AES_CBC (uint8_t Mode, uint8_t InitVectors[16], uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t Ilength, uint8_t *Output) |
Encrypt and decrypt using AES in CBC Mode. More... | |
ErrorStatus | CRYP_AES_CCM (uint8_t Mode, uint8_t *Nonce, uint32_t NonceSize, uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t ILength, uint8_t *Header, uint32_t HLength, uint8_t *HBuffer, uint8_t *Output, uint8_t *AuthTAG, uint32_t TAGSize) |
Encrypt and decrypt using AES in CCM Mode. The GCM and CCM modes are available only on STM32F437x Devices. More... | |
ErrorStatus | CRYP_AES_CTR (uint8_t Mode, uint8_t InitVectors[16], uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t Ilength, uint8_t *Output) |
Encrypt and decrypt using AES in CTR Mode. More... | |
ErrorStatus | CRYP_AES_ECB (uint8_t Mode, uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t Ilength, uint8_t *Output) |
Encrypt and decrypt using AES in ECB Mode. More... | |
ErrorStatus | CRYP_AES_GCM (uint8_t Mode, uint8_t InitVectors[16], uint8_t *Key, uint16_t Keysize, uint8_t *Input, uint32_t ILength, uint8_t *Header, uint32_t HLength, uint8_t *Output, uint8_t *AuthTAG) |
Encrypt and decrypt using AES in GCM Mode. The GCM and CCM modes are available only on STM32F437x Devices. More... | |
This file provides high level functions to encrypt and decrypt an input message using AES in ECB/CBC/CTR/GCM/CCM modes. It uses the stm32f4xx_cryp.c/.h drivers to access the STM32F4xx CRYP peripheral. AES-ECB/CBC/CTR/GCM/CCM modes are available on STM32F437x Devices. For STM32F41xx Devices, only AES-ECB/CBC/CTR modes are available.
=================================================================== ##### How to use this driver ##### =================================================================== [..] (#) Enable The CRYP controller clock using RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_CRYP, ENABLE); function. (#) Encrypt and decrypt using AES in ECB Mode using CRYP_AES_ECB() function. (#) Encrypt and decrypt using AES in CBC Mode using CRYP_AES_CBC() function. (#) Encrypt and decrypt using AES in CTR Mode using CRYP_AES_CTR() function. (#) Encrypt and decrypt using AES in GCM Mode using CRYP_AES_GCM() function. (#) Encrypt and decrypt using AES in CCM Mode using CRYP_AES_CCM() function.
@attention <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2> Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.st.com/software_license_agreement_liberty_v2 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file stm32f4xx_cryp_aes.c.