MCUXpresso SDK API Reference Manual
Rev 2.12.1
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the LP Trusted Cryptography (LTC) module of MCUXpresso SDK devices. LP Trusted Cryptography is a set of cryptograhpic hardware accelerator engines that share common registers. LTC architecture can support AES, DES, 3DES, MDHA (SHA), RSA, and ECC. The actual list of implemented cryptograhpic hardware accelerator engines depends on the specific microcontroller.
The driver comprises two sets of API functions.
In the first set, blocking synchronous APIs are provided, for all operations supported by LTC hardware. The LTC operations are complete (and results are made availabe for further usage) when a function returns. When called, these functions do not return until an LTC operation is complete. These functions use main CPU for simple polling loops to determine operation complete or error status and also for plaintext or ciphertext data movements. The driver functions are not re-entrant. These functions provide typical interface to upper layer or application software.
In the second set, DMA support for symmetric LTC processing is provided, for AES and DES engines. APIs in the second set use DMA for data movement to and from the LTC input and output FIFOs. By using these functions, main CPU is not used for plaintext or ciphertext data movements (DMA is used instead). Thus, CPU processing power can be used for other application tasks, at cost of decreased maximum data throughput (because of DMA module and transactions management overhead). These functions provide less typical interface, for applications that must offload main CPU while ciphertext or plaintext is being processed, at cost of longer cryptograhpic processing time.
LTC Driver is initialized by calling the LTC_Init() function, it enables the LTC module clock in the SIM module. If AES or DES engine is used and the LTC module implementation features the LTC DPA Mask Seed register, seed the DPA mask generator by using the seed from a random number generator. The LTC_SetDpaMaskSeed() function is provided to set the DPA mask seed.
LTC operations provided by this driver are not re-entrant. Thus, application software shall ensure the LTC module operation is not requested from different tasks or interrupt service routines while an operation is in progress.
All APIs can be used from interrupt handler although execution time shall be considered (interrupt latency of equal and lower priority interrupts increases).
Initialize LTC after Power On Reset or reset cycle Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ltcEncrypt plaintext by DES engine Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ltc Encrypt plaintext by AES engine Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ltc Compute keyed hash by AES engine (CMAC) Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ltc Compute hash by MDHA engine (SHA-256) Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ltc Compute modular integer exponentiation Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ltc Compute elliptic curve point multiplication Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/ltc
Modules | |
LTC Blocking APIs | |
Functions | |
void | LTC_Init (LTC_Type *base) |
Initializes the LTC driver. More... | |
void | LTC_Deinit (LTC_Type *base) |
Deinitializes the LTC driver. More... | |
Driver version | |
#define | FSL_LTC_DRIVER_VERSION (MAKE_VERSION(2, 0, 15)) |
LTC driver version. More... | |
#define FSL_LTC_DRIVER_VERSION (MAKE_VERSION(2, 0, 15)) |
Version 2.0.15.
Current version: 2.0.14
Change log:
void LTC_Init | ( | LTC_Type * | base | ) |
This function initializes the LTC driver.
base | LTC peripheral base address |
void LTC_Deinit | ( | LTC_Type * | base | ) |
This function deinitializes the LTC driver.
base | LTC peripheral base address |