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?