CryptoAuthLib v3.7.6
Microchip CryptoAuthentication Library
 
Loading...
Searching...
No Matches
Basic Crypto API methods for CryptoAuth Devices (calib_)

These methods provide a simple API to CryptoAuth chips. More...

calib directory - Purpose

The purpose of this directory is to contain the files implementing the APIs for a basic interface to the core CryptoAuthLib library.High-level functions like these make it very convenient to use the library when standard configurations and defaults are in play. They are the easiest to use when developing examples or trying to understand the "flow" of an authentication operation without getting overwhelmed by the details.This makes simple jobs easy and if you need more sophistication and power, you can employ the full power of the CryptoAuthLib object model.See the Doxygen documentation in cryptoauthlib/docs for details on the API of the calib commands.

Data Structures

struct  atca_sha256_ctx
 
struct  atsha204a_config_s
 
struct  atecc508a_config_s
 
struct  atecc608_config_s
 

Macros

#define ATCA_AES_ENABLE_EN_SHIFT   (0)
 
#define ATCA_AES_ENABLE_EN_MASK   (0x01u << ATCA_AES_ENABLE_EN_SHIFT)
 
#define ATCA_I2C_ENABLE_EN_SHIFT   (0)
 
#define ATCA_I2C_ENABLE_EN_MASK   (0x01u << ATCA_I2C_ENABLE_EN_SHIFT)
 
#define ATCA_COUNTER_MATCH_EN_SHIFT   (0)
 
#define ATCA_COUNTER_MATCH_EN_MASK   (0x01u << ATCA_COUNTER_MATCH_EN_SHIFT)
 
#define ATCA_COUNTER_MATCH_KEY_SHIFT   (4)
 
#define ATCA_COUNTER_MATCH_KEY_MASK   (0x0Fu << ATCA_COUNTER_MATCH_KEY_SHIFT)
 
#define ATCA_COUNTER_MATCH_KEY(v)   (ATCA_COUNTER_MATCH_KEY_MASK & (v << ATCA_COUNTER_MATCH_KEY_SHIFT))
 
#define ATCA_CHIP_MODE_I2C_EXTRA_SHIFT   (0)
 
#define ATCA_CHIP_MODE_I2C_EXTRA_MASK   (0x01u << ATCA_CHIP_MODE_I2C_EXTRA_SHIFT)
 
#define ATCA_CHIP_MODE_TTL_EN_SHIFT   (1)
 
#define ATCA_CHIP_MODE_TTL_EN_MASK   (0x01u << ATCA_CHIP_MODE_TTL_EN_SHIFT)
 
#define ATCA_CHIP_MODE_WDG_LONG_SHIFT   (2)
 
#define ATCA_CHIP_MODE_WDG_LONG_MASK   (0x01u << ATCA_CHIP_MODE_WDG_LONG_SHIFT)
 
#define ATCA_CHIP_MODE_CLK_DIV_SHIFT   (3)
 
#define ATCA_CHIP_MODE_CLK_DIV_MASK   (0x1Fu << ATCA_CHIP_MODE_CLK_DIV_SHIFT)
 
#define ATCA_CHIP_MODE_CLK_DIV(v)   (ATCA_CHIP_MODE_CLK_DIV_MASK & (v << ATCA_CHIP_MODE_CLK_DIV_SHIFT))
 
#define ATCA_SLOT_CONFIG_READKEY_SHIFT   (0)
 
#define ATCA_SLOT_CONFIG_READKEY_MASK   (0x0Fu << ATCA_SLOT_CONFIG_READKEY_SHIFT)
 
#define ATCA_SLOT_CONFIG_READKEY(v)   (ATCA_SLOT_CONFIG_READKEY_MASK & (v << ATCA_SLOT_CONFIG_READKEY_SHIFT))
 
#define ATCA_SLOT_CONFIG_NOMAC_SHIFT   (4)
 
#define ATCA_SLOT_CONFIG_NOMAC_MASK   (0x01u << ATCA_SLOT_CONFIG_NOMAC_SHIFT)
 
#define ATCA_SLOT_CONFIG_LIMITED_USE_SHIFT   (5)
 
#define ATCA_SLOT_CONFIG_LIMITED_USE_MASK   (0x01u << ATCA_SLOT_CONFIG_LIMITED_USE_SHIFT)
 
#define ATCA_SLOT_CONFIG_ENC_READ_SHIFT   (6)
 
