Wiring 

  • Connect  Metro or Arduino 5V to board Vcc
  • Connect Metro or Arduino GND to board GND
  • Connect Metro or Arduino SDA to board SDA
  • Connect Metro or Arduino SCL to board SCL
Please note the I2C address is fixed at 0x60 and according to Microchip, you should use this at higher I2C speeds like 400KHz if other devices are on the I2C bus, to avoid some I2C bus contention (much like the datasheet, this is not documented anywhere yet).

Installation

Arduino created an ECCX08 library which can generate a random number, generate a self-signed certificate, and generate a JSON Web Token (JWT).

Click the Manage Libraries ... menu item, search for Arduino ECCX08, and select the ArduinoECCX08 library:

Random Number Demo

This demo demonstrates the ATECC608's ability to quickly generate a random number. 

Open up File -> Examples -> ECCX08 -> ECCX08RandomNumber and upload to your Arduino wired up to the breakout.

Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 9600 baud. You should see a new randomly generated number printing to the serial monitor every second.

Now you know that the board is working!

Self-Signed Certificate Demo

This demo will generate a self signed certificate for a private key generated by your crypto chip. 

Open up File -> Examples -> ECCX08 -> Tools -> ECCX08SelfsignedCert and upload to your Arduino wired up to the breakout.

Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 9600 baud. 

If the chip is not locked, you will be prompted to lock it.

The ECCX08 on your board is not locked, would you like to PERMANENTLY configure and lock it now? (y/N)"

Type Y into the serial monitor and press the enter key. This will permanently lock your chip. You will only do this once.

The code will ask you to enter the issue year of the certificate into the serial monitor. Click send.

Enter the issue month of the certificate into the serial monitor. Click send.

Enter the issue day of the certificate into the serial monitor. Click send.

Enter the issue hour (the current hour, in 24 hour time) of the certificate into the serial monitor. Click send.

Certificates are only valid for a fixed period of time. Enter how many years the certificate is valid for, then click send.

The ATECC608A can store up to 5 private keys. Select the slot you'd like to use for the private key and click send.

The issue date, expiration date, and signature are stored in a different slot on the ATECC608A. Select a slot to use for storing these values.

Enter Y into the serial monitor to generate a new private key. If you have a previous private key stored on the ATECC608A, enter n into the serial monitor to use a key you previously generated and stored in a slot.

The ATECC608A will quickly generate a self signed certificate and display it on the serial monitor. It'll also include a SHA1 hash for verifying the certificate. 

This guide was first published on Sep 02, 2019. It was last updated on Mar 27, 2024.

This page (Arduino) was last updated on Mar 08, 2024.

Text editor powered by tinymce.