MSPM0GX51X Driver Library  2.05.00.05
Data Structures | Macros | Enumerations | Functions
dl_keystorectl.h File Reference

Detailed Description

KEYSTORECTL (Keystore Controller) Driver Library.


#include <stdbool.h>
#include <stdint.h>
#include <ti/devices/msp/msp.h>
#include <ti/driverlib/dl_common.h>
Include dependency graph for dl_keystorectl.h:

Go to the source code of this file.

Data Structures

struct  DL_KEYSTORECTL_KeyWrConfig
 Configuration struct for DL_KEYSTORECTL_writeKey. More...
 
struct  DL_KEYSTORECTL_Config
 Configuration struct for DL_KEYSTORECTL_transferKey. More...
 

Macros

#define DL_KEYSTORECTL_KEY_SLOT_0   (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT0)
 Keystore Controller Key Slot 0.
 
#define DL_KEYSTORECTL_KEY_SLOT_1   (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT1)
 Keystore Controller Key Slot 1.
 
#define DL_KEYSTORECTL_KEY_SLOT_2   (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT2)
 Keystore Controller Key Slot 2.
 
#define DL_KEYSTORECTL_KEY_SLOT_3   (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT3)
 Keystore Controller Key Slot 3.
 
#define DL_KEYSTORECTL_KEY_SLOT_4   (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT4)
 Keystore Controller Key Slot 4.
 
#define DL_KEYSTORECTL_KEY_SLOT_5   (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT5)
 Keystore Controller Key Slot 5.
 
#define DL_KEYSTORECTL_KEY_SLOT_6   (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT6)
 Keystore Controller Key Slot 6.
 
#define DL_KEYSTORECTL_KEY_SLOT_7   (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT7)
 Keystore Controller Key Slot 7.
 
#define DL_KEYSTORECTL_KEY_SLOT_0_AND_1
 Keystore Controller Key Combined Slot 0 and 1. More...
 
#define DL_KEYSTORECTL_KEY_SLOT_2_AND_3
 Keystore Controller Key Combined Slot 2 and 3. More...
 
#define DL_KEYSTORECTL_KEY_SLOT_4_AND_5
 Keystore Controller Key Combined Slot 4 and 5. More...
 
#define DL_KEYSTORECTL_KEY_SLOT_6_AND_7
 Keystore Controller Key Combined Slot 6 and 7. More...
 

Enumerations

enum  DL_KEYSTORECTL_NUM_256_KEYS {
  DL_KEYSTORECTL_NUM_256_KEYS_ZERO = KEYSTORECTL_CFG_NK256_ZERO,
  DL_KEYSTORECTL_NUM_256_KEYS_ONE = KEYSTORECTL_CFG_NK256_ONE,
  DL_KEYSTORECTL_NUM_256_KEYS_TWO = KEYSTORECTL_CFG_NK256_TWO,
  DL_KEYSTORECTL_NUM_256_KEYS_THREE = KEYSTORECTL_CFG_NK256_THREE,
  DL_KEYSTORECTL_NUM_256_KEYS_FOUR = KEYSTORECTL_CFG_NK256_FOUR
}
 
enum  DL_KEYSTORECTL_KEY_SIZE {
  DL_KEYSTORECTL_KEY_SIZE_128_BITS = KEYSTORECTL_KEYWR_KEYSZSEL_K128,
  DL_KEYSTORECTL_KEY_SIZE_256_BITS = KEYSTORECTL_KEYWR_KEYSZSEL_K256
}
 
enum  DL_KEYSTORECTL_NUM_SLOTS {
  DL_KEYSTORECTL_NUM_SLOTS_TWO = KEYSTORECTL_STATUS_NKEYSLOTS_TWO,
  DL_KEYSTORECTL_NUM_SLOTS_THREE = KEYSTORECTL_STATUS_NKEYSLOTS_THREE,
  DL_KEYSTORECTL_NUM_SLOTS_FOUR = KEYSTORECTL_STATUS_NKEYSLOTS_FOUR
}
 
enum  DL_KEYSTORECTL_CRYPTO_SEL { DL_KEYSTORECTL_CRYPTO_SEL_AES = KEYSTORECTL_KEYRD_CRYPTOSEL_AES }
 