#define ATCA_SLOT_CONFIG_ENC_READ_MASK   (0x01u << ATCA_SLOT_CONFIG_ENC_READ_SHIFT)
 
#define ATCA_SLOT_CONFIG_IS_SECRET_SHIFT   (7)
 
#define ATCA_SLOT_CONFIG_IS_SECRET_MASK   (0x01u << ATCA_SLOT_CONFIG_IS_SECRET_SHIFT)
 
#define ATCA_SLOT_CONFIG_WRITE_KEY_SHIFT   (8)
 
#define ATCA_SLOT_CONFIG_WRITE_KEY_MASK   ((uint32_t)0x0Fu << ATCA_SLOT_CONFIG_WRITE_KEY_SHIFT)
 
#define ATCA_SLOT_CONFIG_WRITE_KEY(v)   (ATCA_SLOT_CONFIG_WRITE_KEY_MASK & (v << ATCA_SLOT_CONFIG_WRITE_KEY_SHIFT))
 
#define ATCA_SLOT_CONFIG_WRITE_CONFIG_SHIFT   (12)
 
#define ATCA_SLOT_CONFIG_WRITE_CONFIG_MASK   (((uint32_t)0x0Fu << ATCA_SLOT_CONFIG_WRITE_CONFIG_SHIFT))
 
#define ATCA_SLOT_CONFIG_WRITE_CONFIG(v)   ((ATCA_SLOT_CONFIG_WRITE_CONFIG_MASK & ((uint32_t)(v) << ATCA_SLOT_CONFIG_WRITE_CONFIG_SHIFT)))
 
#define ATCA_SLOT_CONFIG_EXT_SIG_SHIFT   (0)
 
#define ATCA_SLOT_CONFIG_EXT_SIG_MASK   (0x01u << ATCA_SLOT_CONFIG_EXT_SIG_SHIFT)
 
#define ATCA_SLOT_CONFIG_INT_SIG_SHIFT   (1)
 
#define ATCA_SLOT_CONFIG_INT_SIG_MASK   (0x01u << ATCA_SLOT_CONFIG_INT_SIG_SHIFT)
 
#define ATCA_SLOT_CONFIG_ECDH_SHIFT   (2)
 
#define ATCA_SLOT_CONFIG_ECDH_MASK   (0x01u << ATCA_SLOT_CONFIG_ECDH_SHIFT)
 
#define ATCA_SLOT_CONFIG_WRITE_ECDH_SHIFT   (3)
 
#define ATCA_SLOT_CONFIG_WRITE_ECDH_MASK   (0x01u << ATCA_SLOT_CONFIG_WRITE_ECDH_SHIFT)
 
#define ATCA_SLOT_CONFIG_GEN_KEY_SHIFT   (8)
 
#define ATCA_SLOT_CONFIG_GEN_KEY_MASK   (0x01u << ATCA_SLOT_CONFIG_GEN_KEY_SHIFT)
 
#define ATCA_SLOT_CONFIG_PRIV_WRITE_SHIFT   (9)
 
#define ATCA_SLOT_CONFIG_PRIV_WRITE_MASK   (0x01u << ATCA_SLOT_CONFIG_PRIV_WRITE_SHIFT)
 
#define ATCA_USE_LOCK_ENABLE_SHIFT   (0)
 
#define ATCA_USE_LOCK_ENABLE_MASK   (0x0Fu << ATCA_USE_LOCK_ENABLE_SHIFT)
 
#define ATCA_USE_LOCK_KEY_SHIFT   (4)
 
#define ATCA_USE_LOCK_KEY_MASK   (0x0Fu << ATCA_USE_LOCK_KEY_SHIFT)
 
#define ATCA_VOL_KEY_PERM_SLOT_SHIFT   (0)
 
#define ATCA_VOL_KEY_PERM_SLOT_MASK   (0x0Fu << ATCA_VOL_KEY_PERM_SLOT_SHIFT)
 
#define ATCA_VOL_KEY_PERM_SLOT(v)   (ATCA_VOL_KEY_PERM_SLOT_MASK & (v << ATCA_VOL_KEY_PERM_SLOT_SHIFT))
 
#define ATCA_VOL_KEY_PERM_EN_SHIFT   (7)
 
#define ATCA_VOL_KEY_PERM_EN_MASK   (0x01u << ATCA_VOL_KEY_PERM_EN_SHIFT)
 
