1 # $FreeBSD$
2
3 LIBSODIUM=${SRCTOP}/sys/contrib/libsodium/src/libsodium
4
5 .PATH: ${SRCTOP}/sys/opencrypto
6 .PATH: ${SRCTOP}/sys/crypto
7 .PATH: ${SRCTOP}/sys/crypto/camellia
8 .PATH: ${SRCTOP}/sys/crypto/des
9 .PATH: ${SRCTOP}/sys/crypto/rijndael
10 .PATH: ${SRCTOP}/sys/crypto/sha2
11 .PATH: ${SRCTOP}/sys/crypto/siphash
12 .PATH: ${SRCTOP}/sys/crypto/skein
13 .PATH: ${SRCTOP}/sys/crypto/blake2
14 .PATH: ${SRCTOP}/sys/crypto/chacha20
15 .PATH: ${SRCTOP}/sys/contrib/libb2
16 .PATH: ${LIBSODIUM}/crypto_core/ed25519/ref10
17 .PATH: ${LIBSODIUM}/crypto_core/hchacha20
18 .PATH: ${LIBSODIUM}/crypto_onetimeauth/poly1305
19 .PATH: ${LIBSODIUM}/crypto_onetimeauth/poly1305/donna
20 .PATH: ${LIBSODIUM}/crypto_scalarmult/curve25519
21 .PATH: ${LIBSODIUM}/crypto_scalarmult/curve25519/ref10
22 .PATH: ${LIBSODIUM}/crypto_stream/chacha20
23 .PATH: ${LIBSODIUM}/crypto_stream/chacha20/ref
24 .PATH: ${LIBSODIUM}/crypto_verify/sodium
25 .PATH: ${SRCTOP}/sys/crypto/libsodium
26
27 KMOD = crypto
28 SRCS = crypto.c cryptodev_if.c
29 SRCS += criov.c cryptosoft.c
30 SRCS += xform_aes_cbc.c xform_aes_icm.c xform_aes_xts.c xform_cml.c
31 SRCS += xform_deflate.c xform_gmac.c xform_null.c xform_rmd160.c
32 SRCS += xform_sha1.c xform_sha2.c
33 SRCS += cryptodeflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c rijndael-api-fst.c
34 SRCS += camellia.c camellia-api.c
35 SRCS += des_ecb.c des_enc.c des_setkey.c
36 SRCS += sha1.c sha256c.c sha512c.c
37 SRCS += skein.c skein_block.c
38 # unroll the 256 and 512 loops, half unroll the 1024
39 CFLAGS.skein_block.c += -DSKEIN_LOOP=995
40 .if exists(${MACHINE_ARCH}/skein_block_asm.S)
41 .PATH: ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH}
42 SRCS += skein_block_asm.S
43 CFLAGS += -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792
44 ACFLAGS += -DELF -Wa,--noexecstack
45 # Fully unroll all loops in the assembly optimized version
46 ACFLAGS += -DSKEIN_LOOP=0
47 # 20201002 Add explict Makefile dependency for reenabled assembly optimized
48 # version. SKEIN_USE_ASM determines which routines should come from the assembly
49 # vs C versions, and skein_block needs to be rebuilt if it changes.
50 skein_block.o: Makefile
51 .endif
52 SRCS += siphash.c
53 SRCS += gmac.c gfmult.c
54 SRCS += blake2b-ref.c
55 SRCS += blake2s-ref.c
56 SRCS += blake2-sw.c
57 CFLAGS.blake2b-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref
58 CFLAGS.blake2s-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref
59 CFLAGS.blake2-sw.c += -I${SRCTOP}/sys/crypto/blake2
60 CWARNFLAGS.blake2b-ref.c += -Wno-cast-qual -Wno-unused-function
61 CWARNFLAGS.blake2s-ref.c += -Wno-cast-qual -Wno-unused-function
62 SRCS += chacha.c
63 SRCS += chacha-sw.c
64 SRCS += chacha20_poly1305.c
65
66 LIBSODIUM_INC=${LIBSODIUM}/include
67 LIBSODIUM_COMPAT=${SRCTOP}/sys/crypto/libsodium
68 SRCS += xform_chacha20_poly1305.c
69 CFLAGS.xform_chacha20_poly1305.c+= -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
70 SRCS += xform_poly1305.c
71 CFLAGS.xform_poly1305.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
72 SRCS += ed25519_ref10.c
73 CFLAGS.ed25519_ref10.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
74 CWARNFLAGS.ed25519_ref10.c += -Wno-unused-function
75 SRCS += core_hchacha20.c
76 CFLAGS.core_hchacha20.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
77 SRCS += onetimeauth_poly1305.c
78 CFLAGS.onetimeauth_poly1305.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
79 SRCS += poly1305_donna.c
80 CFLAGS.poly1305_donna.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
81 SRCS += stream_chacha20.c
82 CFLAGS.stream_chacha20.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
83 SRCS += chacha20_ref.c
84 CFLAGS.chacha20_ref.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
85 SRCS += scalarmult_curve25519.c
86 CFLAGS.scalarmult_curve25519.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
87 SRCS += x25519_ref10.c
88 CFLAGS.x25519_ref10.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
89 CWARNFLAGS.x25519_ref10.c += -Wno-unused-function
90 SRCS += verify.c
91 CFLAGS.verify.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT}
92 SRCS += randombytes.c
93 CFLAGS.randombytes.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
94 SRCS += utils.c
95 CFLAGS.utils.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
96
97 SRCS += curve25519.c
98 CFLAGS.curve25519.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT}
99
100 SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h
101 SRCS += opt_compat.h
102 SRCS += opt_ddb.h
103 SRCS += cbc_mac.c
104 SRCS += xform_cbc_mac.c
105
106 .include <bsd.kmod.mk>
Cache object: 10f6bd05db4f144a0755aad210159f2b
|