Hardware accelerated AES on AMD CPU

Topics: Technical Issues
Oct 11, 2015 at 9:18 PM
Edited Oct 12, 2015 at 1:56 AM

Probably this is known but, I found out that on a server with an ADM CPU (Opteron 6128), the AES does not seem to use any hardware acceleration features. I can see that because when I did encrypt a volume on such a computer, I run a test and the speed for AES was comparable with the others.

Is there a way to speed up AES on AMD?

Later: I think I answered my question! Operon 6128 does NOT support the AES instruction set.

Oct 12, 2015 at 3:07 PM
Edited Oct 12, 2015 at 9:20 PM
Coming back to this subject...

In the source code you have this:
    case AES:   
        // In 32-bit kernel mode, due to KeSaveFloatingPointState() overhead, AES instructions can be used only when processing the whole data unit.
#if (defined (_WIN64) || !defined (TC_WINDOWS_DRIVER)) && !defined (TC_WINDOWS_BOOT)
        if (IsAesHwCpuSupported())
            aes_hw_cpu_encrypt (ks, data);
            aes_encrypt (data, data, ks);
Essentially this code (in same cases) check to see if the hardware supports the AES instructions, if so runs the aes_hw_cpu_encrypt else fails back on 'aes_encrypt'.

Ok so in the solution beside the hardware aes support (Aes_hw_cpu_asm), there is also a C version but also there are assembler code versions for 64 & 86.
My question is, are the x64 or 86 version EVER USED? If they are, maybe the code can get a boost even on CPUs without AES instruction set.