Merge pull request #215 from rust-bitcoin/real-or-random-patch-1

Define ECMULT_GEN_PREC_BITS
This commit is contained in:
Andrew Poelstra 2020-08-26 17:46:39 +00:00 committed by GitHub
commit 89541ec4b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -52,11 +52,12 @@ fn main() {
.include("depend/secp256k1/src")
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
.define("SECP256K1_BUILD", Some("1"))
.define("ENABLE_MODULE_ECDH", Some("1"))
.define("ECMULT_GEN_PREC_BITS", Some("4"))
// TODO these three should be changed to use libgmp, at least until secp PR 290 is merged
.define("USE_NUM_NONE", Some("1"))
.define("USE_FIELD_INV_BUILTIN", Some("1"))
.define("USE_SCALAR_INV_BUILTIN", Some("1"))
.define("ENABLE_MODULE_ECDH", Some("1"));
.define("USE_SCALAR_INV_BUILTIN", Some("1"));
if cfg!(feature = "lowmemory") {
base_config.define("ECMULT_WINDOW_SIZE", Some("4")); // A low-enough value to consume neglible memory