Hi Team:
customer have some question on the authentication of BQ28z610, please help to clarify:
我现在按照下面的流程我能读到IC算出来的值。
Authentication flow:
- Host writes 0x00 to 0x3E
- Host writes 0x00 to 0x3F
- Host writes the random challenge in a 20-byte block to address 0x40
- Host writes the checksum to 0x60
- Host writes the length (0x18) to 0x61
- Wait 200ms
- Host reads 20-byte data from 0x40, and that is SHA-1 result
- Check whether the 20-byte data matches host expected answer, if yes, the gauge bq28z610 is authenticated.
Note: The response that host receives from bq28z610 is in the format: 0xAABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTT, where AA is LSB. Hence, in below example, the correct results are 2F A2 7C EB 5B 61 64 84 62 0F E3 22 17 C2 9B 0A 8E 3C F3 F0
但是我软件需要去用随机生成的challenge去试图算出你这个值的时候来判断认证是否通过的时候,按照你们文档:
key = 0123456789abcdeffedcba9876543210(这个KEY怎么来?我是自己随便搞一个然后写到你们authentication寄存器里面去呢,还是从你们IC里面读出来,还是产线上写进去?)
challenge = 00112233445566778899aabbccddeeff11223344 (这个是我随机生成的)
So input (key + challenge): 0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff11223344
Result: 743d18ed77c7a60260c44d029a8aae067f4b5523
So then doing step 2 (key + result from first one), the input is: 0123456789abcdeffedcba9876543210743d18ed77c7a60260c44d029a8aae067f4b5523
Best wishes