scripts: support Sercomm crypto
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 2 Jun 2020 06:37:54 +0000 (08:37 +0200)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 2 Jun 2020 06:37:54 +0000 (08:37 +0200)
commit7f1250a7fea716a13c1678a14dbc417ff57e461f
tree295ffc76eace4e850586b38a542589578f303dd6
parent58bdbe73212a7f1c2755cf640e21b01e9b2d7b04
scripts: support Sercomm crypto

Sercomm firmwares are encrypted with AES 256 CBC.
The key is generated with a custom algorithm from the firmware tag:
char key[32];
char version[32];
char iv[32];
char random[32];
char size[32];
Key must be generated with Sercomm's algorithm. However, the rest of the
header can be empty. IV and random are set to 0 on purpose.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
scripts/sercomm-crypto.py [new file with mode: 0755]