From c3bf83f7cf1ff567aae1e260425898b2af6bf4cc Mon Sep 17 00:00:00 2001 From: beck <> Date: Fri, 13 Dec 2024 00:03:57 +0000 Subject: Add ML-KEM 768 from BoringSSL Changes include conversion from C++, basic KNF, then adaptation to use our sha3 functions for sha3 and shake instead of the BorinSSL version. This Adds units tests to run against BoringSSL and NIST test vectors. The future public API is the same as Boring's - but is not yet exposed pending making bytesring.h public (which will happen separately) and a minor bump Currently this will just ensure we build and run regress. ok tb@ to get it into the tree and massage from there. --- src/lib/libcrypto/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/Makefile') diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile index c981a4189f..f43b09d176 100644 --- a/src/lib/libcrypto/Makefile +++ b/src/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.228 2024/11/16 10:38:10 tb Exp $ +# $OpenBSD: Makefile,v 1.229 2024/12/13 00:03:57 beck Exp $ LIB= crypto LIBREBUILD=y @@ -43,6 +43,7 @@ CFLAGS+= -I${LCRYPTO_SRC}/hidden CFLAGS+= -I${LCRYPTO_SRC}/hmac CFLAGS+= -I${LCRYPTO_SRC}/kdf CFLAGS+= -I${LCRYPTO_SRC}/lhash +CFLAGS+= -I${LCRYPTO_SRC}/mlkem CFLAGS+= -I${LCRYPTO_SRC}/modes CFLAGS+= -I${LCRYPTO_SRC}/ocsp CFLAGS+= -I${LCRYPTO_SRC}/pkcs12 @@ -371,6 +372,9 @@ SRCS+= md4.c # md5/ SRCS+= md5.c +# mlkem/ +SRCS+= mlkem768.c + # modes/ SRCS+= cbc128.c SRCS+= ccm128.c @@ -607,6 +611,7 @@ SRCS+= x_all.c ${LCRYPTO_SRC}/lhash \ ${LCRYPTO_SRC}/md4 \ ${LCRYPTO_SRC}/md5 \ + ${LCRYPTO_SRC}/mlkem \ ${LCRYPTO_SRC}/modes \ ${LCRYPTO_SRC}/objects \ ${LCRYPTO_SRC}/ocsp \ @@ -639,6 +644,7 @@ HDRS=\ ${LCRYPTO_SRC}/bio/bio.h \ ${LCRYPTO_SRC}/bn/bn.h \ ${LCRYPTO_SRC}/buffer/buffer.h \ + ${LCRYPTO_SRC}/bytestring/bytestring.h \ ${LCRYPTO_SRC}/camellia/camellia.h \ ${LCRYPTO_SRC}/cast/cast.h \ ${LCRYPTO_SRC}/chacha/chacha.h \ @@ -665,6 +671,7 @@ HDRS=\ ${LCRYPTO_SRC}/lhash/lhash.h \ ${LCRYPTO_SRC}/md4/md4.h \ ${LCRYPTO_SRC}/md5/md5.h \ + ${LCRYPTO_SRC}/mlkem/mlkem.h \ ${LCRYPTO_SRC}/modes/modes.h \ ${LCRYPTO_SRC}/objects/objects.h \ ${LCRYPTO_SRC}/ocsp/ocsp.h \ -- cgit v1.2.3-55-g6feb