1# $FreeBSD$ 2 3.PATH: ${SRCTOP}/sys/opencrypto 4.PATH: ${SRCTOP}/sys/crypto 5.PATH: ${SRCTOP}/sys/crypto/blowfish 6.PATH: ${SRCTOP}/sys/crypto/camellia 7.PATH: ${SRCTOP}/sys/crypto/des 8.PATH: ${SRCTOP}/sys/crypto/rijndael 9.PATH: ${SRCTOP}/sys/crypto/sha2 10.PATH: ${SRCTOP}/sys/crypto/siphash 11.PATH: ${SRCTOP}/sys/crypto/skein 12.PATH: ${SRCTOP}/sys/crypto/blake2 13.PATH: ${SRCTOP}/sys/crypto/chacha20 14.PATH: ${SRCTOP}/sys/contrib/libb2 15 16KMOD = crypto 17SRCS = crypto.c cryptodev_if.c 18SRCS += criov.c cryptosoft.c xform.c 19SRCS += cast.c cryptodeflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c rijndael-api-fst.c 20SRCS += skipjack.c bf_enc.c bf_ecb.c bf_skey.c 21SRCS += camellia.c camellia-api.c 22SRCS += des_ecb.c des_enc.c des_setkey.c 23SRCS += sha1.c sha256c.c sha512c.c 24SRCS += skein.c skein_block.c 25# unroll the 256 and 512 loops, half unroll the 1024 26CFLAGS+= -DSKEIN_LOOP=995 27.if exists(${MACHINE_ARCH}/skein_block_asm.s) 28.PATH: ${SRCTOP}/sys/crypto/skein/${MACHINE_ARCH} 29SRCS += skein_block_asm.s 30CFLAGS += -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792 31ACFLAGS += -DELF -Wa,--noexecstack 32# Fully unroll all loops in the assembly optimized version 33AFLAGS+= --defsym SKEIN_LOOP=0 34.endif 35SRCS += siphash.c 36SRCS += gmac.c gfmult.c 37SRCS += blake2b-ref.c 38SRCS += blake2s-ref.c 39SRCS += blake2-sw.c 40CFLAGS.blake2b-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref 41CFLAGS.blake2s-ref.c += -I${SRCTOP}/sys/crypto/blake2 -DSUFFIX=_ref 42CFLAGS.blake2-sw.c += -I${SRCTOP}/sys/crypto/blake2 43CWARNFLAGS.blake2b-ref.c += -Wno-cast-qual -Wno-unused-function 44CWARNFLAGS.blake2s-ref.c += -Wno-cast-qual -Wno-unused-function 45SRCS += chacha.c 46SRCS += chacha-sw.c 47SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h 48SRCS += opt_ddb.h 49 50.include <bsd.kmod.mk> 51