STM32F439xx HAL User Manual
Functions
DES processing functions
CRYP Exported Functions

processing functions. More...

Functions

HAL_StatusTypeDef HAL_CRYP_DESECB_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Initializes the CRYP peripheral in DES ECB encryption mode.
HAL_StatusTypeDef HAL_CRYP_DESECB_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Initializes the CRYP peripheral in DES ECB decryption mode.
HAL_StatusTypeDef HAL_CRYP_DESCBC_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Initializes the CRYP peripheral in DES CBC encryption mode.
HAL_StatusTypeDef HAL_CRYP_DESCBC_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Initializes the CRYP peripheral in DES ECB decryption mode.
HAL_StatusTypeDef HAL_CRYP_DESECB_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in DES ECB encryption mode using IT.
HAL_StatusTypeDef HAL_CRYP_DESCBC_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in DES CBC encryption mode using interrupt.
HAL_StatusTypeDef HAL_CRYP_DESECB_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in DES ECB decryption mode using IT.
HAL_StatusTypeDef HAL_CRYP_DESCBC_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in DES ECB decryption mode using interrupt.
HAL_StatusTypeDef HAL_CRYP_DESECB_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in DES ECB encryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_DESCBC_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Initializes the CRYP peripheral in DES CBC encryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_DESECB_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in DES ECB decryption mode using DMA.
HAL_StatusTypeDef HAL_CRYP_DESCBC_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Initializes the CRYP peripheral in DES ECB decryption mode using DMA.

Detailed Description

processing functions.

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


Function Documentation

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

Initializes the CRYP peripheral in DES ECB 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
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 2380 of file stm32f4xx_hal_cryp.c.

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

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

Initializes the CRYP peripheral in DES 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 2889 of file stm32f4xx_hal_cryp.c.

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

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

Initializes the CRYP peripheral in DES ECB decryption 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 2675 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_SetDESCBCMode(), 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_DESCBC_Encrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in DES 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
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 2340 of file stm32f4xx_hal_cryp.c.

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

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

Initializes the CRYP peripheral in DES 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 2803 of file stm32f4xx_hal_cryp.c.

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

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

Initializes the CRYP peripheral in DES CBC 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 2504 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_SetDESCBCMode(), 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_DESECB_Decrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pCypherData,
uint16_t  Size,
uint8_t *  pPlainData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in DES ECB 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
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 2300 of file stm32f4xx_hal_cryp.c.

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

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

Initializes the CRYP peripheral in DES 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 2846 of file stm32f4xx_hal_cryp.c.

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

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

Initializes the CRYP peripheral in DES ECB decryption mode using IT.

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 2590 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_SetDESECBMode(), 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_DESECB_Encrypt ( CRYP_HandleTypeDef hcryp,
uint8_t *  pPlainData,
uint16_t  Size,
uint8_t *  pCypherData,
uint32_t  Timeout 
)

Initializes the CRYP peripheral in DES ECB 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
TimeoutSpecify Timeout value
Return values:
HALstatus

Definition at line 2260 of file stm32f4xx_hal_cryp.c.

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

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

Initializes the CRYP peripheral in DES 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 2760 of file stm32f4xx_hal_cryp.c.

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

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

Initializes the CRYP peripheral in DES ECB encryption mode using IT.

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 2419 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_SetDESECBMode(), 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().