enum  DL_KEYSTORECTL_STATUS {
  DL_KEYSTORECTL_STATUS_VALID = KEYSTORECTL_STATUS_STAT_VALID,
  DL_KEYSTORECTL_STATUS_NO_CONFIG = KEYSTORECTL_STATUS_STAT_NO_CFG,
  DL_KEYSTORECTL_STATUS_INVALID_NUM_KEYS,
  DL_KEYSTORECTL_STATUS_BUSY_RX = KEYSTORECTL_STATUS_STAT_BUSY_RECEIVE,
  DL_KEYSTORECTL_STATUS_BUSY_TX = KEYSTORECTL_STATUS_STAT_BUSY_TRANSMIT,
  DL_KEYSTORECTL_STATUS_INVALID_SLOT_WR,
  DL_KEYSTORECTL_STATUS_INVALID_SLOT_RD,
  DL_KEYSTORECTL_STATUS_WRITE_FAILED = 0x0BAD
}
 

Functions

__STATIC_INLINE void DL_KEYSTORECTL_setNumberOf256Keys (KEYSTORECTL_Regs *keystorectl, DL_KEYSTORECTL_NUM_256_KEYS numKeys)
 Sets the number of combined 256 key slots. More...
 
__STATIC_INLINE DL_KEYSTORECTL_NUM_256_KEYS DL_KEYSTORECTL_getNumberOf256Keys (const KEYSTORECTL_Regs *keystorectl)
 Returns the current number of combined 256 key slots. More...
 
__STATIC_INLINE void DL_KEYSTORECTL_setDestinationKeySlot (KEYSTORECTL_Regs *keystorectl, uint32_t keySlot)
 Sets the intended destination key slot for the next write. More...
 
__STATIC_INLINE uint32_t DL_KEYSTORECTL_getDestinationKeySlot (const KEYSTORECTL_Regs *keystorectl)
 Returns the intended destination key slot for the next write. More...
 
__STATIC_INLINE void DL_KEYSTORECTL_setDestinationKeySize (KEYSTORECTL_Regs *keystorectl, DL_KEYSTORECTL_KEY_SIZE keySize)
 Sets the intended destination key slot size for next write. More...
 
__STATIC_INLINE DL_KEYSTORECTL_KEY_SIZE DL_KEYSTORECTL_getDestinationKeySize (const KEYSTORECTL_Regs *keystorectl)
 Returns the intended destination key size for the next write. More...
 
void DL_KEYSTORECTL_loadKey (KEYSTORECTL_Regs *keystorectl, uint32_t *key)
 Sets the intended destination key slot size for next write. More...
 
__STATIC_INLINE void DL_KEYSTORECTL_setSourceKeySlot (KEYSTORECTL_Regs *keystorectl, uint32_t keySlot)
 Gets the intended source key slot for the next transfer. More...
 
__STATIC_INLINE uint32_t DL_KEYSTORECTL_getSourceKeySlot (const KEYSTORECTL_Regs *keystorectl)
 Gets the intended source key slot for the next transfer. More...
 
__STATIC_INLINE void DL_KEYSTORECTL_setSourceKeySize (KEYSTORECTL_Regs *keystorectl, DL_KEYSTORECTL_KEY_SIZE keySize)
 Gets the intended source key slot size for next transfer. More...
 
__STATIC_INLINE DL_KEYSTORECTL_KEY_SIZE DL_KEYSTORECTL_getSourceKeySize (const KEYSTORECTL_Regs *keystorectl)
 Gets the intended source key size for the next transfer. More...
 
__STATIC_INLINE DL_KEYSTORECTL_STATUS DL_KEYSTORECTL_getStatus (const KEYSTORECTL_Regs *keystorectl)
 Gets the current status of the KEYSTORECTL module. More...
 
__STATIC_INLINE uint32_t DL_KEYSTORECTL_getValidKeySlots (const KEYSTORECTL_Regs *keystorectl)
 Gets currently written key slots. More...
 
__STATIC_INLINE DL_KEYSTORECTL_NUM_SLOTS DL_KEYSTORECTL_getNumSlots (const KEYSTORECTL_Regs *keystorectl)
 Gets the total number of 128-bit key slots in HW on the device. More...
 
DL_KEYSTORECTL_STATUS DL_KEYSTORECTL_writeKey (KEYSTORECTL_Regs *keystorectl, DL_KEYSTORECTL_KeyWrConfig *keyWrConfig)
 Writes a key into the KEYSTORE. More...
 
DL_KEYSTORECTL_STATUS DL_KEYSTORECTL_transferKey (KEYSTORECTL_Regs *keystorectl, const DL_KEYSTORECTL_Config *config)
 Transfers key loaded in KEYSTORE into intended crypto. More...
 
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale