2024-05-31 12:59:58 +02:00
|
|
|
.PATH: ${.CURDIR}/..
|
|
|
|
|
|
|
|
AEAD= wycheproof_aead
|
2024-06-18 16:30:06 +02:00
|
|
|
HKDF= wycheproof_hkdf
|
2024-06-06 14:41:44 +02:00
|
|
|
MAC= wycheproof_mac
|
2024-05-31 12:59:58 +02:00
|
|
|
|
2024-06-18 16:30:06 +02:00
|
|
|
PROGS= ${AEAD} ${HKDF} ${MAC}
|
2024-05-31 12:59:58 +02:00
|
|
|
NOMAN= noman
|
|
|
|
|
|
|
|
SRCS_wycheproof_aead= wycheproof_aead.c
|
2024-06-18 16:30:06 +02:00
|
|
|
SRCS_wycheproof_hkdf= wycheproof_hkdf.c
|
2024-06-06 14:41:44 +02:00
|
|
|
SRCS_wycheproof_mac= wycheproof_mac.c
|
2024-05-31 12:59:58 +02:00
|
|
|
|
2024-05-31 18:47:18 +02:00
|
|
|
DPADD+= ${.CURDIR}/../lib/obj/liblilcrypto.a
|
2024-05-31 12:59:58 +02:00
|
|
|
LDADD+= ${.CURDIR}/../lib/obj/liblilcrypto.a
|
|
|
|
|
|
|
|
|
2024-06-18 16:30:06 +02:00
|
|
|
tests: all tests-aead tests-hkdf tests-mac
|
2024-05-31 12:59:58 +02:00
|
|
|
|
|
|
|
tests-aead:
|
|
|
|
.ifndef WYCHEPROOF_DIR
|
|
|
|
@echo Undefined WYCHEPROOF_DIR; false
|
|
|
|
.endif
|
|
|
|
.for p in ${AEAD}
|
2024-05-31 18:53:05 +02:00
|
|
|
perl ${.CURDIR}/aead.pl ${TESTOPTS} -x ./${p} \
|
2024-05-31 12:59:58 +02:00
|
|
|
${WYCHEPROOF_DIR}/testvectors/chacha20_poly1305_test.json \
|
2024-06-07 04:18:50 +02:00
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/chacha20_poly1305_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors/xchacha20_poly1305_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/xchacha20_poly1305_test.json
|
2024-05-31 12:59:58 +02:00
|
|
|
.endfor
|
|
|
|
|
2024-06-18 16:30:06 +02:00
|
|
|
tests-hkdf:
|
|
|
|
.ifndef WYCHEPROOF_DIR
|
|
|
|
@echo Undefined WYCHEPROOF_DIR; false
|
|
|
|
.endif
|
|
|
|
.for p in ${HKDF}
|
|
|
|
perl ${.CURDIR}/hkdf.pl ${TESTOPTS} -x ./${p} \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors/hkdf_sha256_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hkdf_sha256_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors/hkdf_sha384_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hkdf_sha384_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors/hkdf_sha512_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hkdf_sha512_test.json
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
|
2024-06-06 14:41:44 +02:00
|
|
|
tests-mac:
|
|
|
|
.ifndef WYCHEPROOF_DIR
|
|
|
|
@echo Undefined WYCHEPROOF_DIR; false
|
|
|
|
.endif
|
|
|
|
.for p in ${MAC}
|
|
|
|
perl ${.CURDIR}/mac.pl ${TESTOPTS} -x ./${p} \
|
2024-06-07 05:14:21 +02:00
|
|
|
${WYCHEPROOF_DIR}/testvectors/hmac_sha224_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hmac_sha224_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors/hmac_sha256_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hmac_sha256_test.json \
|
2024-06-06 14:41:44 +02:00
|
|
|
${WYCHEPROOF_DIR}/testvectors/hmac_sha384_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hmac_sha384_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors/hmac_sha512_test.json \
|
2024-06-17 16:41:20 +02:00
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hmac_sha512_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hmac_sha512_224_test.json \
|
|
|
|
${WYCHEPROOF_DIR}/testvectors_v1/hmac_sha512_256_test.json
|
2024-06-06 14:41:44 +02:00
|
|
|
.endfor
|
|
|
|
|
2024-05-31 12:59:58 +02:00
|
|
|
.include <bsd.prog.mk>
|