crypto: move built-in AES implementation into crypto/

To prepare for a generic internal cipher API, move the
built-in AES implementation into the crypto/ directory

Backports commit 6f2945cde60545aae7f31ab9d5ef29531efbc94f from qemu
This commit is contained in:
Daniel P. Berrange 2018-02-14 12:45:03 -05:00 committed by Lioncash
parent 5019f39c15
commit 2e97ecfbcd
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
11 changed files with 9 additions and 22 deletions

View file

@ -195,6 +195,7 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
<ClCompile Include="..\..\..\list.c" />
<ClCompile Include="..\..\..\qemu\accel.c" />
<ClCompile Include="..\..\..\qemu\glib_compat.c" />
<ClCompile Include="..\..\..\qemu\crypto\aes.c" />
<ClCompile Include="..\..\..\qemu\crypto\init.c" />
<ClCompile Include="..\..\..\qemu\crypto\hash.c" />
<ClCompile Include="..\..\..\qemu\hw\core\machine.c" />
@ -218,7 +219,6 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
<ClCompile Include="..\..\..\qemu\qom\object.c" />
<ClCompile Include="..\..\..\qemu\qom\qom-qobject.c" />
<ClCompile Include="..\..\..\qemu\tcg-runtime.c" />
<ClCompile Include="..\..\..\qemu\util\aes.c" />
<ClCompile Include="..\..\..\qemu\util\bitmap.c" />
<ClCompile Include="..\..\..\qemu\util\bitops.c" />
<ClCompile Include="..\..\..\qemu\util\crc32c.c" />
@ -287,6 +287,7 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
<ClInclude Include="..\..\..\qemu\include\exec\spinlock.h" />
<ClInclude Include="..\..\..\qemu\include\fpu\softfloat.h" />
<ClInclude Include="..\..\..\qemu\include\glib_compat.h" />
<ClInclude Include="..\..\..\qemu\include\crypto\aes.h" />
<ClInclude Include="..\..\..\qemu\include\crypto\init.h" />
<ClInclude Include="..\..\..\qemu\include\crypto\hash.h" />
<ClInclude Include="..\..\..\qemu\include\hw\arm\arm.h" />
@ -327,7 +328,6 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
<ClInclude Include="..\..\..\qemu\include\qapi\visitor-impl.h" />
<ClInclude Include="..\..\..\qemu\include\qapi\visitor.h" />
<ClInclude Include="..\..\..\qemu\include\qemu-common.h" />
<ClInclude Include="..\..\..\qemu\include\qemu\aes.h" />
<ClInclude Include="..\..\..\qemu\include\qemu\atomic.h" />
<ClInclude Include="..\..\..\qemu\include\qemu\bitmap.h" />
<ClInclude Include="..\..\..\qemu\include\qemu\bitops.h" />

View file

@ -23,9 +23,6 @@
<ClCompile Include="..\..\..\qemu\vl.c">
<Filter>qemu</Filter>
</ClCompile>
<ClCompile Include="..\..\..\qemu\util\aes.c">
<Filter>qemu\util</Filter>
</ClCompile>
<ClCompile Include="..\..\..\qemu\util\bitmap.c">
<Filter>qemu\util</Filter>
</ClCompile>
@ -406,9 +403,6 @@
<ClInclude Include="..\..\..\qemu\include\qapi\qmp\types.h">
<Filter>qemu\include\qapi\qmp</Filter>
</ClInclude>
<ClInclude Include="..\..\..\qemu\include\qemu\aes.h">
<Filter>qemu\include\qemu</Filter>
</ClInclude>
<ClInclude Include="..\..\..\qemu\include\qemu\atomic.h">
<Filter>qemu\include\qemu</Filter>
</ClInclude>

View file

