Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/field_5x52_impl.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_IMPL_H_ | #ifndef SECP256K1_FIELD_REPR_IMPL_H | ||||
#define _SECP256K1_FIELD_REPR_IMPL_H_ | #define SECP256K1_FIELD_REPR_IMPL_H | ||||
#if defined HAVE_CONFIG_H | #if defined HAVE_CONFIG_H | ||||
#include "libsecp256k1-config.h" | #include "libsecp256k1-config.h" | ||||
#endif | #endif | ||||
#include "util.h" | #include "util.h" | ||||
#include "num.h" | #include "num.h" | ||||
#include "field.h" | #include "field.h" | ||||
▲ Show 20 Lines • Show All 471 Lines • ▼ Show 20 Lines | static SECP256K1_INLINE void secp256k1_fe_from_storage(secp256k1_fe *r, const secp256k1_fe_storage *a) { | ||||
r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL); | r->n[3] = a->n[2] >> 28 | ((a->n[3] << 36) & 0xFFFFFFFFFFFFFULL); | ||||
r->n[4] = a->n[3] >> 16; | r->n[4] = a->n[3] >> 16; | ||||
#ifdef VERIFY | #ifdef VERIFY | ||||
r->magnitude = 1; | r->magnitude = 1; | ||||
r->normalized = 1; | r->normalized = 1; | ||||
#endif | #endif | ||||
} | } | ||||
#endif | #endif /* SECP256K1_FIELD_REPR_IMPL_H */ |