ECC608 Crypto Chip: Self-signed Certificate

Introduction

This tutorial demonstrates creating a self-signed certificate using the ECC608 crypto chip on the NEXTuino BASE. The process involves generating a private key within the chip and creating a certificate signed with that key.

Prerequisites

  • Installed Arduino IDE
  • NEXTuino BASE board

Example Code

ECC608 Self-Signed Cert Example on GitHub

Step-by-Step Guide

Step 1: Set Up the Arduino Environment

  1. Connect your NEXTuino BASE to your computer
  2. Open the Arduino IDE and select the appropriate board and port

Step 2: Understanding the Code

The example code:

  • Initializes the ECC608 chip
  • Checks if the chip is locked and prompts to lock it with a default TLS configuration if not
  • Gathers input for certificate details (issue date, expiry, slot numbers)
  • Generates a new private key (if required) and a self-signed certificate
  • Outputs the certificate and its SHA1 fingerprint

Step 3: Load and Upload

  1. Copy the example code into a new Arduino IDE sketch
  2. Click Verify to compile
  3. Click Upload to upload to your NEXTuino BASE

Step 4: Interact with the Program

After uploading, open the Serial Monitor. You will see prompts for:

  • Issue date and time of the certificate
  • Expiry duration
  • Slots for storing the private key and certificate
  • Choice to generate a new key

Step 5: Generate the Certificate

Respond to the Serial Monitor prompts. The program generates a self-signed certificate and displays it along with its SHA1 fingerprint.

Troubleshooting

  • If there is an error related to the ECC608 chip, ensure the chip is correctly configured and locked
  • For Arduino IDE or board connection issues, consult the official Arduino forums

Conclusion

You now have a self-signed certificate generated by the ECC608 chip, usable for various cryptographic purposes to enhance project security.