christoph2 / pyxcp

ASAM XCP in Python
http://pyxcp.rtfd.org
GNU Lesser General Public License v3.0
197 stars 63 forks source link

fix cond_unlock for keys that do not fit in a single unlock message #160

Closed danielhrisca closed 4 months ago

danielhrisca commented 4 months ago

The UNLOCK commands must contain the remaining length of the key bytes.

MAX_CTO = 8 bytes (CAN)
TotalLengthOf(seed) = 19 bytes
TotalLengthOf(key) = 10 bytes
Seed = 99 88 77 66 55 44 33 22 11 00 11 22 33 44 55 66 77 88 99
Key = 98 76 54 32 10 01 23 45 67 89

image

Types of changes