Libtropic API
SDK for the TROPIC01 secure element
Version: master (latest)
Loading...
Searching...
No Matches

◆ lt_aesgcm_decrypt()

lt_ret_t lt_aesgcm_decrypt ( void *  ctx,
const uint8_t *  iv,
const uint32_t  iv_len,
const uint8_t *  add,
const uint32_t  add_len,
const uint8_t *  ciphertext,
const uint32_t  ciphertext_len,
uint8_t *  plaintext,
const uint32_t  plaintext_len 
)
Parameters
ctxAES-GCM context structure
ivThe initialisation vector
iv_lenLength of the initialization vector
addAdditional data
add_lenLength of additional data
ciphertextInput ciphertext buffer (data + tag)
ciphertext_lenLength of the ciphertext buffer
plaintextBuffer to store plaintext
plaintext_lenLength of the plaintext buffer
Returns
LT_OK if success, otherwise returns other error code.