diff --git a/Makefile.am b/Makefile.am index a8801f29c..fd20d4920 100644 --- a/Makefile.am +++ b/Makefile.am @@ -123,6 +123,7 @@ endif links: $(MKDIR_P) include/oqs + cp -f config.h include/oqs cp -f src/common/common.h include/oqs cp -f src/crypto/aes/aes.h include/oqs cp -f src/crypto/rand/rand.h include/oqs diff --git a/README.md b/README.md index 26e61cccd..84978dbde 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,10 @@ To build with `sig_picnic` enabled: make clean make make test (this generates data needed by the Picnic library) + +### Configured Algorithms + +Flags for all the configured algorithms are generated in config.h file. Building and running on Windows ------------------------------- diff --git a/configure.ac b/configure.ac index 8a21c6ad8..82ab6b1ff 100644 --- a/configure.ac +++ b/configure.ac @@ -182,31 +182,37 @@ SRCDIR=${SRCDIR}" src/kex_rlwe_bcns15" if test x"$kex_lwe_frodo" = x"true"; then SRCDIR=${SRCDIR}" src/kex_lwe_frodo" AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_KEX_LWE_FRODO" + AC_DEFINE(ENABLE_KEX_LWE_FRODO, 1, "Define to 1 when FRODO enabled") fi if test x"$kex_mlwe_kyber" = x"true"; then SRCDIR=${SRCDIR}" src/kex_mlwe_kyber" AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_KEX_MLWE_KYBER" + AC_DEFINE(ENABLE_KEX_MLWE_KYBER, 1, "Define to 1 when KYBER enabled") fi if test x"$kex_ntru" = x"true"; then SRCDIR=${SRCDIR}" src/kex_ntru" AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_KEX_NTRU" + AC_DEFINE(ENABLE_KEX_NTRU, 1, "Define to 1 when NTRU enabled") fi if test x"$kex_rlwe_msrln16" = x"true"; then SRCDIR=${SRCDIR}" src/kex_rlwe_msrln16" AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_KEX_RLWE_MSRLN16" + AC_DEFINE(ENABLE_KEX_RLWE_MSRLN16, 1, "Define to 1 when RLWE MSRLN16 enabled") fi if test x"$kex_rlwe_newhope" = x"true"; then SRCDIR=${SRCDIR}" src/kex_rlwe_newhope" AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_KEX_RLWE_NEWHOPE" + AC_DEFINE(ENABLE_KEX_RLWE_NEWHOPE, 1, "Define to 1 when RLWE NEWHOPE enabled") fi if test x"$kex_sidh_cln16" = x"true"; then SRCDIR=${SRCDIR}" src/kex_sidh_cln16" AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_KEX_SIDH_CLN16" + AC_DEFINE(ENABLE_KEX_SIDH_CLN16, 1, "Define to 1 when SIDH CLN16 enabled") fi SRCDIR=${SRCDIR}" src/sig" @@ -229,10 +235,12 @@ if test x"$openssl" = x"true"; then fi if test x"$kex_code_mcbits" = x"true"; then AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_CODE_MCBITS" + AC_DEFINE(ENABLE_CODE_MCBITS, 1, "Define to 1 when MCBITS enabled") fi if test x"$kex_sidh_iqc_ref" = x"true"; then AM_CPPFLAGS=${AM_CPPFLAGS}" -DENABLE_SIDH_IQC_REF" SRCDIR=${SRCDIR}" src/kex_sidh_iqc_ref" + AC_DEFINE(ENABLE_SIDH_IQC_REF, 1, "Define to 1 when SIDH IQC enabled") fi AC_SUBST(AM_CPPFLAGS) diff --git a/src/kex/kex.h b/src/kex/kex.h index da2df09e1..a0992d0a5 100644 --- a/src/kex/kex.h +++ b/src/kex/kex.h @@ -11,6 +11,10 @@ #include +#if !defined(WINDOWS) +#include +#endif + enum OQS_KEX_alg_name { OQS_KEX_alg_default, OQS_KEX_alg_rlwe_bcns15,