Bitcoin Core  27.99.0
P2P Digital Currency
Macros | Typedefs
scalar_low.h File Reference
#include <stdint.h>
Include dependency graph for scalar_low.h:

Go to the source code of this file.

Macros

#define SCALAR_2P32   ((0xffffffffUL % EXHAUSTIVE_TEST_ORDER) + 1U)
 
#define SCALAR_HORNER(a, b)   (((uint64_t)(a) * SCALAR_2P32 + (b)) % EXHAUSTIVE_TEST_ORDER)
 
#define SECP256K1_SCALAR_CONST(d7, d6, d5, d4, d3, d2, d1, d0)   SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER((d7), (d6)), (d5)), (d4)), (d3)), (d2)), (d1)), (d0))
 

Typedefs

typedef uint32_t secp256k1_scalar
 A scalar modulo the group order of the secp256k1 curve. More...
 

Macro Definition Documentation

◆ SCALAR_2P32

#define SCALAR_2P32   ((0xffffffffUL % EXHAUSTIVE_TEST_ORDER) + 1U)

Definition at line 16 of file scalar_low.h.

◆ SCALAR_HORNER

#define SCALAR_HORNER (   a,
 
)    (((uint64_t)(a) * SCALAR_2P32 + (b)) % EXHAUSTIVE_TEST_ORDER)

Definition at line 19 of file scalar_low.h.

◆ SECP256K1_SCALAR_CONST

#define SECP256K1_SCALAR_CONST (   d7,
  d6,
  d5,
  d4,
  d3,
  d2,
  d1,
  d0 
)    SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER(SCALAR_HORNER((d7), (d6)), (d5)), (d4)), (d3)), (d2)), (d1)), (d0))

Definition at line 22 of file scalar_low.h.

Typedef Documentation

◆ secp256k1_scalar

typedef uint32_t secp256k1_scalar

A scalar modulo the group order of the secp256k1 curve.

Definition at line 13 of file scalar_low.h.