MicrochipTech / cryptoauth-openssl-engine

DEPRECATED: Use https://github.com/MicrochipTech/cryptoauthlib/wiki/PKCS11-Linux-Setup
Other
76 stars 49 forks source link

ATSHA204A is being using, not the ATECC508 #7

Closed abilbaotm closed 6 years ago

abilbaotm commented 6 years ago

Hi.

I have the AT88CK590 Evaluation Kit connected via USB. But when running the tests the ATSHA204A crypto chip is being used. Is this normal? Can I always use the ECC chip?

Regards.

abilbaotm commented 6 years ago

For example, When I run the ecc-test-main I get:

cd engine_atecc/
# ./ecc-test-main 
atcatls_tests.c
:142:test_atcatls_get_sn
:PASS

atcatls_tests.c
:182:test_atcatls_config_default
:FAIL
: Expected 
0 Was 
225
atcatls_tests.c
:148:test_atcatls_random
:PASS

atcatls_tests.c
:151:test_atcatls_init_finish
:PASS

atcatls_tests.c
:152:test_atcatls_init_enc_key
:PASS

atcatls_tests.c
:155:test_atcatls_create_key
:PASS

atcatls_tests.c
:233:test_atcatls_sign
:FAIL
: Expected 
0 Was 
244
atcatls_tests.c
:157:test_atcatls_verify
:PASS

atcatls_tests.c
:158:test_atcatls_ecdh
:PASS

atcatls_tests.c
:159:test_atcatls_ecdhe
:PASS

atcatls_tests.c
:345:test_atcatls_gen_pubkey
:FAIL
: Expected Not-Equal

atcatls_tests.c
:366:test_atcatls_read_pubkey
:FAIL
: Expected Not-Equal

atcatls_tests.c
:547:test_atcatls_verify_cert_chain
:FAIL
: Expected 
0 Was 
4
atcatls_tests.c
:164:test_atcatls_verify_default_certs
:PASS

atcatls_tests.c
:387:test_atcatls_get_ca_pubkey
:FAIL
: Expected Not-Equal

atcatls_tests.c
:166:test_atcatls_get_ca_cert
:PASS

atcatls_tests.c
:456:test_atcatls_enc_write_read
:FAIL
: Memory Mismatch.
 Byte 
0 Expected 
0x95 Was 
0x0A
atcatls_tests.c
:500:test_atcatls_enc_rsakey_write_read
:FAIL
: Memory Mismatch.
 Byte 
0 Expected 
0xDE Was 
0x0A

-----------------------

18 Tests 
8 Failures 
0 Ignored 

FAIL

When the tests are performed only the SHA chip light of the AT88CK590 is on.

Thank you for your time. Regards.

abilbaotm commented 6 years ago

Seems that the crypto chip is actually well detected and correctly used. The crypto chip was not correctly configured.

bryan-hunt commented 6 years ago

It appears the root cause of the lights on the AT88CK590 kit being wrong is a relatively minor protocol oddity in kit_protocol.c where the "s:" prefix should be "e:" for the ECC508 device. However that string only drives the LEDs and not the addressing of the individual devices.

abilbaotm commented 6 years ago

Yea @bryan-hunt I realized about that, the LED was wrong but the crypto addressing was good.