Flags for configured algorithms generated in config.h (#177)

* Flags for configured algorithms generated in config.h

* Fix issue 168

* Separate artifacts for windows build and Non-windows build
This commit is contained in:
smashra 2017-12-11 14:38:11 -05:00 committed by Douglas Stebila
parent 2d5eb13732
commit 9dab6f6d2c
4 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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
-------------------------------

View File

@ -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)

View File

@ -11,6 +11,10 @@
#include <oqs/rand.h>
#if !defined(WINDOWS)
#include <oqs/config.h>
#endif
enum OQS_KEX_alg_name {
OQS_KEX_alg_default,
OQS_KEX_alg_rlwe_bcns15,