csecp256k1

Haskell FFI bindings to bitcoin-core/secp256k1 (docs.ppad.tech/csecp256k1).
git clone git://git.ppad.tech/csecp256k1.git
Log | Files | Refs | README | LICENSE

precomputed_ecmult.h (1635B)


      1 /*****************************************************************************************************
      2  * Copyright (c) 2013, 2014, 2017, 2021 Pieter Wuille, Andrew Poelstra, Jonas Nick, Russell O'Connor *
      3  * Distributed under the MIT software license, see the accompanying                                  *
      4  * file COPYING or https://www.opensource.org/licenses/mit-license.php.                              *
      5  *****************************************************************************************************/
      6 
      7 #ifndef SECP256K1_PRECOMPUTED_ECMULT_H
      8 #define SECP256K1_PRECOMPUTED_ECMULT_H
      9 
     10 #ifdef __cplusplus
     11 extern "C" {
     12 #endif
     13 
     14 #include "ecmult.h"
     15 #include "group.h"
     16 #if defined(EXHAUSTIVE_TEST_ORDER)
     17 #    if EXHAUSTIVE_TEST_ORDER == 7
     18 #        define WINDOW_G 3
     19 #    elif EXHAUSTIVE_TEST_ORDER == 13
     20 #        define WINDOW_G 4
     21 #    elif EXHAUSTIVE_TEST_ORDER == 199
     22 #        define WINDOW_G 8
     23 #    else
     24 #        error No known generator for the specified exhaustive test group order.
     25 #    endif
     26 static haskellsecp256k1_v0_1_0_ge_storage haskellsecp256k1_v0_1_0_pre_g[ECMULT_TABLE_SIZE(WINDOW_G)];
     27 static haskellsecp256k1_v0_1_0_ge_storage haskellsecp256k1_v0_1_0_pre_g_128[ECMULT_TABLE_SIZE(WINDOW_G)];
     28 #else /* !defined(EXHAUSTIVE_TEST_ORDER) */
     29 #    define WINDOW_G ECMULT_WINDOW_SIZE
     30 extern const haskellsecp256k1_v0_1_0_ge_storage haskellsecp256k1_v0_1_0_pre_g[ECMULT_TABLE_SIZE(WINDOW_G)];
     31 extern const haskellsecp256k1_v0_1_0_ge_storage haskellsecp256k1_v0_1_0_pre_g_128[ECMULT_TABLE_SIZE(WINDOW_G)];
     32 #endif /* defined(EXHAUSTIVE_TEST_ORDER) */
     33 
     34 #ifdef __cplusplus
     35 }
     36 #endif
     37 
     38 #endif /* SECP256K1_PRECOMPUTED_ECMULT_H */