Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/ecmult_gen.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_ECMULT_GEN_ | #ifndef SECP256K1_ECMULT_GEN_H | ||||
#define _SECP256K1_ECMULT_GEN_ | #define SECP256K1_ECMULT_GEN_H | ||||
#include "scalar.h" | #include "scalar.h" | ||||
#include "group.h" | #include "group.h" | ||||
typedef struct { | typedef struct { | ||||
/* For accelerating the computation of a*G: | /* For accelerating the computation of a*G: | ||||
* To harden against timing attacks, use the following mechanism: | * To harden against timing attacks, use the following mechanism: | ||||
* * Break up the multiplicand into groups of 4 bits, called n_0, n_1, n_2, ..., n_63. | * * Break up the multiplicand into groups of 4 bits, called n_0, n_1, n_2, ..., n_63. | ||||
Show All 18 Lines | |||||
static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context* ctx); | static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context* ctx); | ||||
static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx); | static int secp256k1_ecmult_gen_context_is_built(const secp256k1_ecmult_gen_context* ctx); | ||||
/** Multiply with the generator: R = a*G */ | /** Multiply with the generator: R = a*G */ | ||||
static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context* ctx, secp256k1_gej *r, const secp256k1_scalar *a); | static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context* ctx, secp256k1_gej *r, const secp256k1_scalar *a); | ||||
static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32); | static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32); | ||||
#endif | #endif /* SECP256K1_ECMULT_GEN_H */ |