TOP Contributors

  1. MIKROE (2745 codes)
  2. Alcides Ramos (371 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 (138914 times)
  2. FAT32 Library (71500 times)
  3. Network Ethernet Library (56914 times)
  4. USB Device Library (47269 times)
  5. Network WiFi Library (42993 times)
  6. FT800 Library (42282 times)
  7. GSM click (29724 times)
  8. mikroSDK (27668 times)
  9. PID Library (26828 times)
  10. microSD click (26087 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: 957 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

PROFET 10A click

0

PROFET Click is a compact add-on board that contains a smart high-side power switch. This board features the BTS7008-1EPA, a single-channel, high-side power switch with embedded protection and diagnosis feature from Infineon Technologies. This switch has a driving capability suitable for 10A loads featuring a ReverSave™, which causes the power transistor to switch on in case of reverse polarity.

[Learn More]

Accel 15 click

0

Accel 15 Click is a compact add-on board that contains a longevity acceleration sensor. This board features the BMA490L, a high-performance 16-bit digital triaxial acceleration sensor with extended availability of up to ten years from Bosch Sensortech. It allows selectable full-scale acceleration measurements in ranges of ±2g, ±4g, ±8g, and ±16g in three axes with a configurable host interface that supports both I2C and SPI serial communication and with intelligent on-chip motion-triggered interrupt features. Intelligent signal processing and evaluation in the accelerometer ASIC enables advanced gesture recognition for numerous industrial IoT applications where low power consumption is vital. This Click board™ is suitable for home appliances, power tools, and other industrial products whose lifetime is essential.

[Learn More]

Air quality 5 click

0

Air quality 5 click is a triple MOS sensor on a single Click board™, which can detect gas pollution for a number of different gases. The onboard sensor is specially designed to detect the pollution from automobile exhausts, as well as the gas pollution from the industrial or agricultural industry.

[Learn More]