TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 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 (139248 times)
  2. FAT32 Library (71743 times)
  3. Network Ethernet Library (57115 times)
  4. USB Device Library (47428 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28073 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 966 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

DC Motor 17 Click

0

DC Motor 17 Click is a compact add-on board that contains a brushed DC motor driver. This board features the TC78H660FTG, a dual H Bridge driver for one or two brushed motors that incorporate a DMOS with low on-resistance in output transistors from Toshiba Semiconductor. This IC is a PWM controlled constant-current drive with supply voltages from 2.5V to 16V and 2A of output current. It features a sense-resistor less current control architecture and VCC regulator for the internal circuit. Also offers multi-error detect functions with error detection flag output function. This Click board™ is suitable for driving DC motors, controlling the direction of the rotation, as well as brake and regulate the motor current.

[Learn More]

Stepper 3 click

1

STEPPER 3 click is is a board for driving unipolar stepper motors with precise controls (individual motor phases can be accessed separately).

[Learn More]

Accel Click

0

Accel Click is an accessory board in mikroBUS form factor. It features ADXL345 3-axis accelerometer module with ultra-low power and high resolution (13-bit) measurement.

[Learn More]