We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2019-08-15
Package Version: 1.0.0.0
Category: Encryption
Downloaded: 975 times
Not followed.
License: MIT license
Secure 4 click includes the ATECC608A, a secure CryptoAuthenticatio device from Microchip, which is equipped with an EEPROM array which can be used for storing of up to 16 keys, certificates, consumption logging, security configurations and other types of secure data.
Do you want to subscribe in order to receive notifications regarding "Secure 4 Click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Secure 4 Click" changes.
Do you want to report abuse regarding "Secure 4 Click".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1511953806_secure_4_click_mikroc_dspic.zip [784.19KB] | mikroC PRO for dsPIC30/33 & PIC24 |
|
1511953835_secure_4_click_mikroc_pic.zip [886.84KB] | mikroC PRO for PIC |
|
1511953855_secure_4_click_mikroc_pic32.zip [834.69KB] | mikroC PRO for PIC32 |
|
Library Description
This click uses CryptoAuthLib from Atmel, slightly modified to work with MikroElektronika compilers. CryptoAuthLib is designed to cover a wide variety of devices and functions, and it supports all the features of this click. Basic and commonly used functions are contained in atca_basic file, and are marked with atcab_ prefix.
Key functions
ATCA_STATUS atcab_random(uint8_t *rand_out) - Returns a random number
ATCA_STATUS atcab_genkey( int slot, uint8_t *pubkey ) - Generates a key in a given slot
ATCA_STATUS atcab_verify_extern (uint8_t *message, uint8_t *signature, uint8_t *pubkey, bool *verified) - Verifies a signature using a public key
Examples Description
The example demonstrates various functions of the Secure 4 click. It first performs basic functions, that can be executed without permanently locking the device. Using the more advanced functions that are needed to lock the device irreversibly is also shown in the example, but commented out to prevent accidental locking of the device.
Code snippet shows the use of one of the functions that calculates SHA digest of a short message and compares it to the precalculated value.
memset (bufferOut, 0x00, 128); bufferIn [0] = 0x74; bufferIn [1] = 0xba; bufferIn [2] = 0x25; bufferIn [3] = 0x21; if (atcab_sha(4, bufferIn, bufferOut) == ATCA_SUCCESS) { LOG( "rnrn SHA Digest of 0x74BA2521: " ); outputHex (bufferOut, 32); LOG("rn Expected value of digest: "); LOG("B1 6A A5 6B E3 88 0D 18 CD 41 E6 83 84 CF 1E C8 C1 76 80 C4 5A"); LOG(" 02 B1 57 5D C1 51 89 23 AE 8B 0E"); } else LOG( "rn Generating SHA digest of the message failed..." ); delay_ms (1500);
Other MikroElektronika Libraries used in the example:
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.