Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
ecmult.h
Go to the documentation of this file.
1
/***********************************************************************
2
* Copyright (c) 2013, 2014, 2017 Pieter Wuille, Andrew Poelstra *
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_ECMULT_H
8
#define SECP256K1_ECMULT_H
9
10
#include "
group.h
"
11
#include "
scalar.h
"
12
#include "
scratch.h
"
13
14
/* Noone will ever need more than a window size of 24. The code might
15
* be correct for larger values of ECMULT_WINDOW_SIZE but this is not
16
* tested.
17
*
18
* The following limitations are known, and there are probably more:
19
* If WINDOW_G > 27 and size_t has 32 bits, then the code is incorrect
20
* because the size of the memory object that we allocate (in bytes)
21
* will not fit in a size_t.
22
* If WINDOW_G > 31 and int has 32 bits, then the code is incorrect
23
* because certain expressions will overflow.
24
*/
25
#if ECMULT_WINDOW_SIZE < 2 || ECMULT_WINDOW_SIZE > 24
26
# error Set ECMULT_WINDOW_SIZE to an integer in range [2..24].
27
#endif
28
30
#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
31
33
static
void
secp256k1_ecmult(
secp256k1_gej
*
r
,
const
secp256k1_gej
*
a
,
const
secp256k1_scalar
*na,
const
secp256k1_scalar
*ng);
34
35
typedef
int (
secp256k1_ecmult_multi_callback
)(
secp256k1_scalar
*sc,
secp256k1_ge
*pt,
size_t
idx,
void
*data);
36
48
static
int
secp256k1_ecmult_multi_var(
const
secp256k1_callback
* error_callback,
secp256k1_scratch
*scratch,
secp256k1_gej
*
r
,
const
secp256k1_scalar
*inp_g_sc,
secp256k1_ecmult_multi_callback
cb,
void
*cbdata,
size_t
n);
49
50
#endif
/* SECP256K1_ECMULT_H */
r
const mie::Vuint & r
Definition
bn.cpp:28
secp256k1_ecmult_multi_callback
int secp256k1_ecmult_multi_callback(secp256k1_scalar *sc, secp256k1_ge *pt, size_t idx, void *data)
Definition
ecmult.h:35
group.h
a
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition
pointer.h:1181
scalar.h
scratch.h
secp256k1_callback
Definition
util.h:19
secp256k1_ge
Definition
group.h:16
secp256k1_gej
Definition
group.h:28
secp256k1_scalar
Definition
scalar_4x64.h:13
secp256k1_scratch_space_struct
Definition
scratch.h:12
libraries
fc
secp256k1
secp256k1
src
ecmult.h
Generated by
1.12.0