summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/builtin/aes
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-05-04 21:52:21 -0400
committerGreg Hudson <ghudson@mit.edu>2013-05-24 14:20:36 -0400
commit898c0f677d573a7882bb02459082501939fac435 (patch)
tree48c6e08758708dba29c99fd8cc51f9a6339df8c1 /src/lib/crypto/builtin/aes
parent0231309631acb59cc8b22227ca461005f38cc668 (diff)
downloadkrb5-898c0f677d573a7882bb02459082501939fac435.tar.gz
krb5-898c0f677d573a7882bb02459082501939fac435.tar.xz
krb5-898c0f677d573a7882bb02459082501939fac435.zip
Add AES-NI support on Linux
If yasm and cpuid.h are present on a Linux i686 or x64 system, compile the modified Intel AES-NI assembly sources. In the builtin AES enc provider, check at runtime whether the CPU supports AES-NI instructions and use the assembly functions if so.
Diffstat (limited to 'src/lib/crypto/builtin/aes')
-rw-r--r--src/lib/crypto/builtin/aes/Makefile.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/crypto/builtin/aes/Makefile.in b/src/lib/crypto/builtin/aes/Makefile.in
index f19604fd2..064e44dbe 100644
--- a/src/lib/crypto/builtin/aes/Makefile.in
+++ b/src/lib/crypto/builtin/aes/Makefile.in
@@ -5,10 +5,15 @@ BUILDTOP=$(REL)..$(S)..$(S)..$(S)..
##DOS##PREFIXDIR = builtin\aes
##DOS##OBJFILE = ..\..\$(OUTPRE)aes.lst
+YASM=@YASM@
+AESNI_OBJ=@AESNI_OBJ@
+AESNI_FLAGS=@AESNI_FLAGS@
+
STLIBOBJS=\
aescrypt.o \
aestab.o \
- aeskey.o
+ aeskey.o \
+ @AESNI_OBJ@
OBJS=\
$(OUTPRE)aescrypt.$(OBJEXT) \
@@ -29,6 +34,12 @@ GEN_OBJS=\
all-unix:: all-libobjs # aes-gen
+iaesx64@SHOBJEXT@: $(srcdir)/iaesx64.s
+ $(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx64.s
+
+iaesx86@SHOBJEXT@: $(srcdir)/iaesx86.s
+ $(YASM) $(AESNI_FLAGS) -o $@ $(srcdir)/iaesx86.s
+
includes:: depend
depend:: $(SRCS)