L4 HAL Drivers

Embed: (wiki syntax)

« Back to documentation index

stm32l4xx_hal_cryp_ex.c File Reference

stm32l4xx_hal_cryp_ex.c File Reference

CRYPEx HAL module driver. This file provides firmware functions to manage the extended functionalities of the Cryptography (CRYP) peripheral. More...

Go to the source code of this file.

Functions

static HAL_StatusTypeDef CRYP_ProcessData (CRYP_HandleTypeDef *hcryp, uint8_t *Input, uint16_t Ilength, uint8_t *Output, uint32_t Timeout)
 Write/read input/output data in polling mode.
static HAL_StatusTypeDef CRYP_ReadKey (CRYP_HandleTypeDef *hcryp, uint8_t *Output, uint32_t Timeout)
 Read derivative key in polling mode when CRYP hardware block is set in key derivation operating mode (mode 2).
static void CRYP_SetDMAConfig (CRYP_HandleTypeDef *hcryp, uint32_t inputaddr, uint16_t Size, uint32_t outputaddr)
 Set the DMA configuration and start the DMA transfer.
static void CRYP_GCMCMAC_SetDMAConfig (CRYP_HandleTypeDef *hcryp, uint32_t inputaddr, uint16_t Size, uint32_t outputaddr)
 Set the DMA configuration and start the DMA transfer for GCM, GMAC or CMAC chainging modes.
static void CRYP_GCMCMAC_DMAInCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Input Data process complete callback for GCM, GMAC or CMAC chainging modes.
static void CRYP_GCMCMAC_DMAError (DMA_HandleTypeDef *hdma)
 DMA CRYP communication error callback for GCM, GMAC or CMAC chainging modes.
static void CRYP_GCMCMAC_DMAOutCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Output Data process complete callback for GCM, GMAC or CMAC chainging modes.
static HAL_StatusTypeDef CRYP_WaitOnCCFlag (CRYP_HandleTypeDef *hcryp, uint32_t Timeout)
 Handle CRYP hardware block Timeout when waiting for CCF flag to be raised.
static HAL_StatusTypeDef CRYP_WaitOnBusyFlagReset (CRYP_HandleTypeDef *hcryp, uint32_t Timeout)
 Wait for Busy Flag to be reset during a GCM payload encryption process suspension.
static void CRYP_DMAInCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Input Data process complete callback.
static void CRYP_DMAOutCplt (DMA_HandleTypeDef *hdma)
 DMA CRYP Output Data process complete callback.
static void CRYP_DMAError (DMA_HandleTypeDef *hdma)
 DMA CRYP communication error callback.
__weak void HAL_CRYPEx_ComputationCpltCallback (CRYP_HandleTypeDef *hcryp)
 Computation completed callbacks.
HAL_StatusTypeDef HAL_CRYPEx_AES (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData, uint32_t Timeout)
 Carry out in polling mode the ciphering or deciphering operation according to hcryp->Init structure fields, all operating modes (encryption, key derivation and/or decryption) and chaining modes ECB, CBC and CTR are managed by this function in polling mode.
HAL_StatusTypeDef HAL_CRYPEx_AES_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData)
 Carry out in interrupt mode the ciphering or deciphering operation according to hcryp->Init structure fields, all operating modes (encryption, key derivation and/or decryption) and chaining modes ECB, CBC and CTR are managed by this function in interrupt mode.
HAL_StatusTypeDef HAL_CRYPEx_AES_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint16_t Size, uint8_t *pOutputData)
 Carry out in DMA mode the ciphering or deciphering operation according to hcryp->Init structure fields.
HAL_StatusTypeDef HAL_CRYPEx_AES_Auth (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData, uint32_t Timeout)
 Carry out in polling mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields.
HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData)
 Carry out in interrupt mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields.
HAL_StatusTypeDef HAL_CRYPEx_AES_Auth_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pInputData, uint64_t Size, uint8_t *pOutputData)
 Carry out in DMA mode the authentication tag generation as well as the ciphering or deciphering operation according to hcryp->Init structure fields.
void HAL_CRYPEx_Read_IVRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Output)
 In case of message processing suspension, read the Initialization Vector.
void HAL_CRYPEx_Write_IVRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Input)
 In case of message processing resumption, rewrite the Initialization Vector in the AES_IVRx registers.
void HAL_CRYPEx_Read_SuspendRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Output)
 In case of message GCM/GMAC or CMAC processing suspension, read the Suspend Registers.
void HAL_CRYPEx_Write_SuspendRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Input)
 In case of message GCM/GMAC or CMAC processing resumption, rewrite the Suspend Registers in the AES_SUSPxR registers.
void HAL_CRYPEx_Read_KeyRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Output, uint32_t KeySize)
 In case of message GCM/GMAC or CMAC processing suspension, read the Key Registers.
void HAL_CRYPEx_Write_KeyRegisters (CRYP_HandleTypeDef *hcryp, uint8_t *Input, uint32_t KeySize)
 In case of message GCM/GMAC or CMAC processing resumption, rewrite the Key Registers in the AES_KEYRx registers.
void HAL_CRYPEx_Read_ControlRegister (CRYP_HandleTypeDef *hcryp, uint8_t *Output)
 In case of message GCM/GMAC or CMAC processing suspension, read the Control Register.
void HAL_CRYPEx_Write_ControlRegister (CRYP_HandleTypeDef *hcryp, uint8_t *Input)
 In case of message GCM/GMAC or CMAC processing resumption, rewrite the Control Registers in the AES_CR register.
void HAL_CRYPEx_ProcessSuspend (CRYP_HandleTypeDef *hcryp)
 Request CRYP processing suspension when in polling or interruption mode.
HAL_StatusTypeDef CRYP_AES_Auth_IT (CRYP_HandleTypeDef *hcryp)
 Handle CRYP block input/output data handling under interruption for GCM, GMAC or CMAC chainging modes.

Detailed Description

CRYPEx HAL module driver. This file provides firmware functions to manage the extended functionalities of the Cryptography (CRYP) peripheral.

Author:
MCD Application Team
Version:
V1.1.0
Date:
16-September-2015
Attention:

© COPYRIGHT(c) 2015 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32l4xx_hal_cryp_ex.c.