@ -22,6 +22,7 @@
<ClCompile Include="..\..\..\list.c" />
<ClCompile Include="..\..\..\qemu\accel.c" />
<ClCompile Include="..\..\..\qemu\glib_compat.c" />
<ClCompile Include="..\..\..\qemu\crypto\aes.c" />
<ClCompile Include="..\..\..\qemu\crypto\init.c" />
<ClCompile Include="..\..\..\qemu\crypto\hash.c" />
<ClCompile Include="..\..\..\qemu\hw\core\machine.c" />
@ -45,7 +46,6 @@
<ClCompile Include="..\..\..\qemu\qom\object.c" />
<ClCompile Include="..\..\..\qemu\qom\qom-qobject.c" />
<ClCompile Include="..\..\..\qemu\tcg-runtime.c" />
<ClCompile Include="..\..\..\qemu\util\aes.c" />
<ClCompile Include="..\..\..\qemu\util\bitmap.c" />
<ClCompile Include="..\..\..\qemu\util\bitops.c" />
<ClCompile Include="..\..\..\qemu\util\crc32c.c" />
@ -100,6 +100,7 @@
<ClInclude Include="..\..\..\qemu\include\exec\spinlock.h" />
<ClInclude Include="..\..\..\qemu\include\fpu\softfloat.h" />
<ClInclude Include="..\..\..\qemu\include\glib_compat.h" />
<ClInclude Include="..\..\..\qemu\include\crypto\aes.h" />
<ClInclude Include="..\..\..\qemu\include\crypto\init.h" />
<ClInclude Include="..\..\..\qemu\include\crypto\hash.h" />
<ClInclude Include="..\..\..\qemu\include\hw\arm\arm.h" />
@ -140,7 +141,6 @@
<ClInclude Include="..\..\..\qemu\include\qapi\visitor-impl.h" />
<ClInclude Include="..\..\..\qemu\include\qapi\visitor.h" />
<ClInclude Include="..\..\..\qemu\include\qemu-common.h" />
<ClInclude Include="..\..\..\qemu\include\qemu\aes.h" />
<ClInclude Include="..\..\..\qemu\include\qemu\atomic.h" />
<ClInclude Include="..\..\..\qemu\include\qemu\bitmap.h" />
<ClInclude Include="..\..\..\qemu\include\qemu\bitops.h" />

View file

@ -147,9 +147,6 @@
<ClCompile Include="..\..\..\qemu\qom\qom-qobject.c">
<Filter>qemu\qom</Filter>
</ClCompile>
<ClCompile Include="..\..\..\qemu\util\aes.c">
<Filter>qemu\util</Filter>
</ClCompile>
<ClCompile Include="..\..\..\qemu\util\bitmap.c">
<Filter>qemu\util</Filter>
</ClCompile>
@ -396,9 +393,6 @@
<ClInclude Include="..\..\..\qemu\include\qapi\qmp\types.h">
<Filter>qemu\include\qapi\qmp</Filter>
</ClInclude>
<ClInclude Include="..\..\..\qemu\include\qemu\aes.h">
<Filter>qemu\include\qemu</Filter>
</ClInclude>
<ClInclude Include="..\..\..\qemu\include\qemu\atomic.h">
<Filter>qemu\include\qemu</Filter>
</ClInclude>

View file

@ -1,2 +1,3 @@
util-obj-y = init.o
util-obj-y += hash.o
util-obj-y += hash.o
util-obj-y += aes.o

View file

@ -28,7 +28,7 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "qemu-common.h"
#include "qemu/aes.h"
#include "crypto/aes.h"
typedef uint32_t u32;
typedef uint8_t u8;

View file

@ -14,7 +14,7 @@
#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
#include "qemu/aes.h"
#include "crypto/aes.h"
union CRYPTO_STATE {
uint8_t bytes[16];

View file

@ -20,7 +20,6 @@
#include <math.h>
#include "cpu.h"
#include "exec/helper-proto.h"
#include "qemu/aes.h"
#include "qemu/host-utils.h"
#include "exec/cpu_ldst.h"

View file

@ -18,7 +18,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/aes.h"
#include "crypto/aes.h"
#if SHIFT == 0
#define Reg MMXReg

View file

@ -4,7 +4,6 @@ util-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
util-obj-y += module.o
util-obj-y += bitmap.o bitops.o
util-obj-y += error.o
util-obj-y += aes.o
util-obj-y += crc32c.o
util-obj-y += host-utils.o
util-obj-y += getauxval.o