使用 cryptoauthlib 配置 ATEC608A

Configuring the ATEC608A with the cryptoauthlib

我尝试通过调用 atcab_write_config_zone() 并传递 128 个字节(这是配置的大小)来使用 cryptoauthlib 配置 ATEC608A。我在网上找到了一个示例,但我无法弄清楚,也没有在网上找到文档我必须在哪种情况下配置哪些字节。

有谁知道密码芯片是如何配置的,以及在调用 atcab_priv_write() 时我究竟需要设置什么?

我无需配置即可使用某些功能: AES 有效, 生成密钥有效, 得到一个随机数的作品, 获取版本和序列作品

我使用了以下示例,但不知道哪些字节会影响哪些功能:

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
};

我在 github 上开了一个问题:issue

来自 ATECC608A microchip site there is docs AN_8845 - ATSHA204A and ATECC508A Personalization Guide,可以从中阅读第 1 Personalize Configuration Zone 部分:

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

嗯,从 ATSHA204A microchip site from Complete Datasheet 开始,整个配置区域在 2.1.2 Configuration Zone 中进行了描述:

下面是配置区内各个字段的说明。单插槽配置在 ATECC608A 文档中,而整体配置区域结构在 ATSHA204A 文档中。

Microchip 有时以其优质而广泛的文档而闻名。在所有 CryptoAuthLib 支持的设备上,有大量的 doxygens 和源代码和示例以及更多在线可用。