STM32F439xx HAL User Manual
Functions
TDES processing functions
CRYP Exported Functions

processing functions. More...

Functions

HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Initializes the CRYP peripheral in TDES ECB encryption mode then encrypt pPlainData.
HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Initializes the CRYP peripheral in TDES ECB decryption mode then decrypted pCypherData.
HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Initializes the CRYP peripheral in TDES CBC encryption mode then encrypt pPlainData.
HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Initializes the CRYP peripheral in TDES CBC decryption mode then decrypted pCypherData.
HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in TDES ECB encryption mode using interrupt.
HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in TDES CBC encryption mode.
HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in TDES ECB decryption mode.
HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in TDES CBC decryption mode.
HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in TDES ECB encryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in TDES CBC encryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in TDES ECB decryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in TDES CBC decryption mode using DMA.

Detailed Description

processing functions.

  ==============================================================================
                      ##### TDES processing functions #####
  ==============================================================================  
    [..]  This section provides functions allowing to:
      (+) Encrypt plaintext using TDES based on ECB or CBC chaining modes
      (+) Decrypt cyphertext using TDES based on ECB or CBC chaining modes
    [..]  Three processing functions are available:
      (+) Polling mode
      (+) Interrupt mode
      (+) DMA mode


Function Documentation

HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in TDES CBC decryption mode then decrypted pCypherData.

The cypher data are available in pPlainData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pPlainDataPointer to the plaintext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 3080 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, CRYP_ProcessData2Words(), CRYP_SetTDESCBCMode(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in TDES CBC decryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pPlainDataPointer to the plaintext buffer
Return values:
HALstatus

Definition at line 3585 of file stm32f4xx_hal_cryp.c.

References CRYP_SetDMAConfig(), CRYP_SetTDESCBCMode(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Phase, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_TDESCBC_Decrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in TDES CBC decryption mode.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pCypherDataPointer to the cyphertext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pPlainDataPointer to the plaintext buffer
Return values:
HALstatus

Definition at line 3372 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE, __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_GET_IT, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_SetTDESCBCMode(), CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Instance, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().

HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in TDES CBC encryption mode then encrypt pPlainData.

The cypher data are available in pCypherData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 3039 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, CRYP_ProcessData2Words(), CRYP_SetTDESCBCMode(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in TDES CBC encryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 3499 of file stm32f4xx_hal_cryp.c.

References CRYP_SetDMAConfig(), CRYP_SetTDESCBCMode(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Phase, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_TDESCBC_Encrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in TDES CBC encryption mode.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 3204 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE, __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_GET_IT, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_SetTDESCBCMode(), CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Instance, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().

HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in TDES ECB decryption mode then decrypted pCypherData.

The cypher data are available in pPlainData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 2998 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, CRYP_ProcessData2Words(), CRYP_SetTDESECBMode(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in TDES ECB decryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 3542 of file stm32f4xx_hal_cryp.c.

References CRYP_SetDMAConfig(), CRYP_SetTDESECBMode(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Phase, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_TDESECB_Decrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData 
)

Initializes the CRYP peripheral in TDES ECB decryption mode.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 3288 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE, __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_GET_IT, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_SetTDESECBMode(), CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Instance, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().

HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in TDES ECB encryption mode then encrypt pPlainData.

The cypher data are available in pCypherData

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 2957 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_ENABLE, CRYP_ProcessData2Words(), CRYP_SetTDESECBMode(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt_DMA ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in TDES ECB encryption mode using DMA.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 3456 of file stm32f4xx_hal_cryp.c.

References CRYP_SetDMAConfig(), CRYP_SetTDESECBMode(), HAL_CRYP_PHASE_PROCESS, HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Phase, and CRYP_HandleTypeDef::State.

HAL_StatusTypeDef HAL_CRYP_TDESECB_Encrypt_IT ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData 
)

Initializes the CRYP peripheral in TDES ECB encryption mode using interrupt.

Parameters:
hcryppointer to a CRYP_HandleTypeDef structure that contains the configuration information for CRYP module
pPlainDataPointer to the plaintext buffer
SizeLength of the plaintext buffer, must be a multiple of 8
pCypherDataPointer to the cyphertext buffer
Return values:
HALstatus

Definition at line 3119 of file stm32f4xx_hal_cryp.c.

References __HAL_CRYP_DISABLE, __HAL_CRYP_DISABLE_IT, __HAL_CRYP_ENABLE, __HAL_CRYP_ENABLE_IT, __HAL_CRYP_GET_IT, CRYP_IT_INI, CRYP_IT_OUTI, CRYP_SetTDESECBMode(), CRYP_HandleTypeDef::CrypInCount, CRYP_HandleTypeDef::CrypOutCount, HAL_CRYP_InCpltCallback(), HAL_CRYP_OutCpltCallback(), HAL_CRYP_STATE_BUSY, HAL_CRYP_STATE_READY, CRYP_HandleTypeDef::Instance, CRYP_HandleTypeDef::pCrypInBuffPtr, CRYP_HandleTypeDef::pCrypOutBuffPtr, and CRYP_HandleTypeDef::State.

Referenced by HAL_CRYP_IRQHandler().