#define ATCA_SECURE_BOOT_MODE_SHIFT   (0)
 
#define ATCA_SECURE_BOOT_MODE_MASK   (0x03u << ATCA_SECURE_BOOT_MODE_SHIFT)
 
#define ATCA_SECURE_BOOT_MODE(v)   (ATCA_SECURE_BOOT_MODE_MASK & (v << ATCA_SECURE_BOOT_MODE_SHIFT))
 
#define ATCA_SECURE_BOOT_PERSIST_EN_SHIFT   (3)
 
#define ATCA_SECURE_BOOT_PERSIST_EN_MASK   (0x01u << ATCA_SECURE_BOOT_PERSIST_EN_SHIFT)
 
#define ATCA_SECURE_BOOT_RAND_NONCE_SHIFT   (4)
 
#define ATCA_SECURE_BOOT_RAND_NONCE_MASK   (0x01u << ATCA_SECURE_BOOT_RAND_NONCE_SHIFT)
 
#define ATCA_SECURE_BOOT_DIGEST_SHIFT   (8)
 
#define ATCA_SECURE_BOOT_DIGEST_MASK   (0x0Fu << ATCA_SECURE_BOOT_DIGEST_SHIFT)
 
#define ATCA_SECURE_BOOT_DIGEST(v)   (ATCA_SECURE_BOOT_DIGEST_MASK & (v << ATCA_SECURE_BOOT_DIGEST_SHIFT))
 
#define ATCA_SECURE_BOOT_PUB_KEY_SHIFT   (12)
 
#define ATCA_SECURE_BOOT_PUB_KEY_MASK   (0x0Fu << ATCA_SECURE_BOOT_PUB_KEY_SHIFT)
 
#define ATCA_SECURE_BOOT_PUB_KEY(v)   (ATCA_SECURE_BOOT_PUB_KEY_MASK & (v << ATCA_SECURE_BOOT_PUB_KEY_SHIFT))
 
#define ATCA_SLOT_LOCKED(v)   ((0x01 << v) & 0xFFFFu)
 
#define ATCA_CHIP_OPT_POST_EN_SHIFT   (0)
 
#define ATCA_CHIP_OPT_POST_EN_MASK   (0x01u << ATCA_CHIP_OPT_POST_EN_SHIFT)
 
#define ATCA_CHIP_OPT_IO_PROT_EN_SHIFT   (1)
 
#define ATCA_CHIP_OPT_IO_PROT_EN_MASK   (0x01u << ATCA_CHIP_OPT_IO_PROT_EN_SHIFT)
 
#define ATCA_CHIP_OPT_KDF_AES_EN_SHIFT   (2)
 
#define ATCA_CHIP_OPT_KDF_AES_EN_MASK   (0x01u << ATCA_CHIP_OPT_KDF_AES_EN_SHIFT)
 
#define ATCA_CHIP_OPT_ECDH_PROT_SHIFT   (8)
 
#define ATCA_CHIP_OPT_ECDH_PROT_MASK   (0x03u << ATCA_CHIP_OPT_ECDH_PROT_SHIFT)
 
#define ATCA_CHIP_OPT_ECDH_PROT(v)   (ATCA_CHIP_OPT_ECDH_PROT_MASK & (v << ATCA_CHIP_OPT_ECDH_PROT_SHIFT))
 
#define ATCA_CHIP_OPT_KDF_PROT_SHIFT   (10)
 
#define ATCA_CHIP_OPT_KDF_PROT_MASK   (0x03u << ATCA_CHIP_OPT_KDF_PROT_SHIFT)
 
#define ATCA_CHIP_OPT_KDF_PROT(v)   (ATCA_CHIP_OPT_KDF_PROT_MASK & (v << ATCA_CHIP_OPT_KDF_PROT_SHIFT))
 
#define ATCA_CHIP_OPT_IO_PROT_KEY_SHIFT   (12)
 
#define ATCA_CHIP_OPT_IO_PROT_KEY_MASK   ((uint16_t)0x0Fu << ATCA_CHIP_OPT_IO_PROT_KEY_SHIFT)
 
#define ATCA_CHIP_OPT_IO_PROT_KEY(v)   (ATCA_CHIP_OPT_IO_PROT_KEY_MASK & (v << ATCA_CHIP_OPT_IO_PROT_KEY_SHIFT))
 
#define ATCA_KEY_CONFIG_OFFSET(x)   (96UL + (x) * 2u)
 
