libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
f4/crypto.h File Reference
Include dependency graph for f4/crypto.h:

Go to the source code of this file.

Macros

#define CRYP_CSGCMCCMR(i)   MMIO32(CRYP_BASE + 0x50 + (i) * 4)
 
#define CRYP_CSGCMR(i)   MMIO32(CRYP_BASE + 0x70 + (i) * 4)
 
#define CRYP_CR_GCM_CMPH_SHIFT   16
 
#define CRYP_CR_GCM_CMPH   (3 << CRYP_CR_GCM_CMPH_SHIFT)
 
#define CRYP_CR_GCM_CMPH_INIT   (0 << CRYP_CR_GCM_CMPH_SHIFT)
 
#define CRYP_CR_GCM_CMPH_HEADER   (1 << CRYP_CR_GCM_CMPH_SHIFT)
 
#define CRYP_CR_GCM_CMPH_PAYLOAD   (2 << CRYP_CR_GCM_CMPH_SHIFT)
 
#define CRYP_CR_GCM_CMPH_FINAL   (3 << CRYP_CR_GCM_CMPH_SHIFT)
 
#define CRYP_CR_ALGOMODE3   (1 << 19)
 

Enumerations

enum  crypto_mode_mac { ENCRYPT_GCM = CRYP_CR_ALGOMODE_TDES_ECB | CRYP_CR_ALGOMODE3 , ENCRYPT_CCM = CRYP_CR_ALGOMODE_TDES_CBC | CRYP_CR_ALGOMODE3 , DECRYPT_GCM , DECRYPT_CCM }
 

Functions

void crypto_context_swap (uint32_t *buf)
 Swap context. More...
 
void crypto_set_mac_algorithm (enum crypto_mode_mac mode)
 Set the MAC algorithm. More...