I’ve been meaning to post an update to this. How I know that they changed keys with OP-1f firmware version 1.1.6 is that I have the key they use in the OP-Z firmwares and the first few firmwares of the OP-1f.
There’s actually a crypto vulnerability in the OP-Z which enabled me to get the encryption key. The gist of it is, refer to the documentation I’ve written on the OP-Z firmware here. There is a section of the firmware binary blob which contains the encrypted filename. This can be manipulated since the OP-Z firmware is not digitally signed.
The OP-Z also exposes a serial interface when the USB port is connected to the computer. When attempting a firmware upgrade, while observing the serial console, a status message is displayed saying it found a firmware file firmware_bin_only_with_bootloader.zip
, which was decrypted from the encrypted filename portion of the firmware.
Using these two facts, I rigged up a solution to power cycle the OP-Z, and a script to dynamically create brand new firmware files to decrypt the firmware payload, block by block, by replacing the encrypted firmware blocks with the actual firmware blocks, and initiating the firmware upgrade procedure while noting was was decrypted in the serial console. The OP-Z will happily decrypt these blocks, but is smart enough to know it’s not a valid firmware file, and aborts the upgrade process so the OP-Z is not bricked.
This took a very long time to do (around 30 seconds per block in some cases, and there were thousands of blocks), but it was finally done with some assistance from @tolsi. After getting the decrypted firmware zip file, I wrote another script to take the contents of the bootloader file an attempt to use that as the decryption key on the encrypted firmware. The key is in plaintext in the bootloader file.
I have been able to repack OP-Z firmwares into “custom ones,” but this is only a technicality. I’ve made no improvements or new features to the firmware, and merely just updated the version number in my proof of concept. The status of this is basically at the same point as @TabascoEye’s work on the OP-1 firmware: we still have to be able to reverse engineer the firmware itself for it to do anything meaningful other than cosmetic changes.
When the OP-1f was announced, and firmware for it was made public, I downloaded a copy to see if they happened to use the same encryption key, as the OP-1f firmware files have a very similar file structure to the OP-Z firmwares, and sure enough, the same key was used. The key was changed in OP-1f version 1.1.6 for some reason (someone from TE saw this thread?) but I’ve basically stopped working on it at this point.