diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2005-05-23 23:08:25 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2005-05-23 23:08:25 +0000 |
commit | 500a70d5569796a6adf8ae3d430f7491d4b93d4c (patch) | |
tree | 5063c57c411be1e965997a9a1861ccccb67a7d1b /lib/libcrypto/engine/hw_cryptodev.c | |
parent | 89af7e084cf5f30c325f31076babffbe66cdb939 (diff) |
no need to byteswap for AES_ASM, from tom@
Diffstat (limited to 'lib/libcrypto/engine/hw_cryptodev.c')
-rw-r--r-- | lib/libcrypto/engine/hw_cryptodev.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libcrypto/engine/hw_cryptodev.c b/lib/libcrypto/engine/hw_cryptodev.c index 41184b67867..924e379ab54 100644 --- a/lib/libcrypto/engine/hw_cryptodev.c +++ b/lib/libcrypto/engine/hw_cryptodev.c @@ -714,7 +714,9 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc) { AES_KEY *k = ctx->cipher_data; +#ifndef AES_ASM int i; +#endif bzero(k, sizeof *k); if (enc) @@ -722,9 +724,15 @@ xcrypt_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, else AES_set_decrypt_key(key, ctx->key_len * 8, k); - /* Damn OpenSSL byte swaps the expanded key!! */ +#ifndef AES_ASM + /* + * XXX Damn OpenSSL byte swaps the expanded key!! + * + * XXX But only if we're using the C implementation of AES + */ for (i = 0; i < 4 * (AES_MAXNR + 1); i++) k->rd_key[i] = htonl(k->rd_key[i]); +#endif return (1); } |