summaryrefslogtreecommitdiffstats
path: root/include/aes.h
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2014-03-05 19:58:37 +0100
committerTom Rini <trini@ti.com>2014-03-21 16:43:53 -0400
commit6e7b9f4fa0aed88051d6700afa510430b5d3fb69 (patch)
tree7c17953ff2ef5dc5e1279bd6b4fb894c9d72e3bd /include/aes.h
parent957ba85ce9bbf9d82716798287e50612afb07fc7 (diff)
downloadtalos-obmc-uboot-6e7b9f4fa0aed88051d6700afa510430b5d3fb69.tar.gz
talos-obmc-uboot-6e7b9f4fa0aed88051d6700afa510430b5d3fb69.zip
aes: Move the AES-128-CBC encryption function to common code
Move the AES-128-CBC encryption function implemented in tegra20-common/crypto.c into lib/aes.c . This is well re-usable common code. Moreover, clean the code up a bit and fix the kerneldoc-style annotations. Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include/aes.h')
-rw-r--r--include/aes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/aes.h b/include/aes.h
index c70eda6f98..d9bb387614 100644
--- a/include/aes.h
+++ b/include/aes.h
@@ -53,4 +53,14 @@ void aes_encrypt(u8 *in, u8 *expkey, u8 *out);
*/
void aes_decrypt(u8 *in, u8 *expkey, u8 *out);
+/**
+ * aes_cbc_encrypt_blocks() - Encrypt multiple blocks of data with AES CBC.
+ *
+ * @key_exp Expanded key to use
+ * @src Source data to encrypt
+ * @dst Destination buffer
+ * @num_aes_blocks Number of AES blocks to encrypt
+ */
+void aes_cbc_encrypt_blocks(u8 *key_exp, u8 *src, u8 *dst, u32 num_aes_blocks);
+
#endif /* _AES_REF_H_ */
OpenPOWER on IntegriCloud