X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=aes.c;h=eb37adbed860674a059f8affffe8aae5b786575c;hb=4a97e18b878afb95d2bc6a027f0d9b38e358d142;hp=0a45c0b6c7bb8ec6cc1c368234b0f6624424a66e;hpb=5fafdf24ef2c090c164d4dc89684b3f379dbdd87;p=qemu.git diff --git a/aes.c b/aes.c index 0a45c0b6c..eb37adbed 100644 --- a/aes.c +++ b/aes.c @@ -27,20 +27,17 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "vl.h" +#include "qemu-common.h" #include "aes.h" +#ifndef NDEBUG #define NDEBUG -#include +#endif typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; -#define MAXKC (256/32) -#define MAXKB (256/8) -#define MAXNR 14 - /* This controls loop-unrolling in aes_core.c */ #undef FULL_UNROLL # define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) @@ -1294,7 +1291,7 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, AES_encrypt(tmp, tmp, key); memcpy(out, tmp, AES_BLOCK_SIZE); memcpy(ivec, tmp, AES_BLOCK_SIZE); - } + } } else { while (len >= AES_BLOCK_SIZE) { memcpy(tmp, in, AES_BLOCK_SIZE); @@ -1312,6 +1309,6 @@ void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, for(n=0; n < len; ++n) out[n] = tmp[n] ^ ivec[n]; memcpy(ivec, tmp, AES_BLOCK_SIZE); - } + } } }