Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
secp256k1
include
secp256k1_ecdh.h
Go to the documentation of this file.
1
#ifndef SECP256K1_ECDH_H
2
#define SECP256K1_ECDH_H
3
4
#include "
secp256k1.h
"
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
21
typedef
int (*
secp256k1_ecdh_hash_function
)(
22
unsigned
char
*output,
23
const
unsigned
char
*x32,
24
const
unsigned
char
*y32,
25
void
*data
26
);
27
30
SECP256K1_API
const
secp256k1_ecdh_hash_function
secp256k1_ecdh_hash_function_sha256
;
31
34
SECP256K1_API
const
secp256k1_ecdh_hash_function
secp256k1_ecdh_hash_function_default
;
35
50
SECP256K1_API
SECP256K1_WARN_UNUSED_RESULT
int
secp256k1_ecdh
(
51
const
secp256k1_context
*ctx,
52
unsigned
char
*output,
53
const
secp256k1_pubkey
*pubkey,
54
const
unsigned
char
*seckey,
55
secp256k1_ecdh_hash_function
hashfp,
56
void
*data
57
)
SECP256K1_ARG_NONNULL
(1)
SECP256K1_ARG_NONNULL
(2)
SECP256K1_ARG_NONNULL
(3)
SECP256K1_ARG_NONNULL
(4);
58
59
#ifdef __cplusplus
60
}
61
#endif
62
63
#endif
/* SECP256K1_ECDH_H */
secp256k1.h
SECP256K1_ARG_NONNULL
#define SECP256K1_ARG_NONNULL(_x)
Definition
secp256k1.h:188
secp256k1_context
struct secp256k1_context_struct secp256k1_context
Unless explicitly stated all pointer arguments must not be NULL.
Definition
secp256k1.h:50
SECP256K1_API
#define SECP256K1_API
Definition
secp256k1.h:172
SECP256K1_WARN_UNUSED_RESULT
#define SECP256K1_WARN_UNUSED_RESULT
Definition
secp256k1.h:183
secp256k1_ecdh
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdh(const secp256k1_context *ctx, unsigned char *output, const secp256k1_pubkey *pubkey, const unsigned char *seckey, secp256k1_ecdh_hash_function hashfp, void *data) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
Compute an EC Diffie-Hellman secret in constant time.
Definition
main_impl.h:30
secp256k1_ecdh_hash_function_sha256
SECP256K1_API const secp256k1_ecdh_hash_function secp256k1_ecdh_hash_function_sha256
An implementation of SHA256 hash function that applies to compressed public key.
Definition
secp256k1_ecdh.h:30
secp256k1_ecdh_hash_function
int(* secp256k1_ecdh_hash_function)(unsigned char *output, const unsigned char *x32, const unsigned char *y32, void *data)
A pointer to a function that hashes an EC point to obtain an ECDH secret.
Definition
secp256k1_ecdh.h:21
secp256k1_ecdh_hash_function_default
SECP256K1_API const secp256k1_ecdh_hash_function secp256k1_ecdh_hash_function_default
A default ECDH hash function (currently equal to secp256k1_ecdh_hash_function_sha256).
Definition
secp256k1_ecdh.h:34
secp256k1_pubkey
Opaque data structure that holds a parsed and valid public key.
Definition
secp256k1.h:61
Generated on
for Bitcoin Core by
1.17.0