Bitcoin ABC 0.32.6
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
14 const unsigned char *sig64,
15 secp256k1_ge *pubkey,
16 const unsigned char *msg32
17);
18
21 const unsigned char *r,
22 secp256k1_ge *pubkey,
23 const unsigned char *msg32
24);
25
28 unsigned char *sig64,
29 const unsigned char *msg32,
30 const secp256k1_scalar *privkey,
31 secp256k1_ge *pubkey,
33 const void *ndata
34);
35
39 const unsigned char *msg32,
40 const secp256k1_scalar *privkey,
42 const void *ndata
43);
44
45#endif
secp256k1_context * ctx
static int secp256k1_schnorr_sig_verify(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