From 5cd097825cd0b1e78bc5077ef2648b515eaeb667 Mon Sep 17 00:00:00 2001 From: JinGen Lim <1116555+jglim@users.noreply.github.com> Date: Thu, 6 Jul 2023 10:47:32 +0800 Subject: [PATCH] Add IC907:61 References https://github.com/jglim/UnlockECU/issues/27 --- .../UnlockECU/Security/ArrayReverseAlgo.cs | 27 +++++++++++++++++++ UnlockECU/db.json | 10 +++++++ 2 files changed, 37 insertions(+) create mode 100644 UnlockECU/UnlockECU/Security/ArrayReverseAlgo.cs diff --git a/UnlockECU/UnlockECU/Security/ArrayReverseAlgo.cs b/UnlockECU/UnlockECU/Security/ArrayReverseAlgo.cs new file mode 100644 index 0000000..417dc03 --- /dev/null +++ b/UnlockECU/UnlockECU/Security/ArrayReverseAlgo.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +namespace UnlockECU +{ + /// + /// Generic array reverse algo, where the seed/output are of equal length, and output is the reversed seed array + /// + class ArrayReverseAlgo : SecurityProvider + { + public override bool GenerateKey(byte[] inSeed, byte[] outKey, int accessLevel, List parameters) + { + if (inSeed.Length != outKey.Length) + { + return false; + } + Array.Reverse(inSeed); + Array.Copy(inSeed, outKey, inSeed.Length); + return true; + } + public override string GetProviderName() + { + return "ArrayReverseAlgo"; + } + } +} + diff --git a/UnlockECU/db.json b/UnlockECU/db.json index 71f5f38..dad935b 100644 --- a/UnlockECU/db.json +++ b/UnlockECU/db.json @@ -7073,6 +7073,16 @@ } ] }, + { + "EcuName": "IC907", + "Aliases": [], + "AccessLevel": 61, + "SeedLength": 8, + "KeyLength": 8, + "Provider": "ArrayReverseAlgo", + "Origin": "IC907_Unknown_EXPERIMENTAL_@Feezex", + "Parameters": [] + }, { "EcuName": "LeTubeSec", "Aliases": [],