Security access feature based on seed-key mechanism is widely used in automotive electronics, mainly for flashing ECU software, writing or reading specific parameter values and running diagnostic routines. There exist a number of techniques to decode the algorithm for key generation from a specific seed. Such techniques can put vehicle network at great risks due to an intruder flashing unauthorized version of ECU software, or changing internal parameters of ECU, or changing a VIN number. A lot more similar malicious attacks can be done by getting control over the ECUs. Attackers can exploit this vulnerability to alter the performance from the stock and affect the safety of the passengers. A novel and fool proof algorithm to protect the vehicle and ECU from such malicious attacks is explained in this paper. An advanced encryption technique is developed and tested in ECU to replace the current seed-key mechanisms for ECU security guarantying a secure operation of the vehicle. Algorithm is implemented in the presentation layer of the OSI model which would ensure that the encryption details are not available to users and the ECU can be electronically accessed only by intended individuals.