Include public module headers when compiling modules.
Also fix the nullness requirements for schnorr nonce-pair generation.
This commit is contained in:
parent
1f414378b8
commit
4e64608082
|
@ -94,7 +94,7 @@ int secp256k1_schnorr_generate_nonce_pair(
|
||||||
const unsigned char *sec32,
|
const unsigned char *sec32,
|
||||||
secp256k1_nonce_function noncefp,
|
secp256k1_nonce_function noncefp,
|
||||||
const void* noncedata
|
const void* noncedata
|
||||||
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(6) SECP256K1_ARG_NONNULL(7);
|
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
|
||||||
|
|
||||||
/** Produce a partial Schnorr signature, which can be combined using
|
/** Produce a partial Schnorr signature, which can be combined using
|
||||||
* secp256k1_schnorr_partial_combine, to end up with a full signature that is
|
* secp256k1_schnorr_partial_combine, to end up with a full signature that is
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#ifndef _SECP256K1_MODULE_ECDH_MAIN_
|
#ifndef _SECP256K1_MODULE_ECDH_MAIN_
|
||||||
#define _SECP256K1_MODULE_ECDH_MAIN_
|
#define _SECP256K1_MODULE_ECDH_MAIN_
|
||||||
|
|
||||||
|
#include "include/secp256k1_ecdh.h"
|
||||||
#include "ecmult_const_impl.h"
|
#include "ecmult_const_impl.h"
|
||||||
|
|
||||||
int secp256k1_ecdh(const secp256k1_context* ctx, unsigned char *result, const secp256k1_pubkey *point, const unsigned char *scalar) {
|
int secp256k1_ecdh(const secp256k1_context* ctx, unsigned char *result, const secp256k1_pubkey *point, const unsigned char *scalar) {
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#ifndef SECP256K1_MODULE_SCHNORR_MAIN
|
#ifndef SECP256K1_MODULE_SCHNORR_MAIN
|
||||||
#define SECP256K1_MODULE_SCHNORR_MAIN
|
#define SECP256K1_MODULE_SCHNORR_MAIN
|
||||||
|
|
||||||
|
#include "include/secp256k1_schnorr.h"
|
||||||
#include "modules/schnorr/schnorr_impl.h"
|
#include "modules/schnorr/schnorr_impl.h"
|
||||||
|
|
||||||
static void secp256k1_schnorr_msghash_sha256(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) {
|
static void secp256k1_schnorr_msghash_sha256(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) {
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
* file COPYING or http://www.opensource.org/licenses/mit-license.php. *
|
* file COPYING or http://www.opensource.org/licenses/mit-license.php. *
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
#ifndef _SECP256K1_SCHNORR_
|
#ifndef _SECP256K1_MODULE_SCHNORR_H_
|
||||||
#define _SECP256K1_SCHNORR_
|
#define _SECP256K1_MODULE_SCHNORR_H_
|
||||||
|
|
||||||
#include "scalar.h"
|
#include "scalar.h"
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#ifndef SECP256K1_MODULE_SCHNORR_TESTS
|
#ifndef SECP256K1_MODULE_SCHNORR_TESTS
|
||||||
#define SECP256K1_MODULE_SCHNORR_TESTS
|
#define SECP256K1_MODULE_SCHNORR_TESTS
|
||||||
|
|
||||||
|
#include "include/secp256k1_schnorr.h"
|
||||||
|
|
||||||
void test_schnorr_end_to_end(void) {
|
void test_schnorr_end_to_end(void) {
|
||||||
unsigned char privkey[32];
|
unsigned char privkey[32];
|
||||||
unsigned char message[32];
|
unsigned char message[32];
|
||||||
|
|
Loading…
Reference in New Issue