summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/sb.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-01-01 20:48:05 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2017-01-16 19:58:24 +0100
commit2b20026dd755706934f8f8e1a192bffdfc3d717c (patch)
tree3c8bb119ab5e9d3f62093563e99609c7dc2a8f2f /utils/imxtools/sbtools/sb.h
parentcb8a98e365c0b69e068dc077eb5d68dd4a29a1ad (diff)
downloadrockbox-2b20026dd755706934f8f8e1a192bffdfc3d717c.tar.gz
rockbox-2b20026dd755706934f8f8e1a192bffdfc3d717c.zip
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
Diffstat (limited to 'utils/imxtools/sbtools/sb.h')
-rw-r--r--utils/imxtools/sbtools/sb.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/imxtools/sbtools/sb.h b/utils/imxtools/sbtools/sb.h
index 9ab7fe7aba..62fe4464fb 100644
--- a/utils/imxtools/sbtools/sb.h
+++ b/utils/imxtools/sbtools/sb.h
@@ -232,8 +232,7 @@ enum sb_error_t
232 SB_FORMAT_ERROR = -5, 232 SB_FORMAT_ERROR = -5,
233 SB_CHECKSUM_ERROR = -6, 233 SB_CHECKSUM_ERROR = -6,
234 SB_NO_VALID_KEY = -7, 234 SB_NO_VALID_KEY = -7,
235 SB_FIRST_CRYPTO_ERROR = -8, 235 SB_CRYPTO_ERROR = -8,
236 SB_LAST_CRYPTO_ERROR = SB_FIRST_CRYPTO_ERROR - CRYPTO_NUM_ERRORS,
237}; 236};
238 237
239#define SB_RAW_MODE (1 << 0) /* read image in raw mode (aka bootloader-like) */ 238#define SB_RAW_MODE (1 << 0) /* read image in raw mode (aka bootloader-like) */