summaryrefslogtreecommitdiff
path: root/include/u-boot
diff options
context:
space:
mode:
authorPhilippe Reynes <philippe.reynes@softathome.com>2019-12-18 18:25:42 +0100
committerTom Rini <trini@konsulko.com>2020-01-17 10:16:29 -0500
commit4df3578119b043d76b86b50077b06898fc2a4f62 (patch)
tree08667edb96f6a8efde767b10fabceafb746e3af7 /include/u-boot
parent7298e422504ef4455160216b9b7a1baa1169283f (diff)
downloadu-boot-4df3578119b043d76b86b50077b06898fc2a4f62.tar.gz
u-boot: fit: add support to decrypt fit with aesWIP/2020-01-17-improve-aes-support
This commit add to u-boot the support to decrypt fit image encrypted with aes. The FIT image contains the key name and the IV name. Then u-boot look for the key and IV in his device tree and decrypt images before moving to the next stage. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Diffstat (limited to 'include/u-boot')
-rw-r--r--include/u-boot/aes.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/u-boot/aes.h b/include/u-boot/aes.h
index 4fb2cb7502..32281041de 100644
--- a/include/u-boot/aes.h
+++ b/include/u-boot/aes.h
@@ -28,4 +28,17 @@ int image_aes_add_cipher_data(struct image_cipher_info *info, void *keydest)
}
#endif /* IMAGE_ENABLE_ENCRYPT */
+#if IMAGE_ENABLE_DECRYPT
+int image_aes_decrypt(struct image_cipher_info *info,
+ const void *cipher, size_t cipher_len,
+ void **data, size_t *size);
+#else
+int image_aes_decrypt(struct image_cipher_info *info,
+ const void *cipher, size_t cipher_len,
+ void **data, size_t *size)
+{
+ return -ENXIO;
+}
+#endif /* IMAGE_ENABLE_DECRYPT */
+
#endif