Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/eckey_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_ECKEY_IMPL_H_ | #ifndef SECP256K1_ECKEY_IMPL_H | ||||
#define _SECP256K1_ECKEY_IMPL_H_ | #define SECP256K1_ECKEY_IMPL_H | ||||
#include "eckey.h" | #include "eckey.h" | ||||
#include "scalar.h" | #include "scalar.h" | ||||
#include "field.h" | #include "field.h" | ||||
#include "group.h" | #include "group.h" | ||||
#include "ecmult_gen.h" | #include "ecmult_gen.h" | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | static int secp256k1_eckey_pubkey_tweak_mul(const secp256k1_ecmult_context *ctx, secp256k1_ge *key, const secp256k1_scalar *tweak) { | ||||
secp256k1_scalar_set_int(&zero, 0); | secp256k1_scalar_set_int(&zero, 0); | ||||
secp256k1_gej_set_ge(&pt, key); | secp256k1_gej_set_ge(&pt, key); | ||||
secp256k1_ecmult(ctx, &pt, &pt, tweak, &zero); | secp256k1_ecmult(ctx, &pt, &pt, tweak, &zero); | ||||
secp256k1_ge_set_gej(key, &pt); | secp256k1_ge_set_gej(key, &pt); | ||||
return 1; | return 1; | ||||
} | } | ||||
#endif | #endif /* SECP256K1_ECKEY_IMPL_H */ |