From b1b3840ac540ae5980cbb4258a4b44d75ee27d75 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:03:03 +0000 Subject: [PATCH 1/3] revert: stop tracking cmake dependency relic_conf.h.in reverts: - 02260cba57f5b28c35509fbd6168feac50a1980e. --- .../depends/relic/include/relic_conf.h.in | 717 ++++++++++++++++++ 1 file changed, 717 insertions(+) create mode 100644 src/dashbls/depends/relic/include/relic_conf.h.in diff --git a/src/dashbls/depends/relic/include/relic_conf.h.in b/src/dashbls/depends/relic/include/relic_conf.h.in new file mode 100644 index 0000000000..7db6f5b509 --- /dev/null +++ b/src/dashbls/depends/relic/include/relic_conf.h.in @@ -0,0 +1,717 @@ +/* + * RELIC is an Efficient LIbrary for Cryptography + * Copyright (c) 2009 RELIC Authors + * + * This file is part of RELIC. RELIC is legal property of its developers, + * whose names are not listed here. Please refer to the COPYRIGHT file + * for contact information. + * + * RELIC is free software; you can redistribute it and/or modify it under the + * terms of the version 2.1 (or later) of the GNU Lesser General Public License + * as published by the Free Software Foundation; or version 2.0 of the Apache + * License as published by the Apache Software Foundation. See the LICENSE files + * for more details. + * + * RELIC is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + * A PARTICULAR PURPOSE. See the LICENSE files for more details. + * + * You should have received a copy of the GNU Lesser General Public or the + * Apache License along with RELIC. If not, see + * or . + */ + +/** + * @file + * + * Project configuration. + * + * @version $Id: relic_conf.h.in 45 2009-07-04 23:45:48Z dfaranha $ + * @ingroup relic + */ + +#ifndef RLC_CONF_H +#define RLC_CONF_H + +/** Project version. */ +#define RLC_VERSION "@VERSION@" + +/** Debugging support. */ +#cmakedefine DEBUG +/** Profiling support. */ +#cmakedefine PROFL +/** Error handling support. */ +#cmakedefine CHECK +/** Verbose error messages. */ +#cmakedefine VERBS +/** Build with overhead estimation. */ +#cmakedefine OVERH +/** Build documentation. */ +#cmakedefine DOCUM +/** Build only the selected algorithms. */ +#cmakedefine STRIP +/** Build with printing disabled. */ +#cmakedefine QUIET +/** Build with colored output. */ +#cmakedefine COLOR +/** Build with big-endian support. */ +#cmakedefine BIGED +/** Build shared library. */ +#cmakedefine SHLIB +/** Build static library. */ +#cmakedefine STLIB + +/** Number of times each test is ran. */ +#define TESTS @TESTS@ +/** Number of times each benchmark is ran. */ +#define BENCH @BENCH@ +/** Number of available cores. */ +#define CORES @CORES@ + +/** Atmel AVR ATMega128 8-bit architecture. */ +#define AVR 1 +/** MSP430 16-bit architecture. */ +#define MSP 2 +/** ARM 32-bit architecture. */ +#define ARM 3 +/** Intel x86-compatible 32-bit architecture. */ +#define X86 4 +/** AMD64-compatible 64-bit architecture. */ +#define X64 5 +/** Architecture. */ +#cmakedefine ARCH @ARCH@ + +/** Size of word in this architecture. */ +#define WSIZE @WSIZE@ + +/** Byte boundary to align digit vectors. */ +#define ALIGN @ALIGN@ + +/** Build multiple precision integer module. */ +#cmakedefine WITH_BN +/** Build prime field module. */ +#cmakedefine WITH_FP +/** Build prime field extension module. */ +#cmakedefine WITH_FPX +/** Build binary field module. */ +#cmakedefine WITH_FB +/** Build prime elliptic curve module. */ +#cmakedefine WITH_EP +/** Build prime field extension elliptic curve module. */ +#cmakedefine WITH_EPX +/** Build binary elliptic curve module. */ +#cmakedefine WITH_EB +/** Build elliptic Edwards curve module. */ +#cmakedefine WITH_ED +/** Build elliptic curve cryptography module. */ +#cmakedefine WITH_EC +/** Build pairings over prime curves module. */ +#cmakedefine WITH_PP +/** Build pairing-based cryptography module. */ +#cmakedefine WITH_PC +/** Build block ciphers. */ +#cmakedefine WITH_BC +/** Build hash functions. */ +#cmakedefine WITH_MD +/** Build cryptographic protocols. */ +#cmakedefine WITH_CP +/** Build Multi-party computation primitives. */ +#cmakedefine WITH_MPC + +/** Easy C-only backend. */ +#define EASY 1 +/** GMP backend. */ +#define GMP 2 +/** GMP constant-time backend. */ +#define GMP_SEC 3 +/** Arithmetic backend. */ +#define ARITH @ARITH@ + +/** Required precision in bits. */ +#define BN_PRECI @BN_PRECI@ +/** A multiple precision integer can store w words. */ +#define SINGLE 0 +/** A multiple precision integer can store the result of an addition. */ +#define CARRY 1 +/** A multiple precision integer can store the result of a multiplication. */ +#define DOUBLE 2 +/** Effective size of a multiple precision integer. */ +#define BN_MAGNI @BN_MAGNI@ +/** Number of Karatsuba steps. */ +#define BN_KARAT @BN_KARAT@ + +/** Schoolbook multiplication. */ +#define BASIC 1 +/** Comba multiplication. */ +#define COMBA 2 +/** Chosen multiple precision multiplication method. */ +#define BN_MUL @BN_MUL@ + +/** Schoolbook squaring. */ +#define BASIC 1 +/** Comba squaring. */ +#define COMBA 2 +/** Reuse multiplication for squaring. */ +#define MULTP 4 +/** Chosen multiple precision multiplication method. */ +#define BN_SQR @BN_SQR@ + +/** Division modular reduction. */ +#define BASIC 1 +/** Barrett modular reduction. */ +#define BARRT 2 +/** Montgomery modular reduction. */ +#define MONTY 3 +/** Pseudo-Mersenne modular reduction. */ +#define PMERS 4 +/** Chosen multiple precision modular reduction method. */ +#define BN_MOD @BN_MOD@ + +/** Binary modular exponentiation. */ +#define BASIC 1 +/** Sliding window modular exponentiation. */ +#define SLIDE 2 +/** Montgomery powering ladder. */ +#define MONTY 3 +/** Chosen multiple precision modular exponentiation method. */ +#define BN_MXP @BN_MXP@ + +/** Basic Euclidean GCD Algorithm. */ +#define BASIC 1 +/** Lehmer's fast GCD Algorithm. */ +#define LEHME 2 +/** Stein's binary GCD Algorithm. */ +#define STEIN 3 +/** Chosen multiple precision greatest common divisor method. */ +#define BN_GCD @BN_GCD@ + +/** Basic prime generation. */ +#define BASIC 1 +/** Safe prime generation. */ +#define SAFEP 2 +/** Strong prime generation. */ +#define STRON 3 +/** Chosen prime generation algorithm. */ +#define BN_GEN @BN_GEN@ + +/** Multiple precision arithmetic method */ +#define BN_METHD "@BN_METHD@" + +/** Prime field size in bits. */ +#define FP_PRIME @FP_PRIME@ +/** Number of Karatsuba steps. */ +#define FP_KARAT @FP_KARAT@ +/** Prefer Pseudo-Mersenne primes over random primes. */ +#cmakedefine FP_PMERS +/** Use -1 as quadratic non-residue. */ +#cmakedefine FP_QNRES +/** Width of window processing for exponentiation methods. */ +#define FP_WIDTH @FP_WIDTH@ + +/** Schoolbook addition. */ +#define BASIC 1 +/** Integrated modular addtion. */ +#define INTEG 3 +/** Chosen prime field multiplication method. */ +#define FP_ADD @FP_ADD@ + +/** Schoolbook multiplication. */ +#define BASIC 1 +/** Comba multiplication. */ +#define COMBA 2 +/** Integrated modular multiplication. */ +#define INTEG 3 +/** Chosen prime field multiplication method. */ +#define FP_MUL @FP_MUL@ + +/** Schoolbook squaring. */ +#define BASIC 1 +/** Comba squaring. */ +#define COMBA 2 +/** Integrated modular squaring. */ +#define INTEG 3 +/** Reuse multiplication for squaring. */ +#define MULTP 4 +/** Chosen prime field multiplication method. */ +#define FP_SQR @FP_SQR@ + +/** Division-based reduction. */ +#define BASIC 1 +/** Fast reduction modulo special form prime. */ +#define QUICK 2 +/** Montgomery modular reduction. */ +#define MONTY 3 +/** Chosen prime field reduction method. */ +#define FP_RDC @FP_RDC@ + +/** Inversion by Fermat's Little Theorem. */ +#define BASIC 1 +/** Binary inversion. */ +#define BINAR 2 +/** Integrated modular multiplication. */ +#define MONTY 3 +/** Extended Euclidean algorithm. */ +#define EXGCD 4 +/** Constant-time inversion by Bernstein-Yang division steps. */ +#define DIVST 5 +/** Use implementation provided by the lower layer. */ +#define LOWER 8 +/** Chosen prime field inversion method. */ +#define FP_INV @FP_INV@ + +/** Binary modular exponentiation. */ +#define BASIC 1 +/** Sliding window modular exponentiation. */ +#define SLIDE 2 +/** Constant-time Montgomery powering ladder. */ +#define MONTY 3 +/** Chosen multiple precision modular exponentiation method. */ +#define FP_EXP @FP_EXP@ + +/** Prime field arithmetic method */ +#define FP_METHD "@FP_METHD@" + +/** Basic quadratic extension field arithmetic. */ +#define BASIC 1 +/** Integrated extension field arithmetic. */ +#define INTEG 3 +/* Chosen extension field arithmetic method. */ +#define FPX_QDR @FPX_QDR@ + +/** Basic cubic extension field arithmetic. */ +#define BASIC 1 +/** Integrated extension field arithmetic. */ +#define INTEG 3 +/* Chosen extension field arithmetic method. */ +#define FPX_CBC @FPX_CBC@ + +/** Basic quadratic extension field arithmetic. */ +#define BASIC 1 +/** Lazy-reduced extension field arithmetic. */ +#define LAZYR 2 +/* Chosen extension field arithmetic method. */ +#define FPX_RDC @FPX_RDC@ + +/** Prime extension field arithmetic method */ +#define FPX_METHD "@FPX_METHD@" + +/** Irreducible polynomial size in bits. */ +#define FB_POLYN @FB_POLYN@ +/** Number of Karatsuba steps. */ +#define FB_KARAT @FB_KARAT@ +/** Prefer trinomials over pentanomials. */ +#cmakedefine FB_TRINO +/** Prefer square-root friendly polynomials. */ +#cmakedefine FB_SQRTF +/** Precompute multiplication table for sqrt(z). */ +#cmakedefine FB_PRECO +/** Width of window processing for exponentiation methods. */ +#define FB_WIDTH @FB_WIDTH@ + +/** Shift-and-add multiplication. */ +#define BASIC 1 +/** Lopez-Dahab multiplication. */ +#define LODAH 2 +/** Integrated modular multiplication. */ +#define INTEG 3 +/** Chosen binary field multiplication method. */ +#define FB_MUL @FB_MUL@ + +/** Basic squaring. */ +#define BASIC 1 +/** Table-based squaring. */ +#define QUICK 2 +/** Integrated modular squaring. */ +#define INTEG 3 +/** Chosen binary field squaring method. */ +#define FB_SQR @FB_SQR@ + +/** Shift-and-add modular reduction. */ +#define BASIC 1 +/** Fast reduction modulo a trinomial or pentanomial. */ +#define QUICK 2 +/** Chosen binary field modular reduction method. */ +#define FB_RDC @FB_RDC@ + +/** Square root by repeated squaring. */ +#define BASIC 1 +/** Fast square root extraction. */ +#define QUICK 2 +/** Chosen binary field modular reduction method. */ +#define FB_SRT @FB_SRT@ + +/** Trace by repeated squaring. */ +#define BASIC 1 +/** Fast trace computation. */ +#define QUICK 2 +/** Chosen trace computation method. */ +#define FB_TRC @FB_TRC@ + +/** Solve by half-trace computation. */ +#define BASIC 1 +/** Solve with precomputed half-traces. */ +#define QUICK 2 +/** Chosen method to solve a quadratic equation. */ +#define FB_SLV @FB_SLV@ + +/** Inversion by Fermat's Little Theorem. */ +#define BASIC 1 +/** Binary inversion. */ +#define BINAR 2 +/** Almost inverse algorithm. */ +#define ALMOS 3 +/** Extended Euclidean algorithm. */ +#define EXGCD 4 +/** Itoh-Tsuji inversion. */ +#define ITOHT 5 +/** Hardware-friendly inversion by Brunner-Curiger-Hofstetter.*/ +#define BRUCH 6 +/** Constant-time version of almost inverse. */ +#define CTAIA 7 +/** Use implementation provided by the lower layer. */ +#define LOWER 8 +/** Chosen binary field inversion method. */ +#define FB_INV @FB_INV@ + +/** Binary modular exponentiation. */ +#define BASIC 1 +/** Sliding window modular exponentiation. */ +#define SLIDE 2 +/** Constant-time Montgomery powering ladder. */ +#define MONTY 3 +/** Chosen multiple precision modular exponentiation method. */ +#define FB_EXP @FB_EXP@ + +/** Iterated squaring/square-root by consecutive squaring/square-root. */ +#define BASIC 1 +/** Iterated squaring/square-root by table-based method. */ +#define QUICK 2 +/** Chosen method to solve a quadratic equation. */ +#define FB_ITR @FB_ITR@ + +/** Binary field arithmetic method */ +#define FB_METHD "@FB_METHD@" + +/** Support for ordinary curves. */ +#cmakedefine EP_PLAIN +/** Support for supersingular curves. */ +#cmakedefine EP_SUPER +/** Support for prime curves with efficient endormorphisms. */ +#cmakedefine EP_ENDOM +/** Use mixed coordinates. */ +#cmakedefine EP_MIXED +/** Build precomputation table for generator. */ +#cmakedefine EP_PRECO +/** Enable isogeny map for SSWU map-to-curve. */ +#cmakedefine EP_CTMAP +/** Width of precomputation table for fixed point methods. */ +#define EP_DEPTH @EP_DEPTH@ +/** Width of window processing for unknown point methods. */ +#define EP_WIDTH @EP_WIDTH@ + +/** Affine coordinates. */ +#define BASIC 1 +/** Projective coordinates. */ +#define PROJC 2 +/** Jacobian coordinates. */ +#define JACOB 3 +/** Chosen prime elliptic curve coordinate method. */ +#define EP_ADD @EP_ADD@ + +/** Binary point multiplication. */ +#define BASIC 1 +/** Sliding window. */ +#define SLIDE 2 +/** Montgomery powering ladder. */ +#define MONTY 3 +/** Left-to-right Width-w NAF. */ +#define LWNAF 4 +/** Left-to-right Width-w NAF. */ +#define LWREG 5 +/** Chosen prime elliptic curve point multiplication method. */ +#define EP_MUL @EP_MUL@ + +/** Binary point multiplication. */ +#define BASIC 1 +/** Single-table comb method. */ +#define COMBS 2 +/** Double-table comb method. */ +#define COMBD 3 +/** Left-to-right Width-w NAF. */ +#define LWNAF 4 +/** Chosen prime elliptic curve point multiplication method. */ +#define EP_FIX @EP_FIX@ + +/** Basic simultaneouns point multiplication. */ +#define BASIC 1 +/** Shamir's trick. */ +#define TRICK 2 +/** Interleaving of w-(T)NAFs. */ +#define INTER 3 +/** Joint sparse form. */ +#define JOINT 4 +/** Chosen prime elliptic curve simulteanous point multiplication method. */ +#define EP_SIM @EP_SIM@ + +/** Prime elliptic curve arithmetic method. */ +#define EP_METHD "@EP_METHD@" + +/** Support for ordinary curves without endormorphisms. */ +#cmakedefine EB_PLAIN +/** Support for Koblitz anomalous binary curves. */ +#cmakedefine EB_KBLTZ +/** Use mixed coordinates. */ +#cmakedefine EB_MIXED +/** Build precomputation table for generator. */ +#cmakedefine EB_PRECO +/** Width of precomputation table for fixed point methods. */ +#define EB_DEPTH @EB_DEPTH@ +/** Width of window processing for unknown point methods. */ +#define EB_WIDTH @EB_WIDTH@ + +/** Binary elliptic curve arithmetic method. */ +#define EB_METHD "@EB_METHD@" + +/** Affine coordinates. */ +#define BASIC 1 +/** López-Dahab Projective coordinates. */ +#define PROJC 2 +/** Chosen binary elliptic curve coordinate method. */ +#define EB_ADD @EB_ADD@ + +/** Binary point multiplication. */ +#define BASIC 1 +/** L�pez-Dahab point multiplication. */ +#define LODAH 2 +/** Halving. */ +#define HALVE 3 +/** Left-to-right width-w (T)NAF. */ +#define LWNAF 4 +/** Right-to-left width-w (T)NAF. */ +#define RWNAF 5 +/** Chosen binary elliptic curve point multiplication method. */ +#define EB_MUL @EB_MUL@ + +/** Binary point multiplication. */ +#define BASIC 1 +/** Single-table comb method. */ +#define COMBS 2 +/** Double-table comb method. */ +#define COMBD 3 +/** Left-to-right Width-w NAF. */ +#define LWNAF 4 +/** Chosen binary elliptic curve point multiplication method. */ +#define EB_FIX @EB_FIX@ + +/** Basic simultaneouns point multiplication. */ +#define BASIC 1 +/** Shamir's trick. */ +#define TRICK 2 +/** Interleaving of w-(T)NAFs. */ +#define INTER 3 +/** Joint sparse form. */ +#define JOINT 4 +/** Chosen binary elliptic curve simulteanous point multiplication method. */ +#define EB_SIM @EB_SIM@ + +/** Build precomputation table for generator. */ +#cmakedefine ED_PRECO +/** Width of precomputation table for fixed point methods. */ +#define ED_DEPTH @ED_DEPTH@ +/** Width of window processing for unknown point methods. */ +#define ED_WIDTH @ED_WIDTH@ + +/** Edwards elliptic curve arithmetic method. */ +#define ED_METHD "@ED_METHD@" + +/** Affine coordinates. */ +#define BASIC 1 +/** Simple projective twisted Edwards coordinates */ +#define PROJC 2 +/** Extended projective twisted Edwards coordinates */ +#define EXTND 3 +/** Chosen binary elliptic curve coordinate method. */ +#define ED_ADD @ED_ADD@ + +/** Binary point multiplication. */ +#define BASIC 1 +/** Sliding window. */ +#define SLIDE 2 +/** Montgomery powering ladder. */ +#define MONTY 3 +/** Left-to-right Width-w NAF. */ +#define LWNAF 4 +/** Left-to-right Width-w NAF. */ +#define LWREG 5 +/** Chosen prime elliptic twisted Edwards curve point multiplication method. */ +#define ED_MUL @ED_MUL@ + +/** Binary point multiplication. */ +#define BASIC 1 +/** Single-table comb method. */ +#define COMBS 2 +/** Double-table comb method. */ +#define COMBD 3 +/** Left-to-right Width-w NAF. */ +#define LWNAF 4 +/** Chosen prime elliptic twisted Edwards curve point multiplication method. */ +#define ED_FIX @ED_FIX@ + +/** Basic simultaneouns point multiplication. */ +#define BASIC 1 +/** Shamir's trick. */ +#define TRICK 2 +/** Interleaving of w-(T)NAFs. */ +#define INTER 3 +/** Joint sparse form. */ +#define JOINT 4 +/** Chosen prime elliptic curve simulteanous point multiplication method. */ +#define ED_SIM @ED_SIM@ + +/** Prime curves. */ +#define PRIME 1 +/** Binary curves. */ +#define CHAR2 2 +/** Edwards curves */ +#define EDDIE 3 +/** Chosen elliptic curve type. */ +#define EC_CUR @EC_CUR@ + +/** Chosen elliptic curve cryptography method. */ +#define EC_METHD "@EC_METHD@" +/** Prefer curves with efficient endomorphisms. */ +#cmakedefine EC_ENDOM + +/** Basic quadratic extension field arithmetic. */ +#define BASIC 1 +/** Lazy-reduced extension field arithmetic. */ +#define LAZYR 2 +/* Chosen extension field arithmetic method. */ +#define PP_EXT @PP_EXT@ + +/** Bilinear pairing method. */ +#define PP_METHD "@PP_METHD@" + +/** Tate pairing. */ +#define TATEP 1 +/** Weil pairing. */ +#define WEILP 2 +/** Optimal ate pairing. */ +#define OATEP 3 +/** Chosen pairing method over prime elliptic curves. */ +#define PP_MAP @PP_MAP@ + +/** SHA-224 hash function. */ +#define SH224 2 +/** SHA-256 hash function. */ +#define SH256 3 +/** SHA-384 hash function. */ +#define SH384 4 +/** SHA-512 hash function. */ +#define SH512 5 +/** BLAKE2s-160 hash function. */ +#define B2S160 6 +/** BLAKE2s-256 hash function. */ +#define B2S256 7 +/** Chosen hash function. */ +#define MD_MAP @MD_MAP@ + +/** Choice of hash function. */ +#define MD_METHD "@MD_METHD@" + +/** Chosen RSA method. */ +#cmakedefine CP_CRT +/** RSA without padding. */ +#define BASIC 1 +/** RSA PKCS#1 v1.5 padding. */ +#define PKCS1 2 +/** RSA PKCS#1 v2.1 padding. */ +#define PKCS2 3 +/** Chosen RSA padding method. */ +#define CP_RSAPD @CP_RSAPD@ + +/** Automatic memory allocation. */ +#define AUTO 1 +/** Dynamic memory allocation. */ +#define DYNAMIC 2 +/** Chosen memory allocation policy. */ +#define ALLOC @ALLOC@ + +/** NIST HASH-DRBG generator. */ +#define HASHD 1 +/** Intel RdRand instruction. */ +#define RDRND 2 +/** Operating system underlying generator. */ +#define UDEV 3 +/** Override library generator with the callback. */ +#define CALL 4 +/** Chosen random generator. */ +#define RAND @RAND@ + +/** Standard C library generator. */ +#define LIBC 1 +/** Intel RdRand instruction. */ +#define RDRND 2 +/** Device node generator. */ +#define UDEV 3 +/** Use Windows' CryptGenRandom. */ +#define WCGR 4 +/** Chosen random generator seeder. */ +#cmakedefine SEED @SEED@ + +/** GNU/Linux operating system. */ +#define LINUX 1 +/** FreeBSD operating system. */ +#define FREEBSD 2 +/** Windows operating system. */ +#define MACOSX 3 +/** Windows operating system. */ +#define WINDOWS 4 +/** Android operating system. */ +#define DROID 5 +/** Arduino platform. */ +#define DUINO 6 +/** OpenBSD operating system. */ +#define OPENBSD 7 +/** Detected operation system. */ +#cmakedefine OPSYS @OPSYS@ + +/** OpenMP multithreading support. */ +#define OPENMP 1 +/** POSIX multithreading support. */ +#define PTHREAD 2 +/** Chosen multithreading API. */ +#cmakedefine MULTI @MULTI@ + +/** Per-process high-resolution timer. */ +#define HREAL 1 +/** Per-process high-resolution timer. */ +#define HPROC 2 +/** Per-thread high-resolution timer. */ +#define HTHRD 3 +/** POSIX-compatible timer. */ +#define POSIX 4 +/** ANSI-compatible timer. */ +#define ANSI 5 +/** Cycle-counting timer. */ +#define CYCLE 6 +/** Performance monitoring framework. */ +#define PERF 7 +/** Chosen timer. */ +#cmakedefine TIMER @TIMER@ + +/** Prefix to identity this build of the library. */ +#cmakedefine LABEL @LABEL@ + +#ifndef ASM + +#include "relic_label.h" + +/** + * Prints the project options selected at build time. + */ +void conf_print(void); + +#endif /* ASM */ + +#endif /* !RLC_CONF_H */ From 62fa66524c5ec4a5a005285a05b7a3314a523a16 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:04:26 +0000 Subject: [PATCH 2/3] Squashed 'src/dashbls/' changes from 4e070243ae..7e747e8a07 7e747e8a07 Merge pull request #105 from kwvg/bump_1.3.4 f8703c9971 chore: bump version to 1.3.4 5cc55ce222 Merge pull request #104 from UdjinM6/fix_gmp_freebsd aad89e3e86 Merge pull request #103 from kwvg/pyci_upd a52d7ed109 Merge pull request #102 from kwvg/autoconf 56b2d4a0ac ci: replace EoL Go 1.17 with 1.22 17f3ab47a0 ci: drop EoL Python 3.7 and 3.8, replace with Python 3.12 a3fcdde7c5 fix: gmp detection on FreeBSD e73acdd304 build: consolidate `TARGET_OS` assignments into `OPSYS` assignment case 343c6244ac build: remove unnecessary `BUILD_`{`BENCH`, `TEST`} variables af9a6906c3 build: account for FreeBSD's `amd64` `host_cpu` in optim. CPU detection 34a7c60e86 build: replace `bash`-isms with `sh`-friendly `test` and `case` git-subtree-dir: src/dashbls git-subtree-split: 7e747e8a0769f6e4d308d8d2e3dd254c240cbdd9 --- .github/workflows/build-binds.yml | 4 +- configure.ac | 135 ++++++++++++++++++------------ 2 files changed, 85 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build-binds.yml b/.github/workflows/build-binds.yml index f57acbd7e2..6fc729109d 100644 --- a/.github/workflows/build-binds.yml +++ b/.github/workflows/build-binds.yml @@ -23,8 +23,8 @@ jobs: fail-fast: false matrix: os: [macos-latest, ubuntu-latest] - golang: [ '1.17' ] - python: ['3.7', '3.8', '3.9', '3.10', '3.11'] + golang: [ '1.22' ] + python: ['3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout code diff --git a/configure.ac b/configure.ac index e60fca8fc1..df411ced0c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.60]) -AC_INIT([libdashbls],[1.3.3]) +AC_INIT([libdashbls],[1.3.4]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux/m4]) @@ -100,7 +100,7 @@ dnl warning about something unrelated, for example about some path issue. If tha dnl -Werror cannot be used because all of those warnings would be turned into errors. AX_CHECK_COMPILE_FLAG([-Werror], [FLAG_WERROR="-Werror"], [FLAG_WERROR=""]) -if [[[ "$use_debug" == "yes" || "$use_optimizations" == "no" ]]]; then +if test x"$use_debug" = x"yes" -o x"$use_optimizations" = x"no"; then dnl Clear default -g -O2 flags if test x"$CFLAGS_overridden" = x"no"; then CFLAGS="" @@ -112,7 +112,7 @@ if [[[ "$use_debug" == "yes" || "$use_optimizations" == "no" ]]]; then dnl Disable optimizations AX_CHECK_COMPILE_FLAG([-O0], [[DEBUG_FLAGS="$DEBUG_FLAGS -O0"]], [], [[$FLAG_WERROR]]) - if [[[ "$use_debug" == "yes" ]]]; then + if test x"$use_debug" = x"yes"; then dnl Prefer -g3, fall back to -g if that is unavailable. AX_CHECK_COMPILE_FLAG( [-g3], @@ -220,7 +220,11 @@ case $host in GMP_LDFLAGS="-L$gmp_prefix/lib" fi fi - ;; + ;; + *freebsd*) + GMP_CPPFLAGS="-I/usr/local/include" + GMP_LDFLAGS="-L/usr/local/lib" + ;; esac if test x"$want_backend" = x"auto"; then @@ -432,44 +436,74 @@ fi use_pkgconfig=yes -if [[[ "$host_cpu" == x86_64 && "$use_optimizations" == "yes" ]]]; then - dnl Support for AMD64 (also known as x86_64 on some platforms) processors - CPU_ARCH="x64" - AC_DEFINE([ARCH], [X64], [Architecture.]) - AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) -elif [[[ "$host_cpu" == aarch* && "$use_optimizations" == "yes" ]]]; then - dnl Support for 64-bit ARM processors - dnl Relic doesn't support aarch64 yet, set CPU_ARCH to none and ARCH to RELIC_NONE. - CPU_ARCH="none" - AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) - AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) -elif [[[ "$host_cpu" == i?86 && "$use_optimizations" == "yes" ]]]; then - dnl Support for Intel x86 processors - CPU_ARCH="x86" - AC_DEFINE([ARCH], [X86], [Architecture.]) - AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) -elif [[[ "$host_cpu" == arm* && "$use_optimizations" == "yes" ]]]; then - dnl Support for 32-bit native ARM processors - CPU_ARCH="arm" - AC_DEFINE([ARCH], [ARM], [Architecture.]) - AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) -elif [[[ "$host_cpu" == *64* ]]]; then - dnl Support for an undefined 64-bit architecture - CPU_ARCH="none" - AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) - AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) -elif [[[ "$host_cpu" == *32* || "$host_cpu" == arm* || "$host_cpu" == i?86 ]]]; then - dnl Support for an undefined 32-bit architecture - CPU_ARCH="none" - AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) - AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) +if test x"$use_optimizations" = x"yes"; then + case $host_cpu in + amd64 | x86_64) + dnl Support for AMD64 (also known as x86_64 on some platforms) processors + CPU_ARCH="x64" + AC_DEFINE([ARCH], [X64], [Architecture.]) + AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) + ;; + aarch*) + dnl Support for 64-bit ARM processors + dnl Relic does not support aarch64 yet, set CPU_ARCH to none and ARCH to RELIC_NONE. + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) + ;; + i?86) + dnl Support for Intel x86 processors + CPU_ARCH="x86" + AC_DEFINE([ARCH], [X86], [Architecture.]) + AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) + ;; + arm*) + dnl Support for 32-bit native ARM processors + CPU_ARCH="arm" + AC_DEFINE([ARCH], [ARM], [Architecture.]) + AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) + ;; + *64*) + dnl Support for an undefined 64-bit architecture + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) + ;; + *32*) + dnl Support for an undefined 32-bit architecture + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) + ;; + *) + AC_MSG_ERROR([Unable to determine host architecture, may not be supported!]) + ;; + esac else - AC_MSG_ERROR([Unable to determine host architecture, may not be supported!]) + case $host_cpu in + *64*) + dnl Support for an undefined 64-bit architecture + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [64], [Size of word in this architecture.]) + ;; + *32* | arm* | i?86) + dnl Support for an undefined 32-bit architecture + CPU_ARCH="none" + AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.]) + AC_DEFINE([WSIZE], [32], [Size of word in this architecture.]) + ;; + *) + AC_MSG_ERROR([Unable to determine host architecture, may not be supported!]) + ;; + esac fi case $host in *darwin*) AC_DEFINE([OPSYS], [MACOSX], [Detected operation system.]) + TARGET_OS=darwin + AC_PATH_PROG([BREW],brew,) if test x$BREW = x; then AC_PATH_PROG([PORT],port,) @@ -482,8 +516,10 @@ case $host in fi ;; *mingw*) - use_pkgconfig=no AC_DEFINE([OPSYS], [WINDOWS], [Detected operation system.]) + TARGET_OS=windows + + use_pkgconfig=no LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static" dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against. @@ -496,16 +532,21 @@ case $host in ;; *linux*) AC_DEFINE([OPSYS], [LINUX], [Detected operation system.]) + TARGET_OS=linux + RELIC_CPPFLAGS="-D_GNU_SOURCE" ;; *android*) AC_DEFINE([OPSYS], [DROID], [Detected operation system.]) + TARGET_OS=android ;; *freebsd*) AC_DEFINE([OPSYS], [FREEBSD], [Detected operation system.]) + TARGET_OS=freebsd ;; *netbsd*) AC_DEFINE([OPSYS], [NETBSD], [Detected operation system.]) + TARGET_OS=netbsd ;; *) AC_DEFINE([OPSYS], [RELIC_NONE], [Detected operation system.]) @@ -555,7 +596,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])], CFLAGS="$saved_CFLAGS" ]) -if [[[ "$CFLAGS_overridden" == "no" && "$CXXFLAGS_overridden" == "no" ]]]; then +if test x"$CFLAGS_overridden" = x"no" -a x"$CXXFLAGS_overridden" = x"no"; then dnl Enable warnings AX_CHECK_COMPILE_FLAG([-Wall],[WARN_FLAGS="$WARN_FLAGS -Wall"], [], [[$FLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wcast-align],[WARN_FLAGS="$WARN_FLAGS -Wcast-align"], [], [[$FLAG_WERROR]]) @@ -743,7 +784,6 @@ CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO" case $host in *mingw*) - TARGET_OS=windows AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])]) AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])]) AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])]) @@ -771,15 +811,10 @@ case $host in AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"], [], []) ;; *darwin*) - TARGET_OS=darwin - AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], []) CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0" OBJCXXFLAGS="$CXXFLAGS" ;; - *linux*) - TARGET_OS=linux - ;; esac dnl These flags are specific to ld64, and may cause issues with other linkers. @@ -799,19 +834,15 @@ AC_LANG_POP([C]) AC_MSG_CHECKING([whether to build runtest]) if test x$use_tests = xyes; then AC_MSG_RESULT([yes]) - BUILD_TEST="yes" else AC_MSG_RESULT([no]) - BUILD_TEST="" fi AC_MSG_CHECKING([whether to build runbench]) if test x$use_bench = xyes; then AC_MSG_RESULT([yes]) - BUILD_BENCH="yes" else AC_MSG_RESULT([no]) - BUILD_BENCH="" fi AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"]) @@ -836,8 +867,8 @@ AM_CONDITIONAL(WITH_MPC, test 1 -eq 1) AM_CONDITIONAL(WITH_DV, test 1 -eq 1) AM_CONDITIONAL(WITH_FBX, test 1 -eq 1) -AM_CONDITIONAL([USE_TESTS], [test x$BUILD_TEST = xyes]) -AM_CONDITIONAL([USE_BENCH], [test x$BUILD_BENCH = xyes]) +AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" = x"yes"]) +AM_CONDITIONAL([USE_BENCH], [test x"$use_bench" = x"yes"]) AM_CONDITIONAL([HARDEN], [test "$use_hardening" = "yes"]) AM_CONDITIONAL([OPTIMIZE], [test "$use_optimizations" = "yes"]) @@ -874,8 +905,8 @@ echo echo "Options used to compile and link:" echo " target os = $TARGET_OS" echo " backend = $want_backend" -echo " build bench = $BUILD_BENCH" -echo " build test = $BUILD_TEST" +echo " build bench = $use_tests" +echo " build test = $use_bench" echo " use debug = $use_debug" echo " use hardening = $use_hardening" echo " use optimizations = $use_optimizations" From f25a93647b10d838a0722de4dc74304ce5dbe646 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:06:30 +0000 Subject: [PATCH 3/3] build: stop tracking cmake dependency relic_conf.h.in --- .../depends/relic/include/relic_conf.h.in | 717 ------------------ 1 file changed, 717 deletions(-) delete mode 100644 src/dashbls/depends/relic/include/relic_conf.h.in diff --git a/src/dashbls/depends/relic/include/relic_conf.h.in b/src/dashbls/depends/relic/include/relic_conf.h.in deleted file mode 100644 index 7db6f5b509..0000000000 --- a/src/dashbls/depends/relic/include/relic_conf.h.in +++ /dev/null @@ -1,717 +0,0 @@ -/* - * RELIC is an Efficient LIbrary for Cryptography - * Copyright (c) 2009 RELIC Authors - * - * This file is part of RELIC. RELIC is legal property of its developers, - * whose names are not listed here. Please refer to the COPYRIGHT file - * for contact information. - * - * RELIC is free software; you can redistribute it and/or modify it under the - * terms of the version 2.1 (or later) of the GNU Lesser General Public License - * as published by the Free Software Foundation; or version 2.0 of the Apache - * License as published by the Apache Software Foundation. See the LICENSE files - * for more details. - * - * RELIC is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the LICENSE files for more details. - * - * You should have received a copy of the GNU Lesser General Public or the - * Apache License along with RELIC. If not, see - * or . - */ - -/** - * @file - * - * Project configuration. - * - * @version $Id: relic_conf.h.in 45 2009-07-04 23:45:48Z dfaranha $ - * @ingroup relic - */ - -#ifndef RLC_CONF_H -#define RLC_CONF_H - -/** Project version. */ -#define RLC_VERSION "@VERSION@" - -/** Debugging support. */ -#cmakedefine DEBUG -/** Profiling support. */ -#cmakedefine PROFL -/** Error handling support. */ -#cmakedefine CHECK -/** Verbose error messages. */ -#cmakedefine VERBS -/** Build with overhead estimation. */ -#cmakedefine OVERH -/** Build documentation. */ -#cmakedefine DOCUM -/** Build only the selected algorithms. */ -#cmakedefine STRIP -/** Build with printing disabled. */ -#cmakedefine QUIET -/** Build with colored output. */ -#cmakedefine COLOR -/** Build with big-endian support. */ -#cmakedefine BIGED -/** Build shared library. */ -#cmakedefine SHLIB -/** Build static library. */ -#cmakedefine STLIB - -/** Number of times each test is ran. */ -#define TESTS @TESTS@ -/** Number of times each benchmark is ran. */ -#define BENCH @BENCH@ -/** Number of available cores. */ -#define CORES @CORES@ - -/** Atmel AVR ATMega128 8-bit architecture. */ -#define AVR 1 -/** MSP430 16-bit architecture. */ -#define MSP 2 -/** ARM 32-bit architecture. */ -#define ARM 3 -/** Intel x86-compatible 32-bit architecture. */ -#define X86 4 -/** AMD64-compatible 64-bit architecture. */ -#define X64 5 -/** Architecture. */ -#cmakedefine ARCH @ARCH@ - -/** Size of word in this architecture. */ -#define WSIZE @WSIZE@ - -/** Byte boundary to align digit vectors. */ -#define ALIGN @ALIGN@ - -/** Build multiple precision integer module. */ -#cmakedefine WITH_BN -/** Build prime field module. */ -#cmakedefine WITH_FP -/** Build prime field extension module. */ -#cmakedefine WITH_FPX -/** Build binary field module. */ -#cmakedefine WITH_FB -/** Build prime elliptic curve module. */ -#cmakedefine WITH_EP -/** Build prime field extension elliptic curve module. */ -#cmakedefine WITH_EPX -/** Build binary elliptic curve module. */ -#cmakedefine WITH_EB -/** Build elliptic Edwards curve module. */ -#cmakedefine WITH_ED -/** Build elliptic curve cryptography module. */ -#cmakedefine WITH_EC -/** Build pairings over prime curves module. */ -#cmakedefine WITH_PP -/** Build pairing-based cryptography module. */ -#cmakedefine WITH_PC -/** Build block ciphers. */ -#cmakedefine WITH_BC -/** Build hash functions. */ -#cmakedefine WITH_MD -/** Build cryptographic protocols. */ -#cmakedefine WITH_CP -/** Build Multi-party computation primitives. */ -#cmakedefine WITH_MPC - -/** Easy C-only backend. */ -#define EASY 1 -/** GMP backend. */ -#define GMP 2 -/** GMP constant-time backend. */ -#define GMP_SEC 3 -/** Arithmetic backend. */ -#define ARITH @ARITH@ - -/** Required precision in bits. */ -#define BN_PRECI @BN_PRECI@ -/** A multiple precision integer can store w words. */ -#define SINGLE 0 -/** A multiple precision integer can store the result of an addition. */ -#define CARRY 1 -/** A multiple precision integer can store the result of a multiplication. */ -#define DOUBLE 2 -/** Effective size of a multiple precision integer. */ -#define BN_MAGNI @BN_MAGNI@ -/** Number of Karatsuba steps. */ -#define BN_KARAT @BN_KARAT@ - -/** Schoolbook multiplication. */ -#define BASIC 1 -/** Comba multiplication. */ -#define COMBA 2 -/** Chosen multiple precision multiplication method. */ -#define BN_MUL @BN_MUL@ - -/** Schoolbook squaring. */ -#define BASIC 1 -/** Comba squaring. */ -#define COMBA 2 -/** Reuse multiplication for squaring. */ -#define MULTP 4 -/** Chosen multiple precision multiplication method. */ -#define BN_SQR @BN_SQR@ - -/** Division modular reduction. */ -#define BASIC 1 -/** Barrett modular reduction. */ -#define BARRT 2 -/** Montgomery modular reduction. */ -#define MONTY 3 -/** Pseudo-Mersenne modular reduction. */ -#define PMERS 4 -/** Chosen multiple precision modular reduction method. */ -#define BN_MOD @BN_MOD@ - -/** Binary modular exponentiation. */ -#define BASIC 1 -/** Sliding window modular exponentiation. */ -#define SLIDE 2 -/** Montgomery powering ladder. */ -#define MONTY 3 -/** Chosen multiple precision modular exponentiation method. */ -#define BN_MXP @BN_MXP@ - -/** Basic Euclidean GCD Algorithm. */ -#define BASIC 1 -/** Lehmer's fast GCD Algorithm. */ -#define LEHME 2 -/** Stein's binary GCD Algorithm. */ -#define STEIN 3 -/** Chosen multiple precision greatest common divisor method. */ -#define BN_GCD @BN_GCD@ - -/** Basic prime generation. */ -#define BASIC 1 -/** Safe prime generation. */ -#define SAFEP 2 -/** Strong prime generation. */ -#define STRON 3 -/** Chosen prime generation algorithm. */ -#define BN_GEN @BN_GEN@ - -/** Multiple precision arithmetic method */ -#define BN_METHD "@BN_METHD@" - -/** Prime field size in bits. */ -#define FP_PRIME @FP_PRIME@ -/** Number of Karatsuba steps. */ -#define FP_KARAT @FP_KARAT@ -/** Prefer Pseudo-Mersenne primes over random primes. */ -#cmakedefine FP_PMERS -/** Use -1 as quadratic non-residue. */ -#cmakedefine FP_QNRES -/** Width of window processing for exponentiation methods. */ -#define FP_WIDTH @FP_WIDTH@ - -/** Schoolbook addition. */ -#define BASIC 1 -/** Integrated modular addtion. */ -#define INTEG 3 -/** Chosen prime field multiplication method. */ -#define FP_ADD @FP_ADD@ - -/** Schoolbook multiplication. */ -#define BASIC 1 -/** Comba multiplication. */ -#define COMBA 2 -/** Integrated modular multiplication. */ -#define INTEG 3 -/** Chosen prime field multiplication method. */ -#define FP_MUL @FP_MUL@ - -/** Schoolbook squaring. */ -#define BASIC 1 -/** Comba squaring. */ -#define COMBA 2 -/** Integrated modular squaring. */ -#define INTEG 3 -/** Reuse multiplication for squaring. */ -#define MULTP 4 -/** Chosen prime field multiplication method. */ -#define FP_SQR @FP_SQR@ - -/** Division-based reduction. */ -#define BASIC 1 -/** Fast reduction modulo special form prime. */ -#define QUICK 2 -/** Montgomery modular reduction. */ -#define MONTY 3 -/** Chosen prime field reduction method. */ -#define FP_RDC @FP_RDC@ - -/** Inversion by Fermat's Little Theorem. */ -#define BASIC 1 -/** Binary inversion. */ -#define BINAR 2 -/** Integrated modular multiplication. */ -#define MONTY 3 -/** Extended Euclidean algorithm. */ -#define EXGCD 4 -/** Constant-time inversion by Bernstein-Yang division steps. */ -#define DIVST 5 -/** Use implementation provided by the lower layer. */ -#define LOWER 8 -/** Chosen prime field inversion method. */ -#define FP_INV @FP_INV@ - -/** Binary modular exponentiation. */ -#define BASIC 1 -/** Sliding window modular exponentiation. */ -#define SLIDE 2 -/** Constant-time Montgomery powering ladder. */ -#define MONTY 3 -/** Chosen multiple precision modular exponentiation method. */ -#define FP_EXP @FP_EXP@ - -/** Prime field arithmetic method */ -#define FP_METHD "@FP_METHD@" - -/** Basic quadratic extension field arithmetic. */ -#define BASIC 1 -/** Integrated extension field arithmetic. */ -#define INTEG 3 -/* Chosen extension field arithmetic method. */ -#define FPX_QDR @FPX_QDR@ - -/** Basic cubic extension field arithmetic. */ -#define BASIC 1 -/** Integrated extension field arithmetic. */ -#define INTEG 3 -/* Chosen extension field arithmetic method. */ -#define FPX_CBC @FPX_CBC@ - -/** Basic quadratic extension field arithmetic. */ -#define BASIC 1 -/** Lazy-reduced extension field arithmetic. */ -#define LAZYR 2 -/* Chosen extension field arithmetic method. */ -#define FPX_RDC @FPX_RDC@ - -/** Prime extension field arithmetic method */ -#define FPX_METHD "@FPX_METHD@" - -/** Irreducible polynomial size in bits. */ -#define FB_POLYN @FB_POLYN@ -/** Number of Karatsuba steps. */ -#define FB_KARAT @FB_KARAT@ -/** Prefer trinomials over pentanomials. */ -#cmakedefine FB_TRINO -/** Prefer square-root friendly polynomials. */ -#cmakedefine FB_SQRTF -/** Precompute multiplication table for sqrt(z). */ -#cmakedefine FB_PRECO -/** Width of window processing for exponentiation methods. */ -#define FB_WIDTH @FB_WIDTH@ - -/** Shift-and-add multiplication. */ -#define BASIC 1 -/** Lopez-Dahab multiplication. */ -#define LODAH 2 -/** Integrated modular multiplication. */ -#define INTEG 3 -/** Chosen binary field multiplication method. */ -#define FB_MUL @FB_MUL@ - -/** Basic squaring. */ -#define BASIC 1 -/** Table-based squaring. */ -#define QUICK 2 -/** Integrated modular squaring. */ -#define INTEG 3 -/** Chosen binary field squaring method. */ -#define FB_SQR @FB_SQR@ - -/** Shift-and-add modular reduction. */ -#define BASIC 1 -/** Fast reduction modulo a trinomial or pentanomial. */ -#define QUICK 2 -/** Chosen binary field modular reduction method. */ -#define FB_RDC @FB_RDC@ - -/** Square root by repeated squaring. */ -#define BASIC 1 -/** Fast square root extraction. */ -#define QUICK 2 -/** Chosen binary field modular reduction method. */ -#define FB_SRT @FB_SRT@ - -/** Trace by repeated squaring. */ -#define BASIC 1 -/** Fast trace computation. */ -#define QUICK 2 -/** Chosen trace computation method. */ -#define FB_TRC @FB_TRC@ - -/** Solve by half-trace computation. */ -#define BASIC 1 -/** Solve with precomputed half-traces. */ -#define QUICK 2 -/** Chosen method to solve a quadratic equation. */ -#define FB_SLV @FB_SLV@ - -/** Inversion by Fermat's Little Theorem. */ -#define BASIC 1 -/** Binary inversion. */ -#define BINAR 2 -/** Almost inverse algorithm. */ -#define ALMOS 3 -/** Extended Euclidean algorithm. */ -#define EXGCD 4 -/** Itoh-Tsuji inversion. */ -#define ITOHT 5 -/** Hardware-friendly inversion by Brunner-Curiger-Hofstetter.*/ -#define BRUCH 6 -/** Constant-time version of almost inverse. */ -#define CTAIA 7 -/** Use implementation provided by the lower layer. */ -#define LOWER 8 -/** Chosen binary field inversion method. */ -#define FB_INV @FB_INV@ - -/** Binary modular exponentiation. */ -#define BASIC 1 -/** Sliding window modular exponentiation. */ -#define SLIDE 2 -/** Constant-time Montgomery powering ladder. */ -#define MONTY 3 -/** Chosen multiple precision modular exponentiation method. */ -#define FB_EXP @FB_EXP@ - -/** Iterated squaring/square-root by consecutive squaring/square-root. */ -#define BASIC 1 -/** Iterated squaring/square-root by table-based method. */ -#define QUICK 2 -/** Chosen method to solve a quadratic equation. */ -#define FB_ITR @FB_ITR@ - -/** Binary field arithmetic method */ -#define FB_METHD "@FB_METHD@" - -/** Support for ordinary curves. */ -#cmakedefine EP_PLAIN -/** Support for supersingular curves. */ -#cmakedefine EP_SUPER -/** Support for prime curves with efficient endormorphisms. */ -#cmakedefine EP_ENDOM -/** Use mixed coordinates. */ -#cmakedefine EP_MIXED -/** Build precomputation table for generator. */ -#cmakedefine EP_PRECO -/** Enable isogeny map for SSWU map-to-curve. */ -#cmakedefine EP_CTMAP -/** Width of precomputation table for fixed point methods. */ -#define EP_DEPTH @EP_DEPTH@ -/** Width of window processing for unknown point methods. */ -#define EP_WIDTH @EP_WIDTH@ - -/** Affine coordinates. */ -#define BASIC 1 -/** Projective coordinates. */ -#define PROJC 2 -/** Jacobian coordinates. */ -#define JACOB 3 -/** Chosen prime elliptic curve coordinate method. */ -#define EP_ADD @EP_ADD@ - -/** Binary point multiplication. */ -#define BASIC 1 -/** Sliding window. */ -#define SLIDE 2 -/** Montgomery powering ladder. */ -#define MONTY 3 -/** Left-to-right Width-w NAF. */ -#define LWNAF 4 -/** Left-to-right Width-w NAF. */ -#define LWREG 5 -/** Chosen prime elliptic curve point multiplication method. */ -#define EP_MUL @EP_MUL@ - -/** Binary point multiplication. */ -#define BASIC 1 -/** Single-table comb method. */ -#define COMBS 2 -/** Double-table comb method. */ -#define COMBD 3 -/** Left-to-right Width-w NAF. */ -#define LWNAF 4 -/** Chosen prime elliptic curve point multiplication method. */ -#define EP_FIX @EP_FIX@ - -/** Basic simultaneouns point multiplication. */ -#define BASIC 1 -/** Shamir's trick. */ -#define TRICK 2 -/** Interleaving of w-(T)NAFs. */ -#define INTER 3 -/** Joint sparse form. */ -#define JOINT 4 -/** Chosen prime elliptic curve simulteanous point multiplication method. */ -#define EP_SIM @EP_SIM@ - -/** Prime elliptic curve arithmetic method. */ -#define EP_METHD "@EP_METHD@" - -/** Support for ordinary curves without endormorphisms. */ -#cmakedefine EB_PLAIN -/** Support for Koblitz anomalous binary curves. */ -#cmakedefine EB_KBLTZ -/** Use mixed coordinates. */ -#cmakedefine EB_MIXED -/** Build precomputation table for generator. */ -#cmakedefine EB_PRECO -/** Width of precomputation table for fixed point methods. */ -#define EB_DEPTH @EB_DEPTH@ -/** Width of window processing for unknown point methods. */ -#define EB_WIDTH @EB_WIDTH@ - -/** Binary elliptic curve arithmetic method. */ -#define EB_METHD "@EB_METHD@" - -/** Affine coordinates. */ -#define BASIC 1 -/** López-Dahab Projective coordinates. */ -#define PROJC 2 -/** Chosen binary elliptic curve coordinate method. */ -#define EB_ADD @EB_ADD@ - -/** Binary point multiplication. */ -#define BASIC 1 -/** L�pez-Dahab point multiplication. */ -#define LODAH 2 -/** Halving. */ -#define HALVE 3 -/** Left-to-right width-w (T)NAF. */ -#define LWNAF 4 -/** Right-to-left width-w (T)NAF. */ -#define RWNAF 5 -/** Chosen binary elliptic curve point multiplication method. */ -#define EB_MUL @EB_MUL@ - -/** Binary point multiplication. */ -#define BASIC 1 -/** Single-table comb method. */ -#define COMBS 2 -/** Double-table comb method. */ -#define COMBD 3 -/** Left-to-right Width-w NAF. */ -#define LWNAF 4 -/** Chosen binary elliptic curve point multiplication method. */ -#define EB_FIX @EB_FIX@ - -/** Basic simultaneouns point multiplication. */ -#define BASIC 1 -/** Shamir's trick. */ -#define TRICK 2 -/** Interleaving of w-(T)NAFs. */ -#define INTER 3 -/** Joint sparse form. */ -#define JOINT 4 -/** Chosen binary elliptic curve simulteanous point multiplication method. */ -#define EB_SIM @EB_SIM@ - -/** Build precomputation table for generator. */ -#cmakedefine ED_PRECO -/** Width of precomputation table for fixed point methods. */ -#define ED_DEPTH @ED_DEPTH@ -/** Width of window processing for unknown point methods. */ -#define ED_WIDTH @ED_WIDTH@ - -/** Edwards elliptic curve arithmetic method. */ -#define ED_METHD "@ED_METHD@" - -/** Affine coordinates. */ -#define BASIC 1 -/** Simple projective twisted Edwards coordinates */ -#define PROJC 2 -/** Extended projective twisted Edwards coordinates */ -#define EXTND 3 -/** Chosen binary elliptic curve coordinate method. */ -#define ED_ADD @ED_ADD@ - -/** Binary point multiplication. */ -#define BASIC 1 -/** Sliding window. */ -#define SLIDE 2 -/** Montgomery powering ladder. */ -#define MONTY 3 -/** Left-to-right Width-w NAF. */ -#define LWNAF 4 -/** Left-to-right Width-w NAF. */ -#define LWREG 5 -/** Chosen prime elliptic twisted Edwards curve point multiplication method. */ -#define ED_MUL @ED_MUL@ - -/** Binary point multiplication. */ -#define BASIC 1 -/** Single-table comb method. */ -#define COMBS 2 -/** Double-table comb method. */ -#define COMBD 3 -/** Left-to-right Width-w NAF. */ -#define LWNAF 4 -/** Chosen prime elliptic twisted Edwards curve point multiplication method. */ -#define ED_FIX @ED_FIX@ - -/** Basic simultaneouns point multiplication. */ -#define BASIC 1 -/** Shamir's trick. */ -#define TRICK 2 -/** Interleaving of w-(T)NAFs. */ -#define INTER 3 -/** Joint sparse form. */ -#define JOINT 4 -/** Chosen prime elliptic curve simulteanous point multiplication method. */ -#define ED_SIM @ED_SIM@ - -/** Prime curves. */ -#define PRIME 1 -/** Binary curves. */ -#define CHAR2 2 -/** Edwards curves */ -#define EDDIE 3 -/** Chosen elliptic curve type. */ -#define EC_CUR @EC_CUR@ - -/** Chosen elliptic curve cryptography method. */ -#define EC_METHD "@EC_METHD@" -/** Prefer curves with efficient endomorphisms. */ -#cmakedefine EC_ENDOM - -/** Basic quadratic extension field arithmetic. */ -#define BASIC 1 -/** Lazy-reduced extension field arithmetic. */ -#define LAZYR 2 -/* Chosen extension field arithmetic method. */ -#define PP_EXT @PP_EXT@ - -/** Bilinear pairing method. */ -#define PP_METHD "@PP_METHD@" - -/** Tate pairing. */ -#define TATEP 1 -/** Weil pairing. */ -#define WEILP 2 -/** Optimal ate pairing. */ -#define OATEP 3 -/** Chosen pairing method over prime elliptic curves. */ -#define PP_MAP @PP_MAP@ - -/** SHA-224 hash function. */ -#define SH224 2 -/** SHA-256 hash function. */ -#define SH256 3 -/** SHA-384 hash function. */ -#define SH384 4 -/** SHA-512 hash function. */ -#define SH512 5 -/** BLAKE2s-160 hash function. */ -#define B2S160 6 -/** BLAKE2s-256 hash function. */ -#define B2S256 7 -/** Chosen hash function. */ -#define MD_MAP @MD_MAP@ - -/** Choice of hash function. */ -#define MD_METHD "@MD_METHD@" - -/** Chosen RSA method. */ -#cmakedefine CP_CRT -/** RSA without padding. */ -#define BASIC 1 -/** RSA PKCS#1 v1.5 padding. */ -#define PKCS1 2 -/** RSA PKCS#1 v2.1 padding. */ -#define PKCS2 3 -/** Chosen RSA padding method. */ -#define CP_RSAPD @CP_RSAPD@ - -/** Automatic memory allocation. */ -#define AUTO 1 -/** Dynamic memory allocation. */ -#define DYNAMIC 2 -/** Chosen memory allocation policy. */ -#define ALLOC @ALLOC@ - -/** NIST HASH-DRBG generator. */ -#define HASHD 1 -/** Intel RdRand instruction. */ -#define RDRND 2 -/** Operating system underlying generator. */ -#define UDEV 3 -/** Override library generator with the callback. */ -#define CALL 4 -/** Chosen random generator. */ -#define RAND @RAND@ - -/** Standard C library generator. */ -#define LIBC 1 -/** Intel RdRand instruction. */ -#define RDRND 2 -/** Device node generator. */ -#define UDEV 3 -/** Use Windows' CryptGenRandom. */ -#define WCGR 4 -/** Chosen random generator seeder. */ -#cmakedefine SEED @SEED@ - -/** GNU/Linux operating system. */ -#define LINUX 1 -/** FreeBSD operating system. */ -#define FREEBSD 2 -/** Windows operating system. */ -#define MACOSX 3 -/** Windows operating system. */ -#define WINDOWS 4 -/** Android operating system. */ -#define DROID 5 -/** Arduino platform. */ -#define DUINO 6 -/** OpenBSD operating system. */ -#define OPENBSD 7 -/** Detected operation system. */ -#cmakedefine OPSYS @OPSYS@ - -/** OpenMP multithreading support. */ -#define OPENMP 1 -/** POSIX multithreading support. */ -#define PTHREAD 2 -/** Chosen multithreading API. */ -#cmakedefine MULTI @MULTI@ - -/** Per-process high-resolution timer. */ -#define HREAL 1 -/** Per-process high-resolution timer. */ -#define HPROC 2 -/** Per-thread high-resolution timer. */ -#define HTHRD 3 -/** POSIX-compatible timer. */ -#define POSIX 4 -/** ANSI-compatible timer. */ -#define ANSI 5 -/** Cycle-counting timer. */ -#define CYCLE 6 -/** Performance monitoring framework. */ -#define PERF 7 -/** Chosen timer. */ -#cmakedefine TIMER @TIMER@ - -/** Prefix to identity this build of the library. */ -#cmakedefine LABEL @LABEL@ - -#ifndef ASM - -#include "relic_label.h" - -/** - * Prints the project options selected at build time. - */ -void conf_print(void); - -#endif /* ASM */ - -#endif /* !RLC_CONF_H */