diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-04-18 14:15:11 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-15 22:09:56 +0800 |
commit | 7f9d5b1f1cb1a07e2600533a85e585c2a6dfe7bd (patch) | |
tree | a6061686cb458ede8f1a72eb9ac8e785bd0d420e /crypto/secp256k1/libsecp256k1/src/field_10x26.h | |
parent | a1be735b1cd6d02bc69b9bb011c56e62cec290f5 (diff) | |
download | go-tangerine-7f9d5b1f1cb1a07e2600533a85e585c2a6dfe7bd.tar go-tangerine-7f9d5b1f1cb1a07e2600533a85e585c2a6dfe7bd.tar.gz go-tangerine-7f9d5b1f1cb1a07e2600533a85e585c2a6dfe7bd.tar.bz2 go-tangerine-7f9d5b1f1cb1a07e2600533a85e585c2a6dfe7bd.tar.lz go-tangerine-7f9d5b1f1cb1a07e2600533a85e585c2a6dfe7bd.tar.xz go-tangerine-7f9d5b1f1cb1a07e2600533a85e585c2a6dfe7bd.tar.zst go-tangerine-7f9d5b1f1cb1a07e2600533a85e585c2a6dfe7bd.zip |
crypto: use go-ethereum secp256k1 package to avoid symbol conflict (#374)
Diffstat (limited to 'crypto/secp256k1/libsecp256k1/src/field_10x26.h')
-rw-r--r-- | crypto/secp256k1/libsecp256k1/src/field_10x26.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/crypto/secp256k1/libsecp256k1/src/field_10x26.h b/crypto/secp256k1/libsecp256k1/src/field_10x26.h deleted file mode 100644 index 61ee1e096..000000000 --- a/crypto/secp256k1/libsecp256k1/src/field_10x26.h +++ /dev/null @@ -1,47 +0,0 @@ -/********************************************************************** - * Copyright (c) 2013, 2014 Pieter Wuille * - * Distributed under the MIT software license, see the accompanying * - * file COPYING or http://www.opensource.org/licenses/mit-license.php.* - **********************************************************************/ - -#ifndef _SECP256K1_FIELD_REPR_ -#define _SECP256K1_FIELD_REPR_ - -#include <stdint.h> - -typedef struct { - /* X = sum(i=0..9, elem[i]*2^26) mod n */ - uint32_t n[10]; -#ifdef VERIFY - int magnitude; - int normalized; -#endif -} secp256k1_fe; - -/* Unpacks a constant into a overlapping multi-limbed FE element. */ -#define SECP256K1_FE_CONST_INNER(d7, d6, d5, d4, d3, d2, d1, d0) { \ - (d0) & 0x3FFFFFFUL, \ - (((uint32_t)d0) >> 26) | (((uint32_t)(d1) & 0xFFFFFUL) << 6), \ - (((uint32_t)d1) >> 20) | (((uint32_t)(d2) & 0x3FFFUL) << 12), \ - (((uint32_t)d2) >> 14) | (((uint32_t)(d3) & 0xFFUL) << 18), \ - (((uint32_t)d3) >> 8) | (((uint32_t)(d4) & 0x3UL) << 24), \ - (((uint32_t)d4) >> 2) & 0x3FFFFFFUL, \ - (((uint32_t)d4) >> 28) | (((uint32_t)(d5) & 0x3FFFFFUL) << 4), \ - (((uint32_t)d5) >> 22) | (((uint32_t)(d6) & 0xFFFFUL) << 10), \ - (((uint32_t)d6) >> 16) | (((uint32_t)(d7) & 0x3FFUL) << 16), \ - (((uint32_t)d7) >> 10) \ -} - -#ifdef VERIFY -#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} -#else -#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {SECP256K1_FE_CONST_INNER((d7), (d6), (d5), (d4), (d3), (d2), (d1), (d0))} -#endif - -typedef struct { - uint32_t n[8]; -} secp256k1_fe_storage; - -#define SECP256K1_FE_STORAGE_CONST(d7, d6, d5, d4, d3, d2, d1, d0) {{ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }} -#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] -#endif |