summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authormiod <>2014-05-01 22:27:59 +0000
committermiod <>2014-05-01 22:27:59 +0000
commitd88e6461ff1350dd29ea934294418e26fd9e8f99 (patch)
tree5e99d3adf2eb66a69ca6075e6e0c8f58a654e3ec /src/lib
parent42050bb9b9848e1229363c4840d2a214d70b2d48 (diff)
downloadopenbsd-d88e6461ff1350dd29ea934294418e26fd9e8f99.tar.gz
openbsd-d88e6461ff1350dd29ea934294418e26fd9e8f99.tar.bz2
openbsd-d88e6461ff1350dd29ea934294418e26fd9e8f99.zip
Enable use of assembly code for AES, BN (Montgomery), SHA1, SHA256 and SHA512.
RC4 assembler code is not used, as it runs about 35% slower than the C code.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/arch/hppa/Makefile.inc50
-rw-r--r--src/lib/libcrypto/crypto/arch/hppa/Makefile.inc50
2 files changed, 100 insertions, 0 deletions
diff --git a/src/lib/libcrypto/arch/hppa/Makefile.inc b/src/lib/libcrypto/arch/hppa/Makefile.inc
new file mode 100644
index 0000000000..a25c69392b
--- /dev/null
+++ b/src/lib/libcrypto/arch/hppa/Makefile.inc
@@ -0,0 +1,50 @@
1# $OpenBSD: Makefile.inc,v 1.1 2014/05/01 22:27:59 miod Exp $
2
3# hppa-specific libcrypto build rules
4
5# aes
6SRCS+= aes_core.c aes_cbc.c
7CFLAGS+= -DAES_ASM
8SSLASM+= aes aes-parisc aes-parisc
9# bf
10SRCS+= bf_enc.c
11# bn
12SRCS+= bn_asm.c
13SSLASM+= bn parisc-mont parisc-mont
14# des
15SRCS+= des_enc.c fcrypt_b.c
16# modes
17CFLAGS+= -DGHASH_ASM
18SSLASM+= modes ghash-parisc ghash-parisc
19# rc4
20.if 0 # about 35% slower than C code
21SSLASM+= rc4 rc4-parisc rc4-parisc
22.else
23SRCS+= rc4_enc.c rc4_skey.c
24.endif
25## rc5
26#SRCS+= rc5_enc.c
27# sha
28CFLAGS+= -DSHA1_ASM
29SSLASM+= sha sha1-parisc sha1-parisc
30CFLAGS+= -DSHA256_ASM
31SSLASM+= sha sha512-parisc sha256-parisc
32CFLAGS+= -DSHA512_ASM
33SSLASM+= sha sha512-parisc sha512-parisc
34# whrlpool
35SRCS+= wp_block.c
36
37.for dir src dst in ${SSLASM}
38SRCS+= ${dst}.S
39GENERATED+=${dst}.S
40${dst}.S: ${LCRYPTO_SRC}/${dir}/asm/${src}.pl
41 /usr/bin/perl \
42 ${LCRYPTO_SRC}/${dir}/asm/${src}.pl 32 ${.TARGET} > ${.TARGET}
43.endfor
44
45CFLAGS+= -DOPENSSL_CPUID_OBJ
46SRCS+= pariscid.S
47GENERATED+=pariscid.S
48pariscid.S: ${LCRYPTO_SRC}/pariscid.pl
49 /usr/bin/perl \
50 ${LCRYPTO_SRC}/pariscid.pl 32 > ${.TARGET}
diff --git a/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc b/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc
new file mode 100644
index 0000000000..a25c69392b
--- /dev/null
+++ b/src/lib/libcrypto/crypto/arch/hppa/Makefile.inc
@@ -0,0 +1,50 @@
1# $OpenBSD: Makefile.inc,v 1.1 2014/05/01 22:27:59 miod Exp $
2
3# hppa-specific libcrypto build rules
4
5# aes
6SRCS+= aes_core.c aes_cbc.c
7CFLAGS+= -DAES_ASM
8SSLASM+= aes aes-parisc aes-parisc
9# bf
10SRCS+= bf_enc.c
11# bn
12SRCS+= bn_asm.c
13SSLASM+= bn parisc-mont parisc-mont
14# des
15SRCS+= des_enc.c fcrypt_b.c
16# modes
17CFLAGS+= -DGHASH_ASM
18SSLASM+= modes ghash-parisc ghash-parisc
19# rc4
20.if 0 # about 35% slower than C code
21SSLASM+= rc4 rc4-parisc rc4-parisc
22.else
23SRCS+= rc4_enc.c rc4_skey.c
24.endif
25## rc5
26#SRCS+= rc5_enc.c
27# sha
28CFLAGS+= -DSHA1_ASM
29SSLASM+= sha sha1-parisc sha1-parisc
30CFLAGS+= -DSHA256_ASM
31SSLASM+= sha sha512-parisc sha256-parisc
32CFLAGS+= -DSHA512_ASM
33SSLASM+= sha sha512-parisc sha512-parisc
34# whrlpool
35SRCS+= wp_block.c
36
37.for dir src dst in ${SSLASM}
38SRCS+= ${dst}.S
39GENERATED+=${dst}.S
40${dst}.S: ${LCRYPTO_SRC}/${dir}/asm/${src}.pl
41 /usr/bin/perl \
42 ${LCRYPTO_SRC}/${dir}/asm/${src}.pl 32 ${.TARGET} > ${.TARGET}
43.endfor
44
45CFLAGS+= -DOPENSSL_CPUID_OBJ
46SRCS+= pariscid.S
47GENERATED+=pariscid.S
48pariscid.S: ${LCRYPTO_SRC}/pariscid.pl
49 /usr/bin/perl \
50 ${LCRYPTO_SRC}/pariscid.pl 32 > ${.TARGET}