#define ATCA_KEY_CONFIG_PRIVATE_SHIFT   (0)
 
#define ATCA_KEY_CONFIG_PRIVATE_MASK   (0x01u << ATCA_KEY_CONFIG_PRIVATE_SHIFT)
 
#define ATCA_KEY_CONFIG_PUB_INFO_SHIFT   (1)
 
#define ATCA_KEY_CONFIG_PUB_INFO_MASK   (0x01u << ATCA_KEY_CONFIG_PUB_INFO_SHIFT)
 
#define ATCA_KEY_CONFIG_KEY_TYPE_SHIFT   (2)
 
#define ATCA_KEY_CONFIG_KEY_TYPE_MASK   ((0x07u << ATCA_KEY_CONFIG_KEY_TYPE_SHIFT))
 
#define ATCA_KEY_CONFIG_KEY_TYPE(v)   ((ATCA_KEY_CONFIG_KEY_TYPE_MASK & ((v) << ATCA_KEY_CONFIG_KEY_TYPE_SHIFT)))
 
#define ATCA_KEY_CONFIG_LOCKABLE_SHIFT   (5)
 
#define ATCA_KEY_CONFIG_LOCKABLE_MASK   (0x01u << ATCA_KEY_CONFIG_LOCKABLE_SHIFT)
 
#define ATCA_KEY_CONFIG_REQ_RANDOM_SHIFT   (6)
 
#define ATCA_KEY_CONFIG_REQ_RANDOM_MASK   (0x01u << ATCA_KEY_CONFIG_REQ_RANDOM_SHIFT)
 
#define ATCA_KEY_CONFIG_REQ_AUTH_SHIFT   (7)
 
#define ATCA_KEY_CONFIG_REQ_AUTH_MASK   (0x01u << ATCA_KEY_CONFIG_REQ_AUTH_SHIFT)
 
#define ATCA_KEY_CONFIG_AUTH_KEY_SHIFT   (8)
 
#define ATCA_KEY_CONFIG_AUTH_KEY_MASK   (0x0Fu << ATCA_KEY_CONFIG_AUTH_KEY_SHIFT)
 
#define ATCA_KEY_CONFIG_AUTH_KEY(v)   (ATCA_KEY_CONFIG_AUTH_KEY_MASK & (v << ATCA_KEY_CONFIG_AUTH_KEY_SHIFT))
 
#define ATCA_KEY_CONFIG_PERSIST_DIS_SHIFT   (12)
 
#define ATCA_KEY_CONFIG_PERSIST_DIS_MASK   (0x01u << ATCA_KEY_CONFIG_PERSIST_DIS_SHIFT)
 
#define ATCA_KEY_CONFIG_RFU_SHIFT   (13)
 
#define ATCA_KEY_CONFIG_RFU_MASK   (0x01u << ATCA_KEY_CONFIG_RFU_SHIFT)
 
#define ATCA_KEY_CONFIG_X509_ID_SHIFT   (14)
 
#define ATCA_KEY_CONFIG_X509_ID_MASK   (0x03u << ATCA_KEY_CONFIG_X509_ID_SHIFT)
 
#define ATCA_KEY_CONFIG_X509_ID(v)   (ATCA_KEY_CONFIG_X509_ID_MASK & (v << ATCA_KEY_CONFIG_X509_ID_SHIFT))
 

Typedefs

typedef struct atca_sha256_ctx atca_sha256_ctx_t
 
typedef atca_sha256_ctx_t atca_hmac_sha256_ctx_t
 
typedef struct ATCA_PACKED atsha204a_config_s atsha204a_config_t
 
typedef struct ATCA_PACKED atecc508a_config_s atecc508a_config_t
 
typedef struct ATCA_PACKED atecc608_config_s atecc608_config_t
 

Functions

ATCA_STATUS calib_wakeup_i2c (ATCADevice device)
 basic API methods are all prefixed with atcab_ (CryptoAuthLib Basic) the fundamental premise of the basic API is it is based on a single interface instance and that instance is global, so all basic API commands assume that one global device is the one to operate on.
 
ATCA_STATUS calib_wakeup (ATCADevice device)
 wakeup the CryptoAuth device
 
ATCA_STATUS calib_idle (ATCADevice device)
 idle the CryptoAuth device
 
ATCA_STATUS calib_sleep (ATCADevice device)
 invoke sleep on the CryptoAuth device
 
