Initialization and Configuration functions.
More...
Initialization and Configuration functions.
===============================================================================
##### Initialization and Configuration functions #####
===============================================================================
[..] This section provides functions allowing to
(+) Initialize the cryptographic Processor using CRYP_Init() function
(++) Encrypt or Decrypt
(++) mode : TDES-ECB, TDES-CBC,
DES-ECB, DES-CBC,
AES-ECB, AES-CBC, AES-CTR, AES-Key, AES-GCM, AES-CCM
(++) DataType : 32-bit data, 16-bit data, bit data or bit-string
(++) Key Size (only in AES modes)
(+) Configure the Encrypt or Decrypt Key using CRYP_KeyInit() function
(+) Configure the Initialization Vectors(IV) for CBC and CTR modes using
CRYP_IVInit() function.
(+) Flushes the IN and OUT FIFOs : using CRYP_FIFOFlush() function.
(+) Enable or disable the CRYP Processor using CRYP_Cmd() function
void CRYP_Cmd |
( |
FunctionalState |
NewState | ) |
|
Enables or disables the CRYP peripheral.
- Parameters
-
NewState | new state of the CRYP peripheral. This parameter can be: ENABLE or DISABLE. |
- Return values
-
Definition at line 403 of file stm32f4xx_cryp.c.
void CRYP_DeInit |
( |
void |
| ) |
|
Deinitializes the CRYP peripheral registers to their default reset values.
- Parameters
-
- Return values
-
Definition at line 219 of file stm32f4xx_cryp.c.
void CRYP_FIFOFlush |
( |
void |
| ) |
|
Flushes the IN and OUT FIFOs (that is read and write pointers of the FIFOs are reset)
- Note
- The FIFOs must be flushed only when BUSY flag is reset.
- Parameters
-
- Return values
-
Definition at line 391 of file stm32f4xx_cryp.c.
Initializes the CRYP peripheral according to the specified parameters in the CRYP_InitStruct.
- Parameters
-
CRYP_InitStruct | pointer to a CRYP_InitTypeDef structure that contains the configuration information for the CRYP peripheral. |
- Return values
-
Definition at line 235 of file stm32f4xx_cryp.c.
Initializes the CRYP Initialization Vectors(IV) according to the specified parameters in the CRYP_IVInitStruct.
- Parameters
-
CRYP_IVInitStruct | pointer to a CRYP_IVInitTypeDef structure that contains the configuration information for the CRYP Initialization Vectors(IV). |
- Return values
-
Definition at line 333 of file stm32f4xx_cryp.c.
Fills each CRYP_IVInitStruct member with its default value.
- Parameters
-
CRYP_IVInitStruct | pointer to a CRYP_IVInitTypeDef Initialization Vectors(IV) structure which will be initialized. |
- Return values
-
Definition at line 347 of file stm32f4xx_cryp.c.
Initializes the CRYP Keys according to the specified parameters in the CRYP_KeyInitStruct.
- Parameters
-
CRYP_KeyInitStruct | pointer to a CRYP_KeyInitTypeDef structure that contains the configuration information for the CRYP Keys. |
- Return values
-
Definition at line 296 of file stm32f4xx_cryp.c.
Fills each CRYP_KeyInitStruct member with its default value.
- Parameters
-
- Return values
-
Definition at line 315 of file stm32f4xx_cryp.c.
void CRYP_PhaseConfig |
( |
uint32_t |
CRYP_Phase | ) |
|
Configures the AES-CCM and AES-GCM phases.
- Note
- This function is used only with AES-CCM or AES-GCM Algorithms
- Parameters
-
CRYP_Phase | specifies the CRYP AES-CCM and AES-GCM phase to be configured. This parameter can be one of the following values:
- CRYP_Phase_Init: Initialization phase
- CRYP_Phase_Header: Header phase
- CRYP_Phase_Payload: Payload phase
- CRYP_Phase_Final: Final phase
|
- Return values
-
Definition at line 366 of file stm32f4xx_cryp.c.
Fills each CRYP_InitStruct member with its default value.
- Parameters
-
CRYP_InitStruct | pointer to a CRYP_InitTypeDef structure which will be initialized. |
- Return values
-
Definition at line 274 of file stm32f4xx_cryp.c.