Raven Core
3.0.0
P2P Digital Currency
Main Page
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
z
+
Functions
b
c
d
f
g
h
i
m
o
p
q
s
v
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
f
i
k
l
m
o
p
r
s
t
v
+
Enumerations
b
c
d
e
f
m
n
o
r
s
t
u
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Properties
+
Related Functions
a
c
d
f
o
p
t
u
v
w
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
+
Variables
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
z
+
Typedefs
b
c
h
i
k
m
n
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
j
m
n
o
q
r
s
t
w
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
r
s
t
u
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
secp256k1
src
field_10x26.h
Go to the documentation of this file.
1
/**********************************************************************
2
* Copyright (c) 2013, 2014 Pieter Wuille *
3
* Distributed under the MIT software license, see the accompanying *
4
* file COPYING or http://www.opensource.org/licenses/mit-license.php.*
5
**********************************************************************/
6
7
#ifndef SECP256K1_FIELD_REPR_H
8
#define SECP256K1_FIELD_REPR_H
9
10
#include <stdint.h>
11
12
typedef
struct
{
13
/* X = sum(i=0..9, elem[i]*2^26) mod n */
14
uint32_t n[10];
15
#ifdef VERIFY
16
int
magnitude;
17
int
normalized;
18
#endif
19
}
secp256k1_fe
;
20
21
/* Unpacks a constant into a overlapping multi-limbed FE element. */
22
#define SECP256K1_FE_CONST_INNER(d7, d6, d5, d4, d3, d2, d1, d0) { \
23
(d0) & 0x3FFFFFFUL, \
24
(((uint32_t)d0) >> 26) | (((uint32_t)(d1) & 0xFFFFFUL) << 6), \
25
(((uint32_t)d1) >> 20) | (((uint32_t)(d2) & 0x3FFFUL) << 12), \
26
(((uint32_t)d2) >> 14) | (((uint32_t)(d3) & 0xFFUL) << 18), \
27
(((uint32_t)d3) >> 8) | (((uint32_t)(d4) & 0x3UL) << 24), \
28
(((uint32_t)d4) >> 2) & 0x3FFFFFFUL, \
29
(((uint32_t)d4) >> 28) | (((uint32_t)(d5) & 0x3FFFFFUL) << 4), \
30
(((uint32_t)d5) >> 22) | (((uint32_t)(d6) & 0xFFFFUL) << 10), \
31
(((uint32_t)d6) >> 16) | (((uint32_t)(d7) & 0x3FFUL) << 16), \
32
(((uint32_t)d7) >> 10) \
33
}
34
35
#ifdef VERIFY
36
#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0)), 1, 1}
37
#else
38
#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0))}
39
#endif
40
41
typedef
struct
{
42
uint32_t n[8];
43
}
secp256k1_fe_storage
;
44
45
#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}
46
#define SECP256K1_FE_STORAGE_CONST_GET(d) d.n[7], d.n[6], d.n[5], d.n[4],d.n[3], d.n[2], d.n[1], d.n[0]
47
48
#endif
/* SECP256K1_FIELD_REPR_H */
secp256k1_fe
Definition:
field_10x26.h:12
secp256k1_fe_storage
Definition:
field_10x26.h:41
Generated on Mon Jul 29 2019 02:32:20 for Raven Core by
1.8.13