Search code examples
cmicrocontrollermicrochip

Configuring the ATEC608A with the cryptoauthlib


I try to configure the ATEC608A with the cryptoauthlib by calling atcab_write_config_zone() and passing 128 bytes, which is the size of a configuration. I found an example online, but I can't figure out, nor find a documentation online which bytes I have to configure in which scenario.

Does anyone know how the cryptochip is configured and what exactly I have to set when callig atcab_priv_write() for example?

I am able to use certain functionality without configuration: AES works, generating keys works, getting a random number works, getting version and serial works

I used the following example, but have no idea which bytes influence which functionality:

uint8_t g_dev_config[ATCA_CONFIG_SIZE] = {
    0x01,0x23,0x00,0x00,
    0x00,0x00,0x60,0x00,
    0x04,0x05,0x06,0x07,
    0xEE,0x01,0x01,0x00, //15
    0xC0,0x00,0xA1,0x00,
    0xAF,0x2F,0xC4,0x44,
    0x87,0x20,0xC4,0xF4,
    0x8F,0x0F,0x0F,0x0F, //31
    0x9F,0x8F,0x83,0x64,
    0xC4,0x44,0xC4,0x64,
    0x0F,0x0F,0x0F,0x0F,
    0x0F,0x0F,0x0F,0x0F, //47
    0x0F,0x0F,0x0F,0x0F,
    0xFF,0xFF,0xFF,0xFF,
    0x00,0x00,0x00,0x00,
    0xFF,0xFF,0xFF,0xFF, //63
    0x00,0x00,0x00,0x00,
    0xFF,0x84,0x03,0xBC,
    0x09,0x69,0x76,0x00,
    0x00,0x00,0x00,0x00, //79
    0x00,0x00,0x00,0x00,
    0x00,0x00,0x00,0x00,
    0xFF,0xFF,0x0E,0x40,
    0x00,0x00,0x00,0x00, //95
    0x33,0x00,0x1C,0x00,
    0x13,0x00,0x1C,0x00,
    0x3C,0x00,0x3E,0x00,
    0x1C,0x00,0x33,0x00, //111
    0x1C,0x00,0x1C,0x00,
    0x38,0x10,0x30,0x00,
    0x3C,0x00,0x3C,0x00,
    0x32,0x00,0x30,0x00 //127
};

I opened an issue on github: issue


Solution

  • From ATECC608A microchip site there is docs AN_8845 - ATSHA204A and ATECC508A Personalization Guide from which one can read in section 1 Personalize Configuration Zone:

    The details of these bytes are described below. For more information, please refer to latest ATSHA204A or ATECC508A datasheet.

    Well, from ATSHA204A microchip site from Complete Datasheet the whole configuration zone is described in 2.1.2 Configuration Zone:

    enter image description here

    Following with description of each field inside the configuration zone. The single slots configuration is in the ATECC608A documentation while the overall confgiuration zone structure is in the ATSHA204A documentation.

    Microchip is sometimes known of it's good and extensive documentation. There are numerous doxygens and source codes and examples and more available online on all CryptoAuthLib supported devices.