summaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorJoshua Oreman2009-07-04 01:06:05 +0200
committerMarty Connor2010-01-05 15:04:25 +0100
commit2dfe4c414ac8f9992f6c6ded2f990c5a8e487815 (patch)
tree817542e9deeb20be25a8a7bdf71a7db88518b8e5 /src/crypto
parent[crypto] Add parentheses around len argument in blocksize assert (diff)
downloadipxe-2dfe4c414ac8f9992f6c6ded2f990c5a8e487815.tar.gz
ipxe-2dfe4c414ac8f9992f6c6ded2f990c5a8e487815.tar.xz
ipxe-2dfe4c414ac8f9992f6c6ded2f990c5a8e487815.zip
[crypto] Make AES context size and algorithm structure externally available
This is required to support modes of AES beyond cipher-block chaining. Signed-off-by: Marty Connor <mdc@etherboot.org>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/axtls_aes.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/crypto/axtls_aes.c b/src/crypto/axtls_aes.c
index 9e4044eaa..8bd375864 100644
--- a/src/crypto/axtls_aes.c
+++ b/src/crypto/axtls_aes.c
@@ -32,17 +32,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
*
*/
-/** Basic AES blocksize */
-#define AES_BLOCKSIZE 16
-
-/** AES context */
-struct aes_context {
- /** AES context for AXTLS */
- AES_CTX axtls_ctx;
- /** Cipher is being used for decrypting */
- int decrypting;
-};
-
/**
* Set key
*
@@ -154,7 +143,7 @@ static void aes_decrypt ( void *ctx, const void *src, void *dst,
}
/** Basic AES algorithm */
-static struct cipher_algorithm aes_algorithm = {
+struct cipher_algorithm aes_algorithm = {
.name = "aes",
.ctxsize = sizeof ( struct aes_context ),
.blocksize = AES_BLOCKSIZE,