Basically This Program Does All OF THis For You:
Enjoy :)Quote:
The key in the incoming package is the 11th + 10th + 9th + 8th byte from startup.
In this example: 20 5C 48 F4
The 2nd key is the 7th + 6th + 5th + 4th byte in the package.
In this example: 00 44 A6 2E
And now, to get the 3rd and 4th key, you need to do this:
1.) Add key 1 with key 2 205C48F4 + 0044A62E = 20A0EF22
2.) XOR result of 1.) with 4321 XOR 20A0EF22, 4321 = 20A0AC03
3.) XOR Key 1 with result of 2.) XOR 205C48F4, 20A0AC03 = 00FCE4F7
4.) IMUL result 3.) with result 3.) IMUL FCE4F7, FCE4F7 = F9D39310E651
(logical multiplication // result is only 4 byte long -> 9310E651)
And now, to create the 3rd and 4th key correctly, you need to do this:
Always use the first 4 bytes of the 1st key with the result of 3.) and produce it with XOR:
The 1st 4 bytes of the 1st key (vice versa, originally: 9D 90 83 8A):
8A 83 90 9D
With the result of 3.):
00 FC E4 F7
The result:
8A 7F 74 6A
The result must also be rated the other way round. Thus, the first four bytes of the key now are:
6A 74 7F 8A
Repeat that until you converted the complete 1st key.
The 2nd key has to be converted the same way, but with the difference that you need to use the result of 4.), not 3.).
The 1st 4 bytes of the 2nd key (vice versa, originally: 62 4F E8 15):
15 E8 4F 62
With the result of 4.):
93 10 E6 51
The result:
86 F8 A9 33
The result must also be rated the other way round. Thus, the first four bytes of the key now are:
33 A9 F8 86
Now you have the 3rd and 4th key you need to have to send packages.