MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Ltc_driver_des_with_dpa

Overview

Functions

status_t LTC_DES_SetKeyDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t key1[LTC_DPA_DES_KEY_SIZE], const uint8_t key2[LTC_DPA_DES_KEY_SIZE], const uint8_t key3[LTC_DPA_DES_KEY_SIZE])
 Set key for LTC DPA DES operations. More...
 
status_t LTC_DES_EncryptEcbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size)
 Encrypts DES using ECB block mode. More...
 
status_t LTC_DES_DecryptEcbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size)
 Decrypts DES using ECB block mode. More...
 
status_t LTC_DES_EncryptCbcDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts DES using CBC block mode. More...
 
status_t LTC_DES_DecryptCbcDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts DES using CBC block mode. More...
 
status_t LTC_DES_EncryptCfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts DES using CFB block mode. More...
 
status_t LTC_DES_DecryptCfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts DES using CFB block mode. More...
 
status_t LTC_DES_EncryptOfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts DES using OFB block mode. More...
 
status_t LTC_DES_DecryptOfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts DES using OFB block mode. More...
 
status_t LTC_DES2_EncryptEcbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size)
 Encrypts triple DES using ECB block mode with two keys. More...
 
status_t LTC_DES2_DecryptEcbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size)
 Decrypts triple DES using ECB block mode with two keys. More...
 
status_t LTC_DES2_EncryptCbcDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts triple DES using CBC block mode with two keys. More...
 
status_t LTC_DES2_DecryptCbcDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts triple DES using CBC block mode with two keys. More...
 
status_t LTC_DES2_EncryptCfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts triple DES using CFB block mode with two keys. More...
 
status_t LTC_DES2_DecryptCfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts triple DES using CFB block mode with two keys. More...
 
status_t LTC_DES2_EncryptOfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts triple DES using OFB block mode with two keys. More...
 
status_t LTC_DES2_DecryptOfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts triple DES using OFB block mode with two keys. More...
 
status_t LTC_DES3_EncryptEcbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size)
 Encrypts triple DES using ECB block mode with three keys. More...
 
status_t LTC_DES3_DecryptEcbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size)
 Decrypts triple DES using ECB block mode with three keys. More...
 
status_t LTC_DES3_EncryptCbcDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts triple DES using CBC block mode with three keys. More...
 
status_t LTC_DES3_DecryptCbcDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts triple DES using CBC block mode with three keys. More...
 
status_t LTC_DES3_EncryptCfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts triple DES using CFB block mode with three keys. More...
 
status_t LTC_DES3_DecryptCfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts triple DES using CFB block mode with three keys. More...
 
status_t LTC_DES3_EncryptOfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *plaintext, uint8_t *ciphertext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Encrypts triple DES using OFB block mode with three keys. More...
 
status_t LTC_DES3_DecryptOfbDPA (LTC_Type *base, ltc_dpa_handle_t *handle, const uint8_t *ciphertext, uint8_t *plaintext, size_t size, const uint8_t iv[LTC_DPA_DES_IV_SIZE])
 Decrypts triple DES using OFB block mode with three keys. More...
 

Function Documentation

status_t LTC_DES_SetKeyDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t  key1[LTC_DPA_DES_KEY_SIZE],
const uint8_t  key2[LTC_DPA_DES_KEY_SIZE],
const uint8_t  key3[LTC_DPA_DES_KEY_SIZE] 
)

This function sets key for usage with LTC DPA DES functions.

Parameters
baseLTC module base address
[in,out]handlePointer to ltc_dpa_handle_t structure
key1The 1st 8-byte key.
key2The 2nd 8-byte key. Can be NULL if running simple DES.
key3The 3rd 8-byte key. Can be NULL if running 3DES with 2 keys (16-byte key).
Returns
Status.
status_t LTC_DES_EncryptEcbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size 
)

Encrypts DES using ECB block mode.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and output data in bytes. Must be multiple of 8 bytes.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES_DecryptEcbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size 
)

