parameterize ecmult_const over input size

This commit is contained in:
Andrew Poelstra
2018-03-13 16:32:51 +00:00
parent dbc3ddd5e2
commit 7c1b91ba4b
7 changed files with 78 additions and 49 deletions

View File

@@ -30,7 +30,7 @@ int secp256k1_ecdh(const secp256k1_context* ctx, unsigned char *result, const se
unsigned char y[1];
secp256k1_sha256 sha;
secp256k1_ecmult_const(&res, &pt, &s);
secp256k1_ecmult_const(&res, &pt, &s, 256);
secp256k1_ge_set_gej(&pt, &res);
/* Compute a hash of the point in compressed form
* Note we cannot use secp256k1_eckey_pubkey_serialize here since it does not