Service Tool Authentication
1. Overview
Some commands are only to be performed when requested by a service tool. The service tool must authenticate itself before it can issue these commands. The authentication is done using a challenge-response mechanism. The purpose of the authentication is to prevent accidental use of the commands that require authentication.
2. The Authentication Procedure
The procedure is initiated by the service tool. The service tool sends an authentication request to the Touch Encoder. Please refer to the specific protocol documentation for the details of the authentication request.
2.1 The Challenge
After accepting the authentication request, the Touch Encoder emits a challenge to the requesting entity. The following table depicts the message layout:
Data length - 5 Bytes
Start | Length | Description | Value |
---|---|---|---|
1.1 | 1 Byte | Step | 0 - Challenge |
2.1 | 4 Bytes | Magic Number | Magic Value |
2.2 The Response
Upon receiving the magic value from the Touch Encoder, the service tool must use it to calculate the response. At this step, there are three values involved:
the magic value M received from the Touch Encoder
the secret value S that the service tool is in possession of
the constant C = 1676704565
The response value is calculated using the following formula:
Once the service tool has computed the response, it must send the response to the Touch Encoder in the following format.
Data length - 5 Bytes
Start | Length | Description | Value |
---|---|---|---|
1.1 | 1 Byte | Step | 1 - Response |
2.1 | 4 Bytes | Response | Response Value |
2.3 The Confirmation
If the response is correct, the Touch Encoder emits a confirmation packet to the service tool. The service tool is now authenticated and can now issue the commands that require authentication until the next power cycle of the Touch Encoder. There is no notification if the response is incorrect.
Data length - 1 Byte
Start | Length | Description | Value |
---|---|---|---|
1.1 | 1 Byte | Step | 255 - Complete |
3. Protocol-specific Details
The secret value referenced in the response calculation is protocol-specific:
For SAE J1939, the secret value is the service tool address.
For USB HID, the secret value is 4919.