libtropic
C library for TROPIC01 chip

◆ lt_ecc_ecdsa_sign()

lt_ret_t lt_ecc_ecdsa_sign ( lt_handle_t h,
const ecc_slot_t  ecc_slot,
const uint8_t *  msg,
const uint16_t  msg_len,
uint8_t *  rs,
const uint8_t  rs_len 
)
Parameters
hDevice's handle
ecc_slotSlot containing a private key, ECC_SLOT_0 - ECC_SLOT_31
msgBuffer containing a message
msg_lenLength of msg's buffer
rsBuffer for storing a signature in a form of R and S bytes
rs_lenLength of rs buffer should be 64B
Returns
LT_OK if success, otherwise returns other error code.