Decrypts DES using ECB block mode.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes. Must be multiple of 8 bytes.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES_EncryptCbcDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts DES using CBC block mode.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOuput ciphertext
sizeSize of input and output data in bytes
ivInput initial vector to combine with the first plaintext block. The iv does not need to be secret, but it must be unpredictable.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES_DecryptCbcDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts DES using CBC block mode.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input data in bytes
ivInput initial vector to combine with the first plaintext block. The iv does not need to be secret, but it must be unpredictable.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES_EncryptCfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts DES using CFB block mode.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
sizeSize of input data in bytes
ivInput initial block.
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
status_t LTC_DES_DecryptCfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts DES using CFB block mode.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes
ivInput initial block.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES_EncryptOfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts DES using OFB block mode.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and output data in bytes
ivInput unique input vector. The OFB mode requires that the IV be unique for each execution of the mode under the given key.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES_DecryptOfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts DES using OFB block mode.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes. Must be multiple of 8 bytes.
ivInput unique input vector. The OFB mode requires that the IV be unique for each execution of the mode under the given key.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES2_EncryptEcbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size 
)

Encrypts triple DES using ECB block mode with two keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and output data in bytes. Must be multiple of 8 bytes.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES2_DecryptEcbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size 
)

Decrypts triple DES using ECB block mode with two keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes. Must be multiple of 8 bytes.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES2_EncryptCbcDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts triple DES using CBC block mode with two keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and output data in bytes
ivInput initial vector to combine with the first plaintext block. The iv does not need to be secret, but it must be unpredictable.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES2_DecryptCbcDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts triple DES using CBC block mode with two keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes
ivInput initial vector to combine with the first plaintext block. The iv does not need to be secret, but it must be unpredictable.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES2_EncryptCfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts triple DES using CFB block mode with two keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and output data in bytes
ivInput initial block.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES2_DecryptCfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts triple DES using CFB block mode with two keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes
ivInput initial block.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES2_EncryptOfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts triple DES using OFB block mode with two keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and output data in bytes
ivInput unique input vector. The OFB mode requires that the IV be unique for each execution of the mode under the given key.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES2_DecryptOfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts triple DES using OFB block mode with two keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes
ivInput unique input vector. The OFB mode requires that the IV be unique for each execution of the mode under the given key.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES3_EncryptEcbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size 
)

Encrypts triple DES using ECB block mode with three keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and output data in bytes. Must be multiple of 8 bytes.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES3_DecryptEcbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size 
)

Decrypts triple DES using ECB block mode with three keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes. Must be multiple of 8 bytes.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES3_EncryptCbcDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts triple DES using CBC block mode with three keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input data in bytes
ivInput initial vector to combine with the first plaintext block. The iv does not need to be secret, but it must be unpredictable.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES3_DecryptCbcDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts triple DES using CBC block mode with three keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes
ivInput initial vector to combine with the first plaintext block. The iv does not need to be secret, but it must be unpredictable.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES3_EncryptCfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts triple DES using CFB block mode with three keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and ouput data in bytes
ivInput initial block.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES3_DecryptCfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts triple DES using CFB block mode with three keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input data in bytes
ivInput initial block.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES3_EncryptOfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  plaintext,
uint8_t *  ciphertext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Encrypts triple DES using OFB block mode with three keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
plaintextInput plaintext to encrypt
[out]ciphertextOutput ciphertext
sizeSize of input and output data in bytes
ivInput unique input vector. The OFB mode requires that the IV be unique for each execution of the mode under the given key.
Returns
Status from encrypt/decrypt operation
status_t LTC_DES3_DecryptOfbDPA ( LTC_Type *  base,
ltc_dpa_handle_t handle,
const uint8_t *  ciphertext,
uint8_t *  plaintext,
size_t  size,
const uint8_t  iv[LTC_DPA_DES_IV_SIZE] 
)

Decrypts triple DES using OFB block mode with three keys.

Parameters
baseLTC peripheral base address
handlepointer to ltc_dpa_handle_t structure which stores the transaction state.
ciphertextInput ciphertext to decrypt
[out]plaintextOutput plaintext
sizeSize of input and output data in bytes
ivInput unique input vector. The OFB mode requires that the IV be unique for each execution of the mode under the given key.
Returns
Status from encrypt/decrypt operation