Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion include/secp256k1_bulletproofs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ extern "C" {

#include <stdint.h>

/** A function-like macro returning the size, in bytes, of an uncompressed
* Bulletproof proving that a value lies in the range [0, 2^(n_bits) - 1]
*/
#define SECP256K1_BULLETPROOFS_UNCOMPRESSED_SIZE(n_bits) (194UL + (n_bits) * 64)

/** Maximum size, in bytes, of an uncompressed rangeproof */
extern const size_t SECP256K1_BULLETPROOFS_RANGEPROOF_UNCOMPRESSED_MAX_LENGTH;

/** The same value, as a C macro so it can be used as C89 array size */
#define SECP256K1_BULLETPROOFS_RANGEPROOF_UNCOMPRESSED_MAX_LENGTH_ (194 + 4096)
#define SECP256K1_BULLETPROOFS_RANGEPROOF_UNCOMPRESSED_MAX_LENGTH_ \
SECP256K1_BULLETPROOFS_UNCOMPRESSED_SIZE(64)

/** Opaque data structure that holds the current state of an uncompressed
* Bulletproof proof generation. This data is not secret and does not need
Expand Down