File tree Expand file tree Collapse file tree 5 files changed +801
-0
lines changed Expand file tree Collapse file tree 5 files changed +801
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ noinst_HEADERS += src/field_5x52.h
3434noinst_HEADERS += src/field_5x52_impl.h
3535noinst_HEADERS += src/field_5x52_int128_impl.h
3636noinst_HEADERS += src/field_5x52_asm_impl.h
37+ noinst_HEADERS += src/modinv32.h
38+ noinst_HEADERS += src/modinv32_impl.h
39+ noinst_HEADERS += src/modinv64.h
40+ noinst_HEADERS += src/modinv64_impl.h
3741noinst_HEADERS += src/assumptions.h
3842noinst_HEADERS += src/util.h
3943noinst_HEADERS += src/scratch.h
Original file line number Diff line number Diff line change 1+ /***********************************************************************
2+ * Copyright (c) 2020 Peter Dettman *
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_MODINV32_H
8+ #define SECP256K1_MODINV32_H
9+
10+ #if defined HAVE_CONFIG_H
11+ #include "libsecp256k1-config.h"
12+ #endif
13+
14+ #include "util.h"
15+
16+ typedef struct {
17+ int32_t v [9 ];
18+ } secp256k1_modinv32_signed30 ;
19+
20+ typedef struct {
21+ /* The modulus in signed30 notation. */
22+ secp256k1_modinv32_signed30 modulus ;
23+
24+ /* modulus^{-1} mod 2^30 */
25+ uint32_t modulus_inv30 ;
26+ } secp256k1_modinv32_modinfo ;
27+
28+ static void secp256k1_modinv32 (secp256k1_modinv32_signed30 * x , const secp256k1_modinv32_modinfo * modinfo );
29+ static void secp256k1_modinv32_var (secp256k1_modinv32_signed30 * x , const secp256k1_modinv32_modinfo * modinfo );
30+
31+ #endif /* SECP256K1_MODINV32_H */
You can’t perform that action at this time.
0 commit comments