PRCYCoin  2.0.0.7rc1
P2P Digital Currency
secp256k1_rangeproof.h
Go to the documentation of this file.
1 #ifndef _SECP256K1_RANGEPROOF_
2 # define _SECP256K1_RANGEPROOF_
3 
4 # include "secp256k1_2.h"
5 # include "secp256k1_generator.h"
6 # include "secp256k1_commitment.h"
7 
8 # ifdef __cplusplus
9 extern "C" {
10 # endif
11 
12 #include <stdint.h>
13 
28  const secp256k1_context2* ctx,
29  uint64_t *min_value,
30  uint64_t *max_value,
31  const secp256k1_pedersen_commitment *commit,
32  const unsigned char *proof,
33  size_t plen,
34  const unsigned char *extra_commit,
35  size_t extra_commit_len,
36  const secp256k1_generator* gen
38 
58  const secp256k1_context2* ctx,
59  unsigned char *blind_out,
60  uint64_t *value_out,
61  unsigned char *message_out,
62  size_t *outlen,
63  const unsigned char *nonce,
64  uint64_t *min_value,
65  uint64_t *max_value,
66  const secp256k1_pedersen_commitment *commit,
67  const unsigned char *proof,
68  size_t plen,
69  const unsigned char *extra_commit,
70  size_t extra_commit_len,
71  const secp256k1_generator *gen
73 
102  const secp256k1_context2* ctx,
103  unsigned char *proof,
104  size_t *plen,
105  uint64_t min_value,
106  const secp256k1_pedersen_commitment *commit,
107  const unsigned char *blind,
108  const unsigned char *nonce,
109  int exp,
110  int min_bits,
111  uint64_t value,
112  const unsigned char *message,
113  size_t msg_len,
114  const unsigned char *extra_commit,
115  size_t extra_commit_len,
116  const secp256k1_generator *gen
118 
131  const secp256k1_context2* ctx,
132  int *exp,
133  int *mantissa,
134  uint64_t *min_value,
135  uint64_t *max_value,
136  const unsigned char *proof,
137  size_t plen
139 
140 # ifdef __cplusplus
141 }
142 # endif
143 
144 #endif
secp256k1_rangeproof_info
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_rangeproof_info(const secp256k1_context2 *ctx, int *exp, int *mantissa, uint64_t *min_value, uint64_t *max_value, const unsigned char *proof, size_t plen) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5)
Extract some basic information from a range-proof.
Definition: main_impl.h:17
secp256k1_rangeproof_rewind
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_rangeproof_rewind(const secp256k1_context2 *ctx, unsigned char *blind_out, uint64_t *value_out, unsigned char *message_out, size_t *outlen, const unsigned char *nonce, uint64_t *min_value, uint64_t *max_value, const secp256k1_pedersen_commitment *commit, const unsigned char *proof, size_t plen, const unsigned char *extra_commit, size_t extra_commit_len, const secp256k1_generator *gen) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(6) SECP256K1_ARG_NONNULL(7) SECP256K1_ARG_NONNULL(8) SECP256K1_ARG_NONNULL(9) SECP256K1_ARG_NONNULL(10) SECP256K1_ARG_NONNULL(14)
Verify a range proof proof and rewind the proof to recover information sent by its author.
Definition: main_impl.h:32
SECP256K1_API
#define SECP256K1_API
Definition: secp256k1_2.h:139
secp256k1_rangeproof_verify
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_rangeproof_verify(const secp256k1_context2 *ctx, uint64_t *min_value, uint64_t *max_value, const secp256k1_pedersen_commitment *commit, const unsigned char *proof, size_t plen, const unsigned char *extra_commit, size_t extra_commit_len, const secp256k1_generator *gen) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(9)
Verify a proof that a committed value is within a range.
Definition: main_impl.h:55
secp256k1_generator
Opaque data structure that stores a base point.
Definition: secp256k1_generator.h:20
secp256k1_rangeproof_sign
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_rangeproof_sign(const secp256k1_context2 *ctx, unsigned char *proof, size_t *plen, uint64_t min_value, const secp256k1_pedersen_commitment *commit, const unsigned char *blind, const unsigned char *nonce, int exp, int min_bits, uint64_t value, const unsigned char *message, size_t msg_len, const unsigned char *extra_commit, size_t extra_commit_len, const secp256k1_generator *gen) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(6) SECP256K1_ARG_NONNULL(7) SECP256K1_ARG_NONNULL(15)
Author a proof that a committed value is within a range.
Definition: main_impl.h:73
SECP256K1_WARN_UNUSED_RESULT
#define SECP256K1_WARN_UNUSED_RESULT
Warning attributes NONNULL is not used if SECP256K1_BUILD is set to avoid the compiler optimizing out...
Definition: secp256k1.h:35
secp256k1_context_struct2
Definition: secp256k1_types.h:15
secp256k1_pedersen_commitment
Opaque data structure that stores a Pedersen commitment.
Definition: secp256k1_commitment.h:22
secp256k1_generator.h
secp256k1_2.h
SECP256K1_ARG_NONNULL
#define SECP256K1_ARG_NONNULL(_x)
Definition: secp256k1.h:40
secp256k1_commitment.h