5

I am attempting to design a seed and key algorithm for an Engine Control Unit. This is used to secure resources such as the ability to reprogram the ECU. The idea is that I request a seed from the ECU, which it gives as a string of bytes. Both the ECU and I perform some secret calculation to transform the seed value into a key value. I then submit my calculated key to the ECU, and if it matches the ECU's calculation the resource is unlocked.

I have been looking around for an example calculation to derive my own from, but so far I have just come up with resources merely describing the concept as above. Does anyone have any concrete examples I could use?

Bondolin
  • 187
  • 1
  • 1
  • 7

1 Answers1

5

This is done a number of different ways, and no way is perfect. Usually it involves a pre-shared key one way or another.

Here's an example from General Motors that uses a remote database (assumed secure) to match two values, an ECU ID and a challenge, to a corresponding key value or algorithm (a non-reversible algorithm like a modulus operator).

  1. The diagnostic PC sends a level 3 security access request
  2. The ECU responds with an ID and a pseudorandom challenge
  3. The diagnostic PC references the ID against a (remote?) database of ECUs and their security keys.
  4. The diagnostic PC (or server, as in the GM implementation) calculates and sends a response (e.g. key mod challenge)
  5. The ECU compares this to its own key mod challenge calculation and enters the desired run level if there is a match.

This approach will ensure that the challenge is different every time, which makes this process less vulnerable to eavesdropping. However, larger security issues remain that aren't addressed (such as session hijacking).

brirus
  • 176
  • 2