Arduino Library for the Atmel/Microchip ECC508 and ECC608 crypto chips

Overview

ArduinoECCX08

Compile Examples Status Arduino Lint Status Spell Check Status

Arduino Library for the Atmel/Microchip ECC508 and ECC608 crypto chips

License

Copyright (c) 2018 Arduino SA. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Comments
  • ESP32 support for M5Stack Core2 IoT EduKit

    ESP32 support for M5Stack Core2 IoT EduKit

    I'd like to use this library with the M5Stack Core2 IoT EduKit but there is a compile error on an ESP32 and the I2C address of the ATECC608 is different.

    The compile error fix is from #25

    For the I2C address I can see that with the existing code you can create your own instance with a custom I2C address, but then all the provided utilities don't work so you'd need you own of those too, so this new begin(i2cAddr) function makes it all work more seemlessly.

    What do you think?

    opened by torntrousers 22
  • Adding HMAC and nonce functionality for ATECC608

    Adding HMAC and nonce functionality for ATECC608

    Addressing issue #42

    Adding nonce functionality

    • Exposing challenge private function which does nonce

    Adding HMAC functionality

    • Did not implement for 508
    • beginHMAC: SHA opcode, uses HMAC begin mode.
    • updateHMAC: implements while loop for processing data of different lengths.
    • endHMAC: in 608 does not differ from endSHA256.

    Adding HMAC and nonce example

    • Simple example to do an HMAC 256 operation using nonce and HMAC (0xFFFF is keySlot for TempKey)
    type: enhancement topic: code 
    opened by RLeclair 11
  • Interferences with other I2C components

    Interferences with other I2C components

    Hi,

    I have a rather strange behaviour: as soon as it communicates with the ECC508 chip, the rest of the I2C devices stops.

    It is running on an Arduino MKR WiFI 1010. I used several I2C components (a 4x20 LCD device, a couple of PCF8574 chip, a PN532 NFC reader and a EEPROM.

    Many thanks in advance for your help.

    type: imperfection 
    opened by gpfister 8
  • Possible crash on signatureLength() and appendSignature()

    Possible crash on signatureLength() and appendSignature()

    Hi. There's a bug in ASN1Utils.cpp, in functions that deal with the creation of the signatures (signatureLength, appendSignature) where a value consisting of only zeros can cause problems.

    while (*r == 0x00 && rLength) { should be changed to: while (rLength && *r == 0x00) {

    and

    if (*r & 0x80) { should be changed to: if (rLength && *r & 0x80) {

    Similar changes should be granted to s and sLength.

    Of course the probability of an all zeros signature is remote in a real-case scenario, but not in tests.

    opened by guillep2k 7
  • Update ECCX08.cpp

    Update ECCX08.cpp

    Wire.cpp requestFrom do not understand the bool. It throws the following error: ECCX08.cpp:724:80: error: call of overloaded 'requestFrom(uint8_t, size_t, bool)' is ambiguous

    opened by domjoseph-flg 5
  • Initialisation failure when using TWI pins

    Initialisation failure when using TWI pins

    A user in the forums had issues which were tracked back to this library's begin. When using a motor shield via a MKR to UNO adapter, pins 11 and 12 were interfering with the correct functioning of the TWI. begin() could use a timeout and return failure. This has repercussions on ArduinoIoTCloud. Forum post here https://forum.arduino.cc/index.php?topic=606191.new#new

    opened by ubidefeo 5
  • Buffer overflow in wire.requestFrom()

    Buffer overflow in wire.requestFrom()

    The example script ECCX08RandomNumber.ino did not work correctly. With a logic analyzer on the I2C I can see, that the random number ist transmitted from ATECC508A, but 20 times. It seems, that the buffersize of the wire.h lib can only receive 32 byte and the ATECC sends 32 + 3 byte (length and CRC) byte. This error appears in int ECCX08Class::receiveResponse(void* response, size_t length) and leads to a CRC-error.

    conclusion: declined 
    opened by Skysurfer-14 4
  • Compile error ECCX08RandomNumber.ino

    Compile error ECCX08RandomNumber.ino

    On compiling the example file in Platformio for Arduino UNO, I get an error:

    C:\Users\user.platformio\lib\ArduinoECCX08_ID5570\src\ECCX08.cpp:622:80: error: call of overloaded 'requestFrom(uint8_t, size_t, bool)' is ambiguous

    It seems, that changing the Line 622 of ECCX08.cpp to while (_wire->requestFrom((uint8_t)_address, (size_t)responseSize) != responseSize && retries--); solves the problem.

    conclusion: declined 
    opened by Skysurfer-14 4
  • Define SHA1 function as SHA1_ to make it a

    Define SHA1 function as SHA1_ to make it a "private" symbol when building on Arduino

    This avoids having a global SHA1 symbol so another library can define it.

    Note: the SHA1 code is needed for the self signed certificate sketch because Azure IoT Hub needs a SHA1.

    opened by sandeepmistry 3
  • HMAC SHA256 hashing

    HMAC SHA256 hashing

    According to the datasheet, the ECC508 can do HMAC hashing but I don't see it implemented in this library. Is it possible to do HMAC-SHA256 hashing with this library?

    type: enhancement topic: code conclusion: resolved 
    opened by markpatterson27 2
  • Fixes to various integer encodings

    Fixes to various integer encodings

    Fixed the minimum length for INTEGER types (>=1) Fixed encoding length for negative types Fixed mix of rLength with sLength in appendSignature() Fixed length returned in appendSerialNumber() and appendSignature() Removed zero-length checks where length is guaranteed to be greater than zero.

    opened by guillep2k 2
  • I2C address default

    I2C address default

    Hi, i'm think that Inside the wakeup() method this sentence should be: "_wire->beginTransmission(_address);" instead of " _wire->beginTransmission(0x00);" isn't it?

    type: imperfection topic: code 
    opened by danielazaffalon 0
  • Self-signed cert generation errors out on some slots

    Self-signed cert generation errors out on some slots

    I'm using this on an ESP32 device (M5Stack Core2 for AWS). The error message isn't very specific. Here's what I get trying to use slot 0 and storage slot 8:

    Please enter the issue year of the certificate? (2000 - 2031) [2022]:
    Please enter the issue month of the certificate? (1 - 12) [1]:
    Please enter the issue day of the certificate? (1 - 31) [1]:
    Please enter the issue hour of the certificate? (0 - 23) [0]:
    Please enter how many years the certificate is valid for? (1 - 31) [1]:
    What slot would you like to use for the private key? (0 - 4) [2]: 0
    What slot would you like to use for storage? (8 - 15) [8]: 8
    Would you like to generate a new private key? (Y/n) [Y]: Y
    
    Error starting self signed cert generation!
    

    I was able to eventually get it working with Slot 2, Slot 8 but the "generate new private key" option never worked for me. I also found that some slot combinations outputs the SHA but not the public cert.

    It's been a tough one to troubleshoot because I can only seem to get a working cert about one out of every ten tries.

    type: imperfection 
    opened by scarolan 1
  • Add ECDH key exchange

    Add ECDH key exchange

    This adds a function to perform an ECDH key exchange and adds the standardized AES-GCM encryption/decryption algorithms which use the exchanged key to perform authenticated encryption/decryption.

    type: enhancement topic: code 
    opened by jezcrypt 2
  • CSR generation starting fail on MKR1000

    CSR generation starting fail on MKR1000

    Hi,

    I'm using the MKR1000 board, and trying to generate a CSR with the sketch example ECCX08CSR the code stop at this condition:

    if (!ECCX08CSR.begin(slot.toInt(), generateNewKey.startsWith("Y")) {
      Serial.println("Error starting CSR generation!");
      while (1);"
    

    I locked the chip and get the SerialNumber when starting, it seems to work properly until the CSR genearation. i tried to bypass the condition, the CSR is empty. How can i troubleshoot this ? Thanks for help!

    type: imperfection 
    opened by Iolistic 0
  • Self signed certificate error with using ATECC608A

    Self signed certificate error with using ATECC608A

    Team, we are trying to generate self signed certificate using ATECC608A chip. Our environment is Arduino M0 and ATECC608A chip is connected through I2C line and chip is recognized.

    When we try to generate self signed certificate, we get the error, "Error starting self signed cert generation!" (beginStorage() function fails). When we debugged further, it fails at crc16() function in receiveResponse() in ECCX08.cpp file.

    Any ideas on how to resolve this issue?

    Best regards Malli

    type: imperfection 
    opened by ymallik 1
Releases(1.3.7)
  • 1.3.7(Dec 2, 2022)

    What's Changed

    • Adding HMAC and nonce functionality for ATECC608 by @RLeclair in https://github.com/arduino-libraries/ArduinoECCX08/pull/45

    New Contributors

    • @RLeclair made their first contribution in https://github.com/arduino-libraries/ArduinoECCX08/pull/45

    Full Changelog: https://github.com/arduino-libraries/ArduinoECCX08/compare/1.3.6...1.3.7

    Source code(tar.gz)
    Source code(zip)
  • 1.3.6(Mar 1, 2022)

    Changelog

    • New CI workflows (mispelled words, example compilation, memory usage and linting) . (#29)
    • ESP32 support for M5Stack Core2 IoT EduKit (#30)
    • Adding mbed_portenta and mbed_nano as supported library to ArduinoECCX008 library . (#33)
    Source code(tar.gz)
    Source code(zip)
  • 1.3.5(Jan 18, 2021)

  • 1.3.4(Jul 27, 2020)

Owner
Arduino Libraries
This org contains the official Arduino Libraries. See @arduino for the tools (IDE, Pro IDE, CLI...)
Arduino Libraries
Arduino library for making an IHC in or output module using an Arduino

Introduction This is an Arduino library for making an IHC in or output module using an Arduino. (IHC controller is a home automation controller made b

Jens Østergaard Nielsen 2 Mar 26, 2020
ArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to the Arduino IoT Cloud

ArduinoIoTCloud What? The ArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to the Arduino IoT

Arduino Libraries 64 Dec 16, 2022
The Approximate Library is a WiFi Arduino library for building proximate interactions between your Internet of Things and the ESP8266 or ESP32

The Approximate Library The Approximate library is a WiFi Arduino Library for building proximate interactions between your Internet of Things and the

David Chatting 102 Dec 7, 2022
Arduino library for interfacing with any GPS, GLONASS, Galileo or GNSS module and interpreting its NMEA messages.

107-Arduino-NMEA-Parser Arduino library for interfacing with any GPS, GLONASS, Galileo or GNSS module and interpreting its NMEA messages. This library

107-Systems 15 Jan 1, 2023
Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485

ABB Aurora protocol You can refer the complete documentation on my site ABB Aurora PV inverter library for Arduino, esp8266 and esp32 I create this li

Renzo Mischianti 22 Nov 22, 2022
Arduino library to access Adafruit IO from WiFi, cellular, and ethernet modules.

Adafruit IO Arduino Library This library provides a simple device independent interface for interacting with Adafruit IO using Arduino. It allows you

Adafruit Industries 168 Dec 23, 2022
Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip

Adafruit-PN532 This is a library for the Adafruit PN532 NFC/RFID breakout boards This library works with the Adafruit NFC breakout https://www.adafrui

Adafruit Industries 361 Dec 23, 2022
An Arduino library with additions to vanilla Serial.print(). Chainable methods and verbosity levels. Suitable for debug messages.

advancedSerial This library provides some additions to vanilla Serial.print(): 1. Chainable print() and println() methods: // you can chain print() a

Vasily Klenov 17 Dec 13, 2022
Arduino library for sending email and SMS from nothing but the ESP8266!

Did you know your ESP8266 could send Email and SMS without any special hardware or paid services like Twilio? With AlertMe, your ESP8266 project can:

Lixie Labs 61 Feb 24, 2022
Open Sound Control(OSC) Library for Arduino - modern IDE's (1.6.2 and above)

for Arduino firmware 1.0rc-1 tested Arduino Ethernet http://www.arduino.cc/en/Main/ArduinoBoardEthernet Installation ArdOSC folder into .. Mac ~/Do

Christopher Andrews 7 Feb 14, 2021
A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)

Arduino Websockets A library for writing modern websockets applications with Arduino (see prerequisites for supported platforms). This project is base

Gil Maimon 342 Dec 26, 2022
This Arduino IDE for ArduCAM ESP8266 UNO Board with Integrated ArduCAM Library and Examples

ArduCAM_ESP8266_UNO Please use josn board manager script from http://www.arducam.com/downloads/ESP8266_UNO/package_ArduCAM_index.json to download ESP8

Lee 83 Jan 7, 2023
A Wiring/Arduino library to tokenize and parse commands received over a phisical/software serial port or buffer.

A Wiring/Arduino library to tokenize and parse commands received over a phisical/software serial port or buffer.

Guglielmo Braguglia 5 Jun 9, 2022
Arduino library (SPI) for MS5611 temperature and pressure sensor

MS5611_SPI Arduino library (SPI) for MS5611 temperature and pressure sensor. WARNING EXPERIMENTAL Note: This library is under development and NOT stab

Rob Tillaart 4 Dec 18, 2022
Arduino Library and code to flash CC2510, CC1110 or other Texas Instruments CCxxx Microcontroller

ESP CC flasher This software brings you the possibility to Read and Write the internal Flash of the Texas Instruments CC 8051 series with an ESP32 usi

null 38 Nov 11, 2022
Arduino library for controlling the MCP2515 in order to receive/transmit CAN frames.

107-Arduino-MCP2515 Arduino library for controlling the MCP2515 in order to receive/transmit CAN frames. This library is prepared to interface easily

107-Systems 51 Nov 16, 2022
Arduino library for providing a convenient C++ interface for accessing UAVCAN.

107-Arduino-UAVCAN Arduino library for providing a convenient C++ interface for accessing UAVCAN (v1.0-beta) utilizing libcanard. This library works f

107-Systems 54 Jan 2, 2023
Arduino web server library.

aWOT Arduino web server library. Documentation 1. Getting started Hello World Basic routing Application generator Serving static files 2. Guide Routin

Lasse Lukkari 246 Jan 4, 2023
Arduino library for the MCP2515 CAN Controller

MCP2515 CAN Controller Library for Arduino Compatibility with the ACAN library This library is fully compatible with the Teensy 3.x ACAN library https

Pierre Molinaro 4 Dec 18, 2022