TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136708 times)
  2. FAT32 Library (69921 times)
  3. Network Ethernet Library (55935 times)
  4. USB Device Library (46258 times)
  5. Network WiFi Library (41883 times)
  6. FT800 Library (41144 times)
  7. GSM click (28979 times)
  8. PID Library (26410 times)
  9. mikroSDK (26355 times)
  10. microSD click (25351 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: 899 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

mikromedia for PIC18FJ - Examples

5

Set of examples for mikromedia for PIC18FJ. Provided examples demonstrate working with mikromedia's various features and modules:
- Accelerometer
- MMC SD card
- MP3
- Serial Flash
- TFT
- Touch Panel
- USB

[Learn More]

GNSS 5 click

0

Determine your current position with GNSS 5 click. It carries the NEO-M8N GNSS receiver module from u-blox.

[Learn More]

Microwave 6 click

0

Microwave 6 Click is a compact add-on board that utilizes the Doppler Shift Phenomenon to sense motion. This board features the PD-V8-S, a high-frequency microwave sensor from Ningbo Pdlux Electronic Technology. The transmitter on this transceiver works on a 5.8GHz frequency over the patch antenna, with a 2-3kHz pulse repetition frequency. The strength of the sensor’s output, in other words, the detection range, depends on the Signal-to-Noise ratio.

[Learn More]