Steps to Use Seed&Key Option in CANape

Seed&Key DLL structure:
To prevent access to ECU data by unauthorized persons, some ECUs have access protection.
This access protection can be activated by a "Seed&Key" mechanism.
This mechanism is designed in such a matter that the measurement and calibration system first requests a 'seed' value from the ECU (Get Seed For Key).
The 'seed' value is used to calculate a 'key', which is sent to the ECU (Unlock Protection).
The ECU checks the 'key'. If the 'key' is valid, the ECU enables access to its data.
CANape uses the "Seed&Key" security access whenever a connection is established.
In order to calculate the 'key' CANape calls a function of SEEDKEY1.DLL.
This DLL has to be located in the working directory.
Depending on which calibration protocol you are using (CCP/XCP) the DLL must export a corresponding function with for example for CCP the following prototype:

BOOL __cdecl ASAP1A_CCP_ComputeKeyFromSeed
(unsigned char *seed,
unsigned short sizeSeed,
unsigned char *key,
unsigned short maxSizeKey, unsigned short *sizeKey);


Templates to create this DLL are contained in the "ASAP2-MC Interface Specification" or they can be requested at Vector.

If there is more than one dll or you do not want to use the SEEDKEY1.dll name, then it must be manually adjusted in the canape.ini file or in the A2L file.

canape.ini
Under the module section
[Module_UserDefinedDeviceName]
there will be the following entries:

SEED_KEY=1
The above line will be set to zero if the checkbox described above is not enabled.
SEED_KEY_NAME_PGM=SEEDKEY1.DLL
SEED_KEY_NAME_DAQ=SEEDKEY1.DLL
SEED_KEY_NAME_CAL=SEEDKEY1.DLL


You can manually change the names as needed or enter a full path name.



Article ID: 2
Last updated: 2019-01-21
Revision: 1
CANape -> Measurement and Calibration of ECUs -> CCP/XCP Drivers -> Steps to Use Seed&Key Option in CANape
https://kb.vector.com/entry/2/