Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/field_5x52.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 http://www.opensource.org/licenses/mit-license.php.* | ||||
**********************************************************************/ | **********************************************************************/ | ||||
#ifndef _SECP256K1_FIELD_REPR_ | #ifndef SECP256K1_FIELD_REPR_H | ||||
#define _SECP256K1_FIELD_REPR_ | #define SECP256K1_FIELD_REPR_H | ||||
#include <stdint.h> | #include <stdint.h> | ||||
typedef struct { | typedef struct { | ||||
/* X = sum(i=0..4, elem[i]*2^52) mod n */ | /* X = sum(i=0..4, elem[i]*2^52) mod n */ | ||||
uint64_t n[5]; | uint64_t n[5]; | ||||
#ifdef VERIFY | #ifdef VERIFY | ||||
int magnitude; | int magnitude; | ||||
Show All 22 Lines | |||||
#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ \ | #define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ \ | ||||
(d0) | (((uint64_t)(d1)) << 32), \ | (d0) | (((uint64_t)(d1)) << 32), \ | ||||
(d2) | (((uint64_t)(d3)) << 32), \ | (d2) | (((uint64_t)(d3)) << 32), \ | ||||
(d4) | (((uint64_t)(d5)) << 32), \ | (d4) | (((uint64_t)(d5)) << 32), \ | ||||
(d6) | (((uint64_t)(d7)) << 32) \ | (d6) | (((uint64_t)(d7)) << 32) \ | ||||
}} | }} | ||||
#endif | #endif /* SECP256K1_FIELD_REPR_H */ |