Fourth step in converting to C: ecmult

This commit is contained in:
Pieter Wuille
2013-04-01 06:29:30 +02:00
parent f11ff5be70
commit b1483f874c
7 changed files with 206 additions and 402 deletions

View File

@@ -4,10 +4,15 @@
#include "num.h"
#include "group.h"
namespace secp256k1 {
extern "C" {
void ECMultBase(secp256k1_gej_t &out, const secp256k1_num_t &gn);
void ECMult(secp256k1_gej_t &out, const secp256k1_gej_t &a, const secp256k1_num_t &an, const secp256k1_num_t &gn);
static void secp256k1_ecmult_start(void);
static void secp256k1_ecmult_stop(void);
/** Multiply with the generator: R = a*G */
static void secp256k1_ecmult_gen(secp256k1_gej_t *r, const secp256k1_num_t *a);
/** Double multiply: R = na*A + ng*G */
static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_num_t *na, const secp256k1_num_t *ng);
}