TOP Contributors

  1. MIKROE (2693 codes)
  2. Alcides Ramos (362 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Bugz Bensce (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 (137953 times)
  2. FAT32 Library (70759 times)
  3. Network Ethernet Library (56446 times)
  4. USB Device Library (46827 times)
  5. Network WiFi Library (42588 times)
  6. FT800 Library (41786 times)
  7. GSM click (29468 times)
  8. mikroSDK (27020 times)
  9. PID Library (26662 times)
  10. microSD click (25797 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: 934 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

SPI Isolator 3 click

0

SPI Isolator 3 Click is a compact add-on board that contains a digital isolator optimized for a serial peripheral interface. This board features the MAX14483, a 6-channel 3.75kVRMS digital galvanic isolator with a very low propagation delay on the SDI, SDO, and SCLK channels from Maxim Integrated. Besides a second enable control input, which allows MAX14483 to isolate multiple SPI devices, and an auxiliary channel available for passing timing or control signals from the master side to the slave side, the MAX14483 also possesses power monitors provided for both power domains to signal if the opposite side of the isolator is ready for operation.

[Learn More]

VCP Monitor 2 click

0

VCP Monitor 2 Click is a three-channel, high-side current and bus voltage monitor with alert indication function ensuring the intended application works within desired operating conditions. Featured chip INA3221-Q1, by Texas Instruments, monitors both shunt voltage drops and bus supply voltages, in addition to having programmable conversion times and averaging modes for these signals.

[Learn More]

LDC Touch click

0

LDC Touch Click is a compact add-on board optimized for inductive touch applications. This board features the LDC3114-Q1, a four-channel inductance-to-digital converter for low-power proximity and touch-button sensing from Texas Instruments. It comes with an adjustable sensitivity per input channel and operational power mode selection and measures frequency shifts caused by micro-deflection in the conductive targets formed by button presses. These presses are reported through a compatible I2C interface beside four LED indicators for its visual indication. This Click board™ enables touch button design for human-machine interface and precise linear position sensing of metal targets for automotive, consumer, and industrial applications by allowing access to the raw data representing the inductance value.

[Learn More]