TOP Contributors

  1. MIKROE (2664 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137143 times)
  2. FAT32 Library (70244 times)
  3. Network Ethernet Library (56133 times)
  4. USB Device Library (46452 times)
  5. Network WiFi Library (42110 times)
  6. FT800 Library (41411 times)
  7. GSM click (29125 times)
  8. mikroSDK (26571 times)
  9. PID Library (26512 times)
  10. microSD click (25508 times)
Libstock prefers package manager

Package Manager

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]

< Back
Library

Secure 4 Click

Rating:

0

Author: MIKROE

Last Updated: 2019-08-15

Package Version: 1.0.0.0

Category: Encryption

Downloaded: 911 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.

No Abuse Reported

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".

  • Information
  • Comments (0)

Library Blog

Secure 4 click

Secure 4 click

Front and back view of the Secure 4 click board.

View full image

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:

  • MemManager
  • Conversions
  • C_String
  • UART

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.

ALSO FROM THIS AUTHOR

Light click

0

This application return the ambient light intensity

[Learn More]

FAN 4 click

5

Fan 4 click is a very compact, two-wire fan driver. It utilizes an integrated 5V, DC, brushless-motor driver chip. Its output voltage regulation and current limiting capabilities allow the speed control for the two-wire DC brushless motors.

[Learn More]

I2C MUX 6 click

0

I2C MUX 6 Click is a compact add-on board representing a bidirectional selector dedicated to I2C slave address conflicts applications. This board features the PCA9518, an expandable five-channel bidirectional buffer controlled by the I2C-bus from Texas Instruments. The PCA9518 overcomes the restriction of maximum bus capacitance by separating and buffering the I2C data (SDA) and clock (SCL) lines into multiple groups of 400pF I2C channels. It provides activation of the desired channel via a given Enable pin and permits extension of the I2C-bus, through an onboard expansion header, by buffering both the data (SDA) and the clock (SCL) lines enabling virtually an unlimited number of buses of 400pF.

[Learn More]