CryptoAuthLib
Atmel CryptoAuthentication Library
atca_host.c File Reference

Host side methods to support CryptoAuth computations. More...

Functions

uint8_t * atcah_include_data (struct atca_include_data_in_out *param)
 This function copies otp and sn data into a command buffer. More...
 
ATCA_STATUS atcah_nonce (struct atca_nonce_in_out *param)
 This function calculates a 32-byte nonce based on a 20-byte input value (param->num_in) and 32-byte random number (param->rand_out). More...
 
ATCA_STATUS atcah_mac (struct atca_mac_in_out *param)
 This function generates an SHA-256 digest (MAC) of a key, challenge, and other information. More...
 
ATCA_STATUS atcah_check_mac (struct atca_check_mac_in_out *param)
 This function calculates a SHA-256 digest (MAC) of a password and other information, to be verified using the CheckMac device command. More...
 
ATCA_STATUS atcah_hmac (struct atca_hmac_in_out *param)
 This function generates an HMAC / SHA-256 hash of a key and other information. More...
 
ATCA_STATUS atcah_gen_dig (struct atca_gen_dig_in_out *param)
 This function combines the current TempKey with a stored value. More...
 
ATCA_STATUS atcah_gen_mac (struct atca_gen_dig_in_out *param)
 This function combines the session key with a plain text. More...
 
ATCA_STATUS atcah_write_auth_mac (struct atca_write_mac_in_out *param)
 This function calculates the input MAC for the PrivWrite command. More...
 
ATCA_STATUS atcah_privwrite_auth_mac (struct atca_write_mac_in_out *param)
 This function calculates the input MAC for the PrivWrite command. More...
 
ATCA_STATUS atcah_derive_key (struct atca_derive_key_in_out *param)
 This function combines a key with the TempKey. More...
 
ATCA_STATUS atcah_derive_key_mac (struct atca_derive_key_mac_in_out *param)
 This function calculates the input MAC for a DeriveKey command. More...
 
ATCA_STATUS atcah_encrypt (struct atca_encrypt_in_out *param)
 This function encrypts 32-byte plain text data to be written using Write opcode, and optionally calculates input MAC. More...
 
ATCA_STATUS atcah_decrypt (struct atca_decrypt_in_out *param)
 This function decrypts 32-byte encrypted data received with the Read command. More...
 
ATCA_STATUS atcah_sha256 (int32_t len, const uint8_t *message, uint8_t *digest)
 This function creates a SHA256 digest on a little-endian system. More...
 

Detailed Description

Host side methods to support CryptoAuth computations.