ATCA_STATUS calib_exit (ATCADevice device)
 common cleanup code which idles the device after any operation
 
ATCA_STATUS calib_get_addr (uint8_t zone, uint16_t slot, uint8_t block, uint8_t offset, uint16_t *addr)
 Compute the address given the zone, slot, block, and offset.
 
ATCA_STATUS calib_get_zone_size (ATCADevice device, uint8_t zone, uint16_t slot, size_t *size)
 Gets the size of the specified zone in bytes.
 
ATCA_STATUS calib_ca2_get_addr (uint8_t zone, uint16_t slot, uint8_t block, uint8_t offset, uint16_t *addr)
 Compute the address given the zone, slot, block, and offset for the device.
 
ATCA_STATUS calib_is_locked (ATCADevice device, uint8_t zone, bool *is_locked)
 
ATCA_STATUS calib_is_slot_locked (ATCADevice device, uint16_t slot, bool *is_locked)
 
ATCA_STATUS calib_ca2_is_locked (ATCADevice device, uint8_t zone, bool *is_locked)
 Use Info command to check config/data is locked or not.
 
ATCA_STATUS calib_ca2_is_data_locked (ATCADevice device, bool *is_locked)
 Use Info command to check ECC204 Data zone lock status.
 
ATCA_STATUS calib_ca2_is_config_locked (ATCADevice device, bool *is_locked)
 Executes Read command, which reads the configuration zone to see if the specified slot is locked.
 
ATCADeviceType calib_get_devicetype (uint8_t revision[4])
 Parse the revision field to get the device type.
 
ATCADeviceType calib_get_devicetype_with_device_id (uint8_t device_id, uint8_t device_revision)
 
ATCA_STATUS calib_info_base (ATCADevice device, uint8_t mode, uint16_t param2, uint8_t *out_data)
 Issues an Info command, which return internal device information and can control GPIO and the persistent latch.
 
ATCA_STATUS calib_info (ATCADevice device, uint8_t *revision)
 Use the Info command to get the device revision (DevRev).
 
ATCA_STATUS calib_info_privkey_valid (ATCADevice device, uint16_t key_id, uint8_t *is_valid)
 Use Info command to check ECC Private key stored in key slot is valid or not.
 
ATCA_STATUS calib_info_lock_status (ATCADevice device, uint16_t param2, uint8_t *is_locked)
 Use Info command to ECC204,TA010 config/data zone lock status.
 
ATCA_STATUS calib_info_chip_status (ATCADevice device, uint8_t *chip_status)
 Use Info command to get ECC204,TA010,SHA10x chip status.
 

Detailed Description

These methods provide a simple API to CryptoAuth chips.

Function Documentation

◆ calib_ca2_get_addr()

ATCA_STATUS calib_ca2_get_addr ( uint8_t  zone,
uint16_t  slot,
uint8_t  block,
uint8_t  offset,
uint16_t *  addr 
)

Compute the address given the zone, slot, block, and offset for the device.

Parameters
[in]zoneZone to get address from. Config(1) or Data(0) which requires a slot.
[in]slotSlot Id number for data zone and zero for other zones.
[in]blockBlock number within the data zone .
[in]offsetAalways zero.
[out]addrPointer to the address of data or configuration zone.
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_ca2_is_config_locked()

ATCA_STATUS calib_ca2_is_config_locked ( ATCADevice  device,
bool *  is_locked 
)

Executes Read command, which reads the configuration zone to see if the specified slot is locked.

Parameters
[in]deviceDevice context pointer
[in]slotSlot to query for locked (slot 0-15)
[out]is_lockedLock state returned here. True if locked.
Returns
ATCA_SUCCESS on success, otherwise an error code.

Use Info command to check ECC204 Config zone lock status

Parameters
[in]deviceDevice context pointer
[out]is_lockedreturn lock status
Returns
ATCA_SUCCESS on success, otherwise an error code

◆ calib_ca2_is_data_locked()

ATCA_STATUS calib_ca2_is_data_locked ( ATCADevice  device,
bool *  is_locked 
)

Use Info command to check ECC204 Data zone lock status.

Parameters
[in]deviceDevice context pointer
[out]is_lockedreturn lock status
Returns
ATCA_SUCCESS on success, otherwise an error code

◆ calib_ca2_is_locked()

ATCA_STATUS calib_ca2_is_locked ( ATCADevice  device,
uint8_t  zone,
bool *  is_locked 
)

