CryptoAuthLib
Atmel CryptoAuthentication Library
atca_basic_tests.c File Reference

Unity tests for the cryptoauthlib Basic API. More...

Functions

void atca_basic_tests (ATCADeviceType deviceType)
 tests of the Basic Crypto API functionality More...
 
void atca_sha204a_basic_tests (ATCADeviceType deviceType)
 SHA204a tests using the Basic crypto API. More...
 
void atca_ecc108a_basic_tests (ATCADeviceType deviceType)
 ECC108a tests using the Basic crypto API. More...
 
void atca_ecc508a_basic_tests (ATCADeviceType deviceType)
 ECC508a tests using the Basic crypto API. More...
 
void test_basic_version (void)
 
void test_basic_init (void)
 
void test_basic_doubleinit (void)
 
void test_basic_info (void)
 
void test_basic_random (void)
 
void test_basic_challenge (void)
 
void test_basic_write_zone (void)
 
void test_basic_read_zone (void)
 
void test_basic_write_ecc_config_zone (void)
 
void test_basic_read_ecc_config_zone (void)
 
void test_basic_write_config_zone (void)
 
void test_basic_read_config_zone (void)
 
void test_basic_write_sha_config_zone (void)
 
void test_basic_read_sha_config_zone (void)
 
void test_basic_lock_config_zone (void)
 
void test_basic_lock_data_zone (void)
 
void test_basic_lock_data_slot (void)
 
void test_write_boundary_conditions (void)
 
void test_write_upper_slots (void)
 
void test_write_invalid_block (void)
 
void test_write_invalid_block_len (void)
 
void test_write_bytes_slot (void)
 
void test_write_bytes_zone_config (void)
 
void test_basic_write_otp_zone (void)
 
void test_basic_read_otp_zone (void)
 
void test_basic_write_data_zone (void)
 
void test_basic_read_data_zone (void)
 
void test_write_bytes_zone_slot8 (void)
 
void test_basic_genkey (void)
 
void test_basic_sign (void)
 
void test_read_sig (void)
 
void test_create_key (void)
 
void test_get_pubkey (void)
 
void test_basic_priv_write_unencrypted (void)
 
void test_basic_priv_write_encrypted (void)
 
void test_basic_verify_external (void)
 
void test_basic_ecdh (void)
 
void test_basic_gendig (void)
 
void test_basic_mac (void)
 
void test_basic_checkmac (void)
 
void test_basic_sha (void)
 

Variables

ATCAIfaceCfggCfg
 
uint8_t test_ecc_provisioning_configdata [ATCA_CONFIG_SIZE]
 
uint8_t h12015_test_ecc_configdata [ATCA_CONFIG_SIZE]
 
uint8_t w25_test_ecc_configdata [ATCA_CONFIG_SIZE]
 
uint8_t sha204_default_config [ATCA_SHA_CONFIG_SIZE]
 
ATCADevice _gDevice
 basic API methods are all prefixed with atcab_ (Atmel CryptoAuth 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. More...
 

Detailed Description

Unity tests for the cryptoauthlib Basic API.

Copyright (c) 2015 Atmel Corporation. All rights reserved.

Function Documentation

void atca_basic_tests ( ATCADeviceType  deviceType)

tests of the Basic Crypto API functionality

void atca_ecc108a_basic_tests ( ATCADeviceType  deviceType)

ECC108a tests using the Basic crypto API.

void atca_ecc508a_basic_tests ( ATCADeviceType  deviceType)

ECC508a tests using the Basic crypto API.

void atca_sha204a_basic_tests ( ATCADeviceType  deviceType)

SHA204a tests using the Basic crypto API.

void test_basic_challenge ( void  )
void test_basic_checkmac ( void  )
void test_basic_doubleinit ( void  )
void test_basic_ecdh ( void  )
void test_basic_gendig ( void  )
void test_basic_genkey ( void  )
void test_basic_info ( void  )
void test_basic_init ( void  )
void test_basic_lock_config_zone ( void  )
void test_basic_lock_data_slot ( void  )
void test_basic_lock_data_zone ( void  )
void test_basic_mac ( void  )
void test_basic_priv_write_encrypted ( void  )
void test_basic_priv_write_unencrypted ( void  )
void test_basic_random ( void  )
void test_basic_read_config_zone ( void  )
void test_basic_read_data_zone ( void  )
void test_basic_read_ecc_config_zone ( void  )
void test_basic_read_otp_zone ( void  )
void test_basic_read_sha_config_zone ( void  )
void test_basic_read_zone ( void  )
void test_basic_sha ( void  )
void test_basic_sign ( void  )
void test_basic_verify_external ( void  )
void test_basic_version ( void  )
void test_basic_write_config_zone ( void  )
void test_basic_write_data_zone ( void  )
void test_basic_write_ecc_config_zone ( void  )
void test_basic_write_otp_zone ( void  )
void test_basic_write_sha_config_zone ( void  )
void test_basic_write_zone ( void  )
void test_create_key ( void  )
void test_get_pubkey ( void  )
void test_read_sig ( void  )
void test_write_boundary_conditions ( void  )
void test_write_bytes_slot ( void  )
void test_write_bytes_zone_config ( void  )
void test_write_bytes_zone_slot8 ( void  )
void test_write_invalid_block ( void  )
void test_write_invalid_block_len ( void  )
void test_write_upper_slots ( void  )

Variable Documentation

ATCADevice _gDevice

basic API methods are all prefixed with atcab_ (Atmel CryptoAuth 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.

ATCAIfaceCfg* gCfg
uint8_t h12015_test_ecc_configdata[ATCA_CONFIG_SIZE]
uint8_t sha204_default_config[ATCA_SHA_CONFIG_SIZE]
uint8_t test_ecc_provisioning_configdata[ATCA_CONFIG_SIZE]
uint8_t w25_test_ecc_configdata[ATCA_CONFIG_SIZE]
Initial value:
= {
0x01, 0x23, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x04, 0x05, 0x06, 0x07, 0xEE, 0x00, 0x01, 0x00,
0xC0, 0x00, 0x55, 0x00, 0x8F, 0x2F, 0xC4, 0x44, 0x87, 0x20, 0xC4, 0x44, 0x8F, 0x0F, 0x8F, 0x8F,
0x9F, 0x8F, 0x83, 0x64, 0xC4, 0x44, 0xC4, 0x44, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
0x0F, 0x0F, 0x0F, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x33, 0x00, 0x1C, 0x00, 0x13, 0x00, 0x1C, 0x00, 0x3C, 0x00, 0x1C, 0x00, 0x1C, 0x00, 0x33, 0x00,
0x1C, 0x00, 0x1C, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0x3C, 0x00
}