summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/crypto.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-02-16 20:47:07 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2013-02-16 20:49:07 +0100
commitb05b762ed45c6c8967fce098c598ec1a6ed7a533 (patch)
treeca704d48a3ac5acd8097d8485208f2f328766650 /utils/imxtools/sbtools/crypto.h
parent4db4985f21bd8f36533f8e71db916e6d3d5d2249 (diff)
downloadrockbox-b05b762ed45c6c8967fce098c598ec1a6ed7a533.tar.gz
rockbox-b05b762ed45c6c8967fce098c598ec1a6ed7a533.zip
sbtools: add brute force option for sb1 in sbtoelf
After some reverse engineering, it appears that the keys of the sb1 format are very weak: the 128 bytes are generated from the laserfuse words 4,5 and 6 but in a weird manner: 4 and 5 are simply ORed and 6 is only half used (somehow), making it "only" a 48 bit word to find. Change-Id: I40702e19d0924ef51c01894efce3cb65bd664456
Diffstat (limited to 'utils/imxtools/sbtools/crypto.h')
-rw-r--r--utils/imxtools/sbtools/crypto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/imxtools/sbtools/crypto.h b/utils/imxtools/sbtools/crypto.h
index 599ebf4bf4..6751c2e861 100644
--- a/utils/imxtools/sbtools/crypto.h
+++ b/utils/imxtools/sbtools/crypto.h
@@ -125,5 +125,6 @@ void sha_1_output(struct sha_1_params_t *params, byte *out);
125// WARNING those functions modifies the keys !! 125// WARNING those functions modifies the keys !!
126uint32_t xor_encrypt(union xorcrypt_key_t keys[2], void *data, int size); 126uint32_t xor_encrypt(union xorcrypt_key_t keys[2], void *data, int size);
127uint32_t xor_decrypt(union xorcrypt_key_t keys[2], void *data, int size); 127uint32_t xor_decrypt(union xorcrypt_key_t keys[2], void *data, int size);
128void xor_generate_key(uint32_t laserfuse[3], union xorcrypt_key_t key[2]);
128 129
129#endif /* __CRYPTO_H__ */ 130#endif /* __CRYPTO_H__ */