Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/num_gmp.h
/********************************************************************** | /*********************************************************************** | ||||
* Copyright (c) 2013, 2014 Pieter Wuille * | * Copyright (c) 2013, 2014 Pieter Wuille * | ||||
* Distributed under the MIT software license, see the accompanying * | * Distributed under the MIT software license, see the accompanying * | ||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.* | * file COPYING or https://www.opensource.org/licenses/mit-license.php.* | ||||
**********************************************************************/ | ***********************************************************************/ | ||||
#ifndef SECP256K1_NUM_REPR_H | #ifndef SECP256K1_NUM_REPR_H | ||||
#define SECP256K1_NUM_REPR_H | #define SECP256K1_NUM_REPR_H | ||||
#include <gmp.h> | #include <gmp.h> | ||||
#define NUM_LIMBS ((256+GMP_NUMB_BITS-1)/GMP_NUMB_BITS) | #define NUM_LIMBS ((256+GMP_NUMB_BITS-1)/GMP_NUMB_BITS) | ||||
typedef struct { | typedef struct { | ||||
mp_limb_t data[2*NUM_LIMBS]; | mp_limb_t data[2*NUM_LIMBS]; | ||||
int neg; | int neg; | ||||
int limbs; | int limbs; | ||||
} secp256k1_num; | } secp256k1_num; | ||||
#endif /* SECP256K1_NUM_REPR_H */ | #endif /* SECP256K1_NUM_REPR_H */ |