From 257fd5ef9ef801c5d37bf7b486dafb55d1d0655e Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Tue, 17 Dec 2024 04:28:10 +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 efd5c566da0990e374c4a7c86afce9421a117aa3 Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Tue, 17 Dec 2024 04:29:16 +0000
Subject: [PATCH 2/3] Squashed 'src/dashbls/' changes from
7e747e8a07..0bb5c5b032
0bb5c5b032 Merge pull request #107 from kwvg/bump_1.3.5
3170e82074 Merge pull request #106 from UdjinM6/bench_chore
6091f5c056 chore: bump version to 1.3.5
90fd986fa5 chore: drop irrelevant PopSchemeMPL benchmark
ba391e681e bench: use BasicSchemeMPL instead of AugSchemeMPL
bcc6cf9cda bench: add benchmars for Serialize/SerializeToArray
cc649f38ee feat: serialize on the stack (#75)
git-subtree-dir: src/dashbls
git-subtree-split: 0bb5c5b03249c463debb5cef5f7e52ee66f3aaab
---
configure.ac | 2 +-
include/dashbls/elements.hpp | 3 ++
include/dashbls/privatekey.hpp | 1 +
src/elements.cpp | 28 ++++++++--
src/privatekey.cpp | 7 +++
src/test-bench.cpp | 95 +++++++++++++++++++++-------------
6 files changed, 94 insertions(+), 42 deletions(-)
diff --git a/configure.ac b/configure.ac
index df411ced0c..815a015b03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
-AC_INIT([libdashbls],[1.3.4])
+AC_INIT([libdashbls],[1.3.5])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4])
diff --git a/include/dashbls/elements.hpp b/include/dashbls/elements.hpp
index 6832b31f3a..95937f62db 100644
--- a/include/dashbls/elements.hpp
+++ b/include/dashbls/elements.hpp
@@ -59,6 +59,7 @@ public:
GTElement Pair(const G2Element &b) const;
uint32_t GetFingerprint(bool fLegacy = false) const;
std::vector Serialize(bool fLegacy = false) const;
+ std::array SerializeToArray(bool fLegacy = false) const;
G1Element Copy();
friend bool operator==(const G1Element &a, const G1Element &b);
@@ -102,6 +103,7 @@ public:
G2Element Negate() const;
GTElement Pair(const G1Element &a) const;
std::vector Serialize(bool fLegacy = false) const;
+ std::array SerializeToArray(bool fLegacy = false) const;
G2Element Copy();
friend bool operator==(G2Element const &a, G2Element const &b);
@@ -127,6 +129,7 @@ public:
void Serialize(uint8_t *buffer) const;
std::vector Serialize() const;
+ std::array SerializeToArray() const;
friend bool operator==(GTElement const &a, GTElement const &b);
friend bool operator!=(GTElement const &a, GTElement const &b);
diff --git a/include/dashbls/privatekey.hpp b/include/dashbls/privatekey.hpp
index beebbb05ab..d02a7d292c 100644
--- a/include/dashbls/privatekey.hpp
+++ b/include/dashbls/privatekey.hpp
@@ -82,6 +82,7 @@ class PrivateKey {
// Serialize the key into bytes
void Serialize(uint8_t *buffer) const;
std::vector Serialize(bool fLegacy = false) const;
+ std::array SerializeToArray(bool fLegacy = false) const;
G2Element SignG2(
const uint8_t *msg,
diff --git a/src/elements.cpp b/src/elements.cpp
index 278af8cd8f..b0c747af82 100644
--- a/src/elements.cpp
+++ b/src/elements.cpp
@@ -171,11 +171,16 @@ uint32_t G1Element::GetFingerprint(const bool fLegacy) const
}
std::vector G1Element::Serialize(const bool fLegacy) const {
+ const auto arr = G1Element::SerializeToArray(fLegacy);
+ return std::vector{arr.begin(), arr.end()};
+}
+
+std::array G1Element::SerializeToArray(const bool fLegacy) const {
uint8_t buffer[G1Element::SIZE + 1];
g1_write_bin(buffer, G1Element::SIZE + 1, p, 1);
+ std::array result{};
if (buffer[0] == 0x00) { // infinity
- std::vector result(G1Element::SIZE, 0);
result[0] = 0xc0;
return result;
}
@@ -187,7 +192,9 @@ std::vector G1Element::Serialize(const bool fLegacy) const {
if (!fLegacy) {
buffer[1] |= 0x80; // indicate compression
}
- return std::vector(buffer + 1, buffer + 1 + G1Element::SIZE);
+
+ std::copy_n(buffer + 1, G1Element::SIZE, result.begin());
+ return result;
}
bool operator==(const G1Element & a, const G1Element &b)
@@ -386,11 +393,18 @@ G2Element G2Element::Negate() const
GTElement G2Element::Pair(const G1Element& a) const { return a & (*this); }
std::vector G2Element::Serialize(const bool fLegacy) const {
+ const auto arr = G2Element::SerializeToArray(fLegacy);
+ return std::vector{arr.begin(), arr.end()};
+}
+
+std::array G2Element::SerializeToArray(const bool fLegacy) const {
uint8_t buffer[G2Element::SIZE + 1];
g2_write_bin(buffer, G2Element::SIZE + 1, (g2_st*)q, 1);
+ std::array result{};
+
if (buffer[0] == 0x00) { // infinity
- std::vector result(G2Element::SIZE, 0);
+ result.fill(0);
result[0] = 0xc0;
return result;
}
@@ -410,7 +424,6 @@ std::vector G2Element::Serialize(const bool fLegacy) const {
}
}
- std::vector result(G2Element::SIZE, 0);
if (fLegacy) {
std::memcpy(result.data(), buffer + 1, G2Element::SIZE);
} else {
@@ -551,4 +564,11 @@ std::vector GTElement::Serialize() const
return data;
}
+std::array GTElement::SerializeToArray() const
+{
+ std::array data{};
+ Serialize(data.data());
+ return data;
+}
+
} // end namespace bls
diff --git a/src/privatekey.cpp b/src/privatekey.cpp
index 865507dfc7..d4dd32d116 100644
--- a/src/privatekey.cpp
+++ b/src/privatekey.cpp
@@ -284,6 +284,13 @@ std::vector PrivateKey::Serialize(const bool fLegacy) const
return data;
}
+std::array PrivateKey::SerializeToArray(bool fLegacy) const
+{
+ std::array data{};
+ Serialize(data.data());
+ return data;
+}
+
G2Element PrivateKey::SignG2(
const uint8_t *msg,
size_t len,
diff --git a/src/test-bench.cpp b/src/test-bench.cpp
index af351821e5..20bbbb4439 100644
--- a/src/test-bench.cpp
+++ b/src/test-bench.cpp
@@ -31,21 +31,21 @@ using namespace bls;
void benchSigs() {
string testName = "Signing";
const int numIters = 5000;
- PrivateKey sk = AugSchemeMPL().KeyGen(getRandomSeed());
+ PrivateKey sk = BasicSchemeMPL().KeyGen(getRandomSeed());
vector message1 = sk.GetG1Element().Serialize();
auto start = startStopwatch();
for (int i = 0; i < numIters; i++) {
- AugSchemeMPL().Sign(sk, message1);
+ BasicSchemeMPL().Sign(sk, message1);
}
endStopwatch(testName, start, numIters);
}
void benchVerification() {
string testName = "Verification";
- const int numIters = 10000;
- PrivateKey sk = AugSchemeMPL().KeyGen(getRandomSeed());
+ const int numIters = 1000;
+ PrivateKey sk = BasicSchemeMPL().KeyGen(getRandomSeed());
G1Element pk = sk.GetG1Element();
std::vector sigs;
@@ -54,7 +54,7 @@ void benchVerification() {
uint8_t message[4];
Util::IntToFourBytes(message, i);
vector messageBytes(message, message + 4);
- sigs.push_back(AugSchemeMPL().Sign(sk, messageBytes));
+ sigs.push_back(BasicSchemeMPL().Sign(sk, messageBytes));
}
auto start = startStopwatch();
@@ -62,34 +62,36 @@ void benchVerification() {
uint8_t message[4];
Util::IntToFourBytes(message, i);
vector messageBytes(message, message + 4);
- bool ok = AugSchemeMPL().Verify(pk, messageBytes, sigs[i]);
+ bool ok = BasicSchemeMPL().Verify(pk, messageBytes, sigs[i]);
ASSERT(ok);
}
endStopwatch(testName, start, numIters);
}
void benchBatchVerification() {
- const int numIters = 100000;
+ const int numIters = 10000;
vector> sig_bytes;
vector> pk_bytes;
vector> ms;
+ auto start = startStopwatch();
for (int i = 0; i < numIters; i++) {
uint8_t message[4];
Util::IntToFourBytes(message, i);
vector messageBytes(message, message + 4);
- PrivateKey sk = AugSchemeMPL().KeyGen(getRandomSeed());
+ PrivateKey sk = BasicSchemeMPL().KeyGen(getRandomSeed());
G1Element pk = sk.GetG1Element();
- sig_bytes.push_back(AugSchemeMPL().Sign(sk, messageBytes).Serialize());
+ sig_bytes.push_back(BasicSchemeMPL().Sign(sk, messageBytes).Serialize());
pk_bytes.push_back(pk.Serialize());
ms.push_back(messageBytes);
}
+ endStopwatch("Batch verification preparation", start, numIters);
vector pks;
pks.reserve(numIters);
- auto start = startStopwatch();
+ start = startStopwatch();
for (auto const& pk : pk_bytes) {
pks.emplace_back(G1Element::FromBytes(Bytes(pk)));
}
@@ -105,52 +107,71 @@ void benchBatchVerification() {
endStopwatch("Signature validation", start, numIters);
start = startStopwatch();
- G2Element aggSig = AugSchemeMPL().Aggregate(sigs);
+ G2Element aggSig = BasicSchemeMPL().Aggregate(sigs);
endStopwatch("Aggregation", start, numIters);
start = startStopwatch();
- bool ok = AugSchemeMPL().AggregateVerify(pks, ms, aggSig);
+ bool ok = BasicSchemeMPL().AggregateVerify(pks, ms, aggSig);
ASSERT(ok);
endStopwatch("Batch verification", start, numIters);
}
-void benchFastAggregateVerification() {
- const int numIters = 5000;
-
- vector sigs;
- vector pks;
- vector message = {1, 2, 3, 4, 5, 6, 7, 8};
- vector pops;
-
- for (int i = 0; i < numIters; i++) {
- PrivateKey sk = PopSchemeMPL().KeyGen(getRandomSeed());
- G1Element pk = sk.GetG1Element();
- sigs.push_back(PopSchemeMPL().Sign(sk, message));
- pops.push_back(PopSchemeMPL().PopProve(sk));
- pks.push_back(pk);
- }
+void benchSerialize() {
+ const int numIters = 5000000;
+ PrivateKey sk = BasicSchemeMPL().KeyGen(getRandomSeed());
+ G1Element pk = sk.GetG1Element();
+ vector message = sk.GetG1Element().Serialize();
+ G2Element sig = BasicSchemeMPL().Sign(sk, message);
auto start = startStopwatch();
- G2Element aggSig = PopSchemeMPL().Aggregate(sigs);
- endStopwatch("PopScheme Aggregation", start, numIters);
-
+ for (int i = 0; i < numIters; i++) {
+ sk.Serialize();
+ }
+ endStopwatch("Serialize PrivateKey", start, numIters);
start = startStopwatch();
for (int i = 0; i < numIters; i++) {
- bool ok = PopSchemeMPL().PopVerify(pks[i], pops[i]);
- ASSERT(ok);
+ pk.Serialize();
}
- endStopwatch("PopScheme Proofs verification", start, numIters);
+ endStopwatch("Serialize G1Element", start, numIters);
start = startStopwatch();
- bool ok = PopSchemeMPL().FastAggregateVerify(pks, message, aggSig);
- ASSERT(ok);
- endStopwatch("PopScheme verification", start, numIters);
+ for (int i = 0; i < numIters; i++) {
+ sig.Serialize();
+ }
+ endStopwatch("Serialize G2Element", start, numIters);
+}
+
+void benchSerializeToArray() {
+ const int numIters = 5000000;
+ PrivateKey sk = BasicSchemeMPL().KeyGen(getRandomSeed());
+ G1Element pk = sk.GetG1Element();
+ vector message = sk.GetG1Element().Serialize();
+ G2Element sig = BasicSchemeMPL().Sign(sk, message);
+
+ auto start = startStopwatch();
+ for (int i = 0; i < numIters; i++) {
+ sk.SerializeToArray();
+ }
+ endStopwatch("SerializeToArray PrivateKey", start, numIters);
+
+ start = startStopwatch();
+ for (int i = 0; i < numIters; i++) {
+ pk.SerializeToArray();
+ }
+ endStopwatch("SerializeToArray G1Element", start, numIters);
+
+ start = startStopwatch();
+ for (int i = 0; i < numIters; i++) {
+ sig.SerializeToArray();
+ }
+ endStopwatch("SerializeToArray G2Element", start, numIters);
}
int main(int argc, char* argv[]) {
benchSigs();
benchVerification();
benchBatchVerification();
- benchFastAggregateVerification();
+ benchSerialize();
+ benchSerializeToArray();
}
From 3bbe16c390797295fd2cb4c119fde2b50928909f Mon Sep 17 00:00:00 2001
From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com>
Date: Tue, 17 Dec 2024 04:34:08 +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 */