Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
LTC DES driver

Overview

This section describes the programming interface of the LTC DES driver.

Macros

#define LTC_DES_KEY_SIZE   8
 LTC DES key size - 64 bits. More...
 
#define LTC_2DES_KEY_SIZE   16
 LTC DES two key size - 128 bits. More...
 
#define LTC_3DES_KEY_SIZE   24
 LTC DES three key size - 196 bits. More...
 
#define LTC_DES_IV_SIZE   8
 LTC DES IV size - 8 bytes.
 

Functions

ltc_status_t LTC_DRV_des_encrypt_ecb (uint32_t instance, const uint8_t plaintext[8], const uint8_t key[LTC_DES_KEY_SIZE], uint8_t ciphertext[8])
 Encrypts DES using ECB block mode. More...
 
ltc_status_t LTC_DRV_des_decrypt_ecb (uint32_t instance, const uint8_t ciphertext[8], const uint8_t key[LTC_DES_KEY_SIZE], uint8_t plaintext[8])
 Decrypts DES using ECB block mode. More...
 
ltc_status_t LTC_DRV_des_encrypt_cbc (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts DES using CBC block mode. More...
 
ltc_status_t LTC_DRV_des_decrypt_cbc (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts DES using CBC block mode. More...
 
ltc_status_t LTC_DRV_des_encrypt_cfb (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts DES using CFB block mode. More...
 
ltc_status_t LTC_DRV_des_decrypt_cfb (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts DES using CFB block mode. More...
 
ltc_status_t LTC_DRV_des_encrypt_ofb (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts DES using OFB block mode. More...
 
ltc_status_t LTC_DRV_des_decrypt_ofb (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts DES using OFB block mode. More...
 
ltc_status_t LTC_DRV_des2_encrypt_ecb (uint32_t instance, const uint8_t plaintext[8], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], uint8_t ciphertext[8])
 Encrypts triple DES using ECB block mode with two keys. More...
 
ltc_status_t LTC_DRV_des2_decrypt_ecb (uint32_t instance, const uint8_t ciphertext[8], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], uint8_t plaintext[8])
 Decrypts triple DES using ECB block mode with two keys. More...
 
ltc_status_t LTC_DRV_des2_encrypt_cbc (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts triple DES using CBC block mode with two keys. More...
 
ltc_status_t LTC_DRV_des2_decrypt_cbc (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts triple DES using CBC block mode with two keys. More...
 
ltc_status_t LTC_DRV_des2_encrypt_cfb (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts triple DES using CFB block mode with two keys. More...
 
ltc_status_t LTC_DRV_des2_decrypt_cfb (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts triple DES using CFB block mode with two keys. More...
 
ltc_status_t LTC_DRV_des2_encrypt_ofb (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts triple DES using OFB block mode with two keys. More...
 
ltc_status_t LTC_DRV_des2_decrypt_ofb (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts triple DES using OFB block mode with two keys. More...
 
ltc_status_t LTC_DRV_des3_encrypt_ecb (uint32_t instance, const uint8_t plaintext[8], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], const uint8_t key3[LTC_DES_KEY_SIZE], uint8_t ciphertext[8])
 Encrypts triple DES using ECB block mode with three keys. More...
 
ltc_status_t LTC_DRV_des3_decrypt_ecb (uint32_t instance, const uint8_t ciphertext[8], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], const uint8_t key3[LTC_DES_KEY_SIZE], uint8_t plaintext[8])
 Decrypts triple DES using ECB block mode with three keys. More...
 
ltc_status_t LTC_DRV_des3_encrypt_cbc (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], const uint8_t key3[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts triple DES using CBC block mode with three keys. More...
 
ltc_status_t LTC_DRV_des3_decrypt_cbc (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], const uint8_t key3[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts triple DES using CBC block mode with three keys. More...
 
ltc_status_t LTC_DRV_des3_encrypt_cfb (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], const uint8_t key3[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts triple DES using CFB block mode with three keys. More...
 
ltc_status_t LTC_DRV_des3_decrypt_cfb (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], const uint8_t key3[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts triple DES using CFB block mode with three keys. More...
 
ltc_status_t LTC_DRV_des3_encrypt_ofb (uint32_t instance, const uint8_t *plaintext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], const uint8_t key3[LTC_DES_KEY_SIZE], uint8_t *ciphertext)
 Encrypts triple DES using OFB block mode with three keys. More...
 
ltc_status_t LTC_DRV_des3_decrypt_ofb (uint32_t instance, const uint8_t *ciphertext, uint32_t inputSize, const uint8_t iv[LTC_DES_IV_SIZE], const uint8_t key1[LTC_DES_KEY_SIZE], const uint8_t key2[LTC_DES_KEY_SIZE], const uint8_t key3[LTC_DES_KEY_SIZE], uint8_t *plaintext)
 Decrypts triple DES using OFB block mode with three keys. More...
 

Macro Definition Documentation

#define LTC_DES_KEY_SIZE   8
#define LTC_2DES_KEY_SIZE   16
#define LTC_3DES_KEY_SIZE   24

Function Documentation

ltc_status_t LTC_DRV_des_encrypt_ecb ( uint32_t  instance,
const uint8_t  plaintext[8],
const uint8_t  key[LTC_DES_KEY_SIZE],
uint8_t  ciphertext[8] 
)

Encrypts DES using ECB block mode.

Parameters
instanceLTC module instance number
plaintextInput single block (64-bits) of plaintext to encrypt
keyInput key to use for encryption
[out]ciphertextOuput single block (64-bits) of ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des_decrypt_ecb ( uint32_t  instance,
const uint8_t  ciphertext[8],
const uint8_t  key[LTC_DES_KEY_SIZE],
uint8_t  plaintext[8] 
)

Decrypts DES using ECB block mode.

Parameters
instanceLTC module instance number
ciphertextInput single block (64-bits) of ciphertext to decrypt
keyInput key to use for decryption
[out]plaintextOutput single block (64-bits) of plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des_encrypt_cbc ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts DES using CBC block mode.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize 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.
keyInput key to use for encryption
[out]ciphertextOuput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des_decrypt_cbc ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts DES using CBC block mode.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize 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.
keyInput key to use for decryption
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des_encrypt_cfb ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts DES using CFB block mode.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize of input data in bytes
ivInput initial block.
keyInput key to use for encryption
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des_decrypt_cfb ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts DES using CFB block mode.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize of input data in bytes
ivInput initial block.
keyInput key to use for decryption
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des_encrypt_ofb ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts DES using OFB block mode.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize of input 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.
keyInput key to use for encryption
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des_decrypt_ofb ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts DES using OFB block mode.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize of input 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.
keyInput key to use for decryption
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des2_encrypt_ecb ( uint32_t  instance,
const uint8_t  plaintext[8],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
uint8_t  ciphertext[8] 
)

Encrypts triple DES using ECB block mode with two keys.

Parameters
instanceLTC module instance number
plaintextInput single block (64-bits) of plaintext to encrypt
key1First input key for key bundle
key2Second input key for key bundle
[out]ciphertextOutput single block (64-bits) of ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des2_decrypt_ecb ( uint32_t  instance,
const uint8_t  ciphertext[8],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
uint8_t  plaintext[8] 
)

Decrypts triple DES using ECB block mode with two keys.

Parameters
instanceLTC module instance number
ciphertextInput single block (64-bits) of ciphertext to decrypt
key1First input key for key bundle
key2Second input key for key bundle
[out]plaintextOutput single block (64-bits) of plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des2_encrypt_cbc ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts triple DES using CBC block mode with two keys.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize 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.
key1First input key for key bundle
key2Second input key for key bundle
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des2_decrypt_cbc ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts triple DES using CBC block mode with two keys.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize 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.
key1First input key for key bundle
key2Second input key for key bundle
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des2_encrypt_cfb ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts triple DES using CFB block mode with two keys.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize of input data in bytes
ivInput initial block.
key1First input key for key bundle
key2Second input key for key bundle
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des2_decrypt_cfb ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts triple DES using CFB block mode with two keys.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize of input data in bytes
ivInput initial block.
key1First input key for key bundle
key2Second input key for key bundle
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des2_encrypt_ofb ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts triple DES using OFB block mode with two keys.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize of input 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.
key1First input key for key bundle
key2Second input key for key bundle
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des2_decrypt_ofb ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts triple DES using OFB block mode with two keys.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize of input 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.
key1First input key for key bundle
key2Second input key for key bundle
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des3_encrypt_ecb ( uint32_t  instance,
const uint8_t  plaintext[8],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
const uint8_t  key3[LTC_DES_KEY_SIZE],
uint8_t  ciphertext[8] 
)

Encrypts triple DES using ECB block mode with three keys.

Parameters
instanceLTC module instance number
plaintextInput single block (64-bits) of plaintext to encrypt
key1First input key for key bundle
key2Second input key for key bundle
key3Third input key for key bundle
[out]ciphertextOutput single block (64-bits) of ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des3_decrypt_ecb ( uint32_t  instance,
const uint8_t  ciphertext[8],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
const uint8_t  key3[LTC_DES_KEY_SIZE],
uint8_t  plaintext[8] 
)

Decrypts triple DES using ECB block mode with three keys.

Parameters
instanceLTC module instance number
ciphertextInput single block (64-bits) of ciphertext to decrypt
key1First input key for key bundle
key2Second input key for key bundle
key3Third input key for key bundle
[out]plaintextOutput single block (64-bits) of plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des3_encrypt_cbc ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
const uint8_t  key3[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts triple DES using CBC block mode with three keys.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize 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.
key1First input key for key bundle
key2Second input key for key bundle
key3Third input key for key bundle
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des3_decrypt_cbc ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
const uint8_t  key3[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts triple DES using CBC block mode with three keys.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize 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.
key1First input key for key bundle
key2Second input key for key bundle
key3Third input key for key bundle
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des3_encrypt_cfb ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
const uint8_t  key3[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts triple DES using CFB block mode with three keys.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize of input data in bytes
ivInput initial block.
key1First input key for key bundle
key2Second input key for key bundle
key3Third input key for key bundle
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des3_decrypt_cfb ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
const uint8_t  key3[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts triple DES using CFB block mode with three keys.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize of input data in bytes
ivInput initial block.
key1First input key for key bundle
key2Second input key for key bundle
key3Third input key for key bundle
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des3_encrypt_ofb ( uint32_t  instance,
const uint8_t *  plaintext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
const uint8_t  key3[LTC_DES_KEY_SIZE],
uint8_t *  ciphertext 
)

Encrypts triple DES using OFB block mode with three keys.

Parameters
instanceLTC module instance number
plaintextInput plaintext to encrypt
inputSizeSize of input 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.
key1First input key for key bundle
key2Second input key for key bundle
key3Third input key for key bundle
[out]ciphertextOutput ciphertext
Returns
Status from encrypt/decrypt operation
ltc_status_t LTC_DRV_des3_decrypt_ofb ( uint32_t  instance,
const uint8_t *  ciphertext,
uint32_t  inputSize,
const uint8_t  iv[LTC_DES_IV_SIZE],
const uint8_t  key1[LTC_DES_KEY_SIZE],
const uint8_t  key2[LTC_DES_KEY_SIZE],
const uint8_t  key3[LTC_DES_KEY_SIZE],
uint8_t *  plaintext 
)

Decrypts triple DES using OFB block mode with three keys.

Parameters
instanceLTC module instance number
ciphertextInput ciphertext to decrypt
inputSizeSize of input 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.
key1First input key for key bundle
key2Second input key for key bundle
key3Third input key for key bundle
[out]plaintextOutput plaintext
Returns
Status from encrypt/decrypt operation