wirenboard / atecc-util

Linux command-line tool for ATECC608A and ATECC508A
MIT License
37 stars 17 forks source link

Got error 0xF4 when try to use ecc-gen #5

Open JacobBai opened 3 years ago

JacobBai commented 3 years ago

Hi there,

I am currently using AETCC608A with raspberry pi cm3 on my customized PCB. The chip is connected to I2C-0 and I can talk to it successfully, like read-config, write-config and check if data-is-locked, config-is-locked. But when I was trying ecc-gen, I keep got error 0xf4. I also tried other slots, got same error

The command is : atecc -b 0 -c 'ecc-gen 2' Command atcab_get_pubkey is failed with status 0xf4

The configuration of the chip: ( I found the configuration for 608a under https://github.com/MicrochipTech/cryptoauthlib/blob/1cb00def6dba72e82465a5a8584e7f2a98195e24/test/api_calib/test_calib_config.c) which is: uint8_t test_ecc608_configdata[ATCA_ECC_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, 0x3A, 0x10, 0x1C, 0x00, 0x33, 0x00, //111 0x1C, 0x00, 0x1C, 0x00, 0x38, 0x00, 0x30, 0x00, 0x3C, 0x00, 0x3C, 0x00, 0x32, 0x00, 0x30, 0x00 //127 };

did I miss something here?

Many thanks, Jacob

evgeny-boger commented 3 years ago

Hi Jacob!

What is the output of atecc -c dump-config ?

I would suggest to take a look at ATECC508A complete datasheet as it's now available without NDA.

JacobBai commented 3 years ago

Thanks for your quick reply!

Do I have to lock the data and config zone to generate the key and use other functions?

evgeny-boger commented 3 years ago

As far as I'm concerned - yes, you do. Someone leaked ATECC608A complete datasheet too, so better confirm there.

JacobBai commented 3 years ago

Thanks, I think that's the reason for this error. But I haven't finished the configuration, so can't test it right now. I will update after I got the configuration done and locked the chip.