1
0
Fork 0
forked from len0rd/rockbox

imxtools/sbtools: rework cryptography

It was a mess, a mix of crypto_* and cbc_mac calls. I made everything call crypto
functions, and also separate key setup from cryptographic operations, this will
be useful to speed up the code in the upcoming commits. Drop support for "usbotp"
key, since the crypto code for that was never mainlined and we can always get the
keys from a device as long as we have code execution (using the DCP debug registers).

Change-Id: I7aa24d12207ffb744225d1b9cc7cb1dc7281dd22
This commit is contained in:
Amaury Pouly 2017-01-01 20:48:05 +01:00
parent cb8a98e365
commit 2b20026dd7
10 changed files with 172 additions and 319 deletions

View file

@ -73,8 +73,7 @@ enum rsrc_error_t
RSRC_FORMAT_ERROR = -5,
RSRC_CHECKSUM_ERROR = -6,
RSRC_NO_VALID_KEY = -7,
RSRC_FIRST_CRYPTO_ERROR = -8,
RSRC_LAST_CRYPTO_ERROR = RSRC_FIRST_CRYPTO_ERROR - CRYPTO_NUM_ERRORS,
RSRC_CRYPTO_ERROR = -8,
};
enum rsrc_error_t rsrc_write_file(struct rsrc_file_t *rsrc, const char *filename);