That is 49 bytes. ( 49 bytes keys ) / 7 bytes = 7 keys. Only 7 keys used to decrypt the entire eeprom?
Vida CEM swapping
- RickHaleParker
- Posts: 7206
- Joined: 25 May 2015, 14:30
- Year and Model: See Signature below.
- Location: Kansas
- Has thanked: 8 times
- Been thanked: 980 times
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
- RickHaleParker
- Posts: 7206
- Joined: 25 May 2015, 14:30
- Year and Model: See Signature below.
- Location: Kansas
- Has thanked: 8 times
- Been thanked: 980 times
Do you mean if you do the division in hex it will return the real part only? That would work.
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
-
vtl
- Posts: 4936
- Joined: 16 Aug 2012, 13:35
- Year and Model: 2005 XC70
- Location: Boston
- Has thanked: 130 times
- Been thanked: 686 times
This is integer division. [0..6] / 7 = 0, [7..13] / 7 = 1, [14..20] / 7 = 2, etc.RickHaleParker wrote: 13 Oct 2021, 14:19Not all offsets are multiples of multiples of 7. Xor only works with real numbers. Imaginary number would xor.
Do you mean if you do the division in hex it will return the real part only? That would work.
-
vtl
- Posts: 4936
- Joined: 16 Aug 2012, 13:35
- Year and Model: 2005 XC70
- Location: Boston
- Has thanked: 130 times
- Been thanked: 686 times
Crypto key for EEPROM encryption/decryption is 0x3d bytes long, 61 in decimal.RickHaleParker wrote: 13 Oct 2021, 13:49 That is 49 bytes. ( 49 bytes keys ) / 7 bytes = 7 keys. Only 7 keys used to decrypt the entire eeprom?
I wrote C code that hopefully goes the same thing what the CEM machine code I found does.
- RickHaleParker
- Posts: 7206
- Joined: 25 May 2015, 14:30
- Year and Model: See Signature below.
- Location: Kansas
- Has thanked: 8 times
- Been thanked: 980 times
There is a term for that. It is Truncation. I recall Truncation as an operator way back in the 8 bit days.vtl wrote: 13 Oct 2021, 14:33 This is integer division. [0..6] / 7 = 0, [7..13] / 7 = 1, [14..20] / 7 = 2, etc.
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
- RickHaleParker
- Posts: 7206
- Joined: 25 May 2015, 14:30
- Year and Model: See Signature below.
- Location: Kansas
- Has thanked: 8 times
- Been thanked: 980 times
You think the the key(s) are flash offsets 7FF00 - 7FF3C not 7FF00-7FF30 as stated by aaivar ?vtl wrote: 13 Oct 2021, 14:35Crypto key for EEPROM encryption/decryption is 0x3d bytes long, 61 in decimal.RickHaleParker wrote: 13 Oct 2021, 13:49 That is 49 bytes. ( 49 bytes keys ) / 7 bytes = 7 keys. Only 7 keys used to decrypt the entire eeprom?
I wrote C code that hopefully goes the same thing what the CEM machine code I found does.
Notes:
61 is not a multiple of 7.
49, 56, 63 are multiples of 7.
There are 2048 bytes in the eeprom. One would need to recycle the keys to decrypt the whole eeprom. 2048 / 7 = 292. Will need 292 keys to decrypt the entire eeprom. FFββ = 255ββ , if you reduce a eeprom byte by more then 255ββ the results will be negative.
If the number of bytes in the key block is not a multiple of 7, it could loop back to the beginning creating a different set of keys then the first pass. With 61 bytes in the keys block, the keys would shift by two bytes each cycle.
Last edited by RickHaleParker on 14 Oct 2021, 17:11, edited 4 times in total.
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
- RickHaleParker
- Posts: 7206
- Joined: 25 May 2015, 14:30
- Year and Model: See Signature below.
- Location: Kansas
- Has thanked: 8 times
- Been thanked: 980 times
I tried it with manual calculations. It is not working, at least it does not produce the same results as the files.vtl wrote: 13 Oct 2021, 06:47 They xor it with current eeprom byte offset divided by 7:
Something like this (haven't verified):Code: Select all
void eeprom_decrypt(unsigned char *eeprom, int len, unsigned char *crypto, unsigned char *decrypted) { for (int i = 0; i < len; i++) decrypted[i] = eeprom[i] ^ crypto[i % 0x3d] ^ (i / 7); }
Looks like each eeprom byte needs to be reduced before xor with flash key.
Use i/7 to reduce the eeprom byte as you read it from the file ?
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
- RickHaleParker
- Posts: 7206
- Joined: 25 May 2015, 14:30
- Year and Model: See Signature below.
- Location: Kansas
- Has thanked: 8 times
- Been thanked: 980 times
What software did you use to produce the decrypt file?
Can we get a copy of it?
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
-
aaivar
- Posts: 14
- Joined: 31 Mar 2021, 03:44
- Year and Model: v70 2015
- Location: Latvia
- Has thanked: 1 time
my program will not work without activating a licenseRickHaleParker wrote: 14 Oct 2021, 21:47What software did you use to produce the decrypt file?
Can we get a copy of it?
- RickHaleParker
- Posts: 7206
- Joined: 25 May 2015, 14:30
- Year and Model: See Signature below.
- Location: Kansas
- Has thanked: 8 times
- Been thanked: 980 times
Ok but what is the name of the program?
Is it something you paid for or something you wrote?
Can you do this.
- 1. Take a eeprom file and and fill it with all FF.
2. Take a Flash file and fill it with all FF.
3. Run the program using the two fake files.
4. Upload the Decrypt file here.
Run the software with the two files in the Zip file below. Then upload the resulting Decrypt file.
- Attachments
-
- RC detect.zip
- (125.55 KiB) Downloaded 148 times
Active
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
1998 C70, B5234T3, 16T, AW50-42, Bosch Motronic 4.4, Special Edition package.
2017 Ford PIU. 3.5l, Twin Turbo, 365 Hp.
............................
Past
2003 S40, B4204T3, 14T twin scroll AW55-50/51SN, Siemens EMS 2000. ( Killed by a plastic radiator. )
2004 S60R, B8444S TF80 AWD. Yamaha V8 conversion ( I moved, the project did not )
2005 XC90 T6 Executive, B6294T, 4T65 AWD, Bosch Motronic 7.0. ( Transmission dead after sitting for a winter )
-
- Similar Topics
- Replies
- Views
- Last post
-
- 1 Replies
- 9561 Views
-
Last post by RickHaleParker
-
- 6 Replies
- 9715 Views
-
Last post by abscate
-
- 27 Replies
- 30068 Views
-
Last post by cn90
-
- 10 Replies
- 11327 Views
-
Last post by jonesg
-
- 7 Replies
- 6432 Views
-
Last post by RickHaleParker






