Bitcoin ABC 0.30.5
P2P Digital Currency
schnorr.h
Go to the documentation of this file.
1/***********************************************************************
2 * Copyright (c) 2017 Amaury SÉCHET *
3 * Distributed under the MIT software license, see the accompanying *
4 * file COPYING or https://www.opensource.org/licenses/mit-license.php.*
5 ***********************************************************************/
6
7#ifndef SECP256K1_MODULE_SCHNORR_H
8#define SECP256K1_MODULE_SCHNORR_H
9
10#include "scalar.h"
11#include "group.h"
12
15 const unsigned char *sig64,
16 secp256k1_ge *pubkey,
17 const unsigned char *msg32
18);
19
22 const unsigned char *r,
23 secp256k1_ge *pubkey,
24 const unsigned char *msg32
25);
26
29 unsigned char *sig64,
30 const unsigned char *msg32,
31 const secp256k1_scalar *privkey,
32 secp256k1_ge *pubkey,
34 const void *ndata
35);
36
40 const unsigned char *msg32,
41 const secp256k1_scalar *privkey,
43 const void *ndata
44);
45
46#endif
secp256k1_context * ctx
static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context *ctx, const unsigned char *sig64, secp256k1_ge *pubkey, const unsigned char *msg32)
static int secp256k1_schnorr_sig_sign(const secp256k1_context *ctx, unsigned char *sig64, const unsigned char *msg32, const secp256k1_scalar *privkey, secp256k1_ge *pubkey, secp256k1_nonce_function noncefp, const void *ndata)
static int secp256k1_schnorr_sig_generate_k(const secp256k1_context *ctx, secp256k1_scalar *k, const unsigned char *msg32, const secp256k1_scalar *privkey, secp256k1_nonce_function noncefp, const void *ndata)
static int secp256k1_schnorr_compute_e(secp256k1_scalar *res, const unsigned char *r, secp256k1_ge *pubkey, const unsigned char *msg32)
int(* secp256k1_nonce_function)(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *algo16, void *data, unsigned int attempt)
A pointer to a function to deterministically generate a nonce.
Definition: secp256k1.h:103
A group element of the secp256k1 curve, in affine coordinates.
Definition: group.h:13
A scalar modulo the group order of the secp256k1 curve.
Definition: scalar_4x64.h:13