o-gs / dji-firmware-tools

Tools for handling firmwares of DJI products, with focus on quadcopters.
GNU General Public License v3.0
1.44k stars 403 forks source link

Issue with Encryption Key #277

Open anitasusan opened 2 years ago

anitasusan commented 2 years ago

Hi, I was playing with few dji packages by using this repository. However, whenever I try to decrypt them with one of the inbuilt keys provided such as PRAK-2019-09, the AES module threw an error indicating that it has 'invalid AES key length (524 bytes)'. I was looking into the file dji_imah_fwsig.py and my python version is 3.8. Could you please let me know if it is caused by python compatibility issue or whether its a pre-known issue.

Thanks in advance

mefistotelis commented 2 years ago

AES is encryption. Keys of size 524 are used for signing.

'tests' folder contains scripts which can use proper keys on proper firmwares. Analyze those to figure out the keys.