Use Info command to check config/data is locked or not.

Parameters
[in]deviceDevice contect pointer
[in]zoneConfig/Data zone
[out]is_lockedreturn lock status here
Returns
ATCA_SUCCESS on success, otherwise an error code

◆ calib_exit()

ATCA_STATUS calib_exit ( ATCADevice  device)

common cleanup code which idles the device after any operation

Parameters
[in]deviceDevice context pointer
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_get_addr()

ATCA_STATUS calib_get_addr ( uint8_t  zone,
uint16_t  slot,
uint8_t  block,
uint8_t  offset,
uint16_t *  addr 
)

Compute the address given the zone, slot, block, and offset.

Parameters
[in]zoneZone to get address from. Config(0), OTP(1), or Data(2) which requires a slot.
[in]slotSlot Id number for data zone and zero for other zones.
[in]blockBlock number within the data or configuration or OTP zone .
[in]offsetOffset Number within the block of data or configuration or OTP zone.
[out]addrPointer to the address of data or configuration or OTP zone.
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_get_zone_size()

ATCA_STATUS calib_get_zone_size ( ATCADevice  device,
uint8_t  zone,
uint16_t  slot,
size_t *  size 
)

Gets the size of the specified zone in bytes.

Parameters
[in]deviceDevice context pointer
[in]zoneZone to get size information from. Config(0), OTP(1), or Data(2) which requires a slot.
[in]slotIf zone is Data(2), the slot to query for size.
[out]sizeZone size is returned here.
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_idle()

ATCA_STATUS calib_idle ( ATCADevice  device)

idle the CryptoAuth device

Parameters
[in]deviceDevice context pointer
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_info()

ATCA_STATUS calib_info ( ATCADevice  device,
uint8_t *  revision 
)

Use the Info command to get the device revision (DevRev).

Parameters
[in]deviceDevice context pointer
[out]revisionDevice revision is returned here (4 bytes).
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_info_base()

ATCA_STATUS calib_info_base ( ATCADevice  device,
uint8_t  mode,
uint16_t  param2,
uint8_t *  out_data 
)

Issues an Info command, which return internal device information and can control GPIO and the persistent latch.

Parameters
[in]deviceDevice context pointer
[in]modeSelects which mode to be used for info command.
[in]param2Selects the particular fields for the mode.
[out]out_dataResponse from info command (4 bytes). Can be set to NULL if not required.
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_info_chip_status()

ATCA_STATUS calib_info_chip_status ( ATCADevice  device,
uint8_t *  chip_status 
)

Use Info command to get ECC204,TA010,SHA10x chip status.

Parameters
[in]deviceDevice context pointer
[out]chip_statusreturn chip status here
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_info_lock_status()

ATCA_STATUS calib_info_lock_status ( ATCADevice  device,
uint16_t  param2,
uint8_t *  is_locked 
)

Use Info command to ECC204,TA010 config/data zone lock status.

Parameters
[in]deviceDevice context pointer
[in]param2selects the zone and slot
[out]is_lockedreturn lock status here
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_info_privkey_valid()

ATCA_STATUS calib_info_privkey_valid ( ATCADevice  device,
uint16_t  key_id,
uint8_t *  is_valid 
)

Use Info command to check ECC Private key stored in key slot is valid or not.

Parameters
[in]deviceDevice context pointer
[in]key_idECC private key slot id For ECC204,TA010 key_id is 0x00
[out]is_validreturn private key is valid or invalid
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_sleep()

ATCA_STATUS calib_sleep ( ATCADevice  device)

invoke sleep on the CryptoAuth device

Parameters
[in]deviceDevice context pointer
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_wakeup()

ATCA_STATUS calib_wakeup ( ATCADevice  device)

wakeup the CryptoAuth device

Parameters
[in]deviceDevice context pointer
Returns
ATCA_SUCCESS on success, otherwise an error code.

◆ calib_wakeup_i2c()

ATCA_STATUS calib_wakeup_i2c ( ATCADevice  device)

basic API methods are all prefixed with atcab_ (CryptoAuthLib Basic) the fundamental premise of the basic API is it is based on a single interface instance and that instance is global, so all basic API commands assume that one global device is the one to operate on.

Drive the SDA pin low for wake up Set i2c device addr as 0U to drive SDA low

I2C general call should not interpreted as an addr write

Set the i2c device address