Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/include/secp256k1.h
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | |||||
/** All flags' lower 8 bits indicate what they're for. Do not use directly. */ | /** All flags' lower 8 bits indicate what they're for. Do not use directly. */ | ||||
#define SECP256K1_FLAGS_TYPE_MASK ((1 << 8) - 1) | #define SECP256K1_FLAGS_TYPE_MASK ((1 << 8) - 1) | ||||
#define SECP256K1_FLAGS_TYPE_CONTEXT (1 << 0) | #define SECP256K1_FLAGS_TYPE_CONTEXT (1 << 0) | ||||
#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1) | #define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1) | ||||
/** The higher bits contain the actual data. Do not use directly. */ | /** The higher bits contain the actual data. Do not use directly. */ | ||||
#define SECP256K1_FLAGS_BIT_CONTEXT_VERIFY (1 << 8) | #define SECP256K1_FLAGS_BIT_CONTEXT_VERIFY (1 << 8) | ||||
#define SECP256K1_FLAGS_BIT_CONTEXT_SIGN (1 << 9) | #define SECP256K1_FLAGS_BIT_CONTEXT_SIGN (1 << 9) | ||||
#define SECP256K1_FLAGS_BIT_CONTEXT_DECLASSIFY (1 << 10) | |||||
#define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8) | #define SECP256K1_FLAGS_BIT_COMPRESSION (1 << 8) | ||||
/** Flags to pass to secp256k1_context_create, secp256k1_context_preallocated_size, and | /** Flags to pass to secp256k1_context_create, secp256k1_context_preallocated_size, and | ||||
* secp256k1_context_preallocated_create. */ | * secp256k1_context_preallocated_create. */ | ||||
#define SECP256K1_CONTEXT_VERIFY (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_VERIFY) | #define SECP256K1_CONTEXT_VERIFY (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_VERIFY) | ||||
#define SECP256K1_CONTEXT_SIGN (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_SIGN) | #define SECP256K1_CONTEXT_SIGN (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_SIGN) | ||||
#define SECP256K1_CONTEXT_DECLASSIFY (SECP256K1_FLAGS_TYPE_CONTEXT | SECP256K1_FLAGS_BIT_CONTEXT_DECLASSIFY) | |||||
#define SECP256K1_CONTEXT_NONE (SECP256K1_FLAGS_TYPE_CONTEXT) | #define SECP256K1_CONTEXT_NONE (SECP256K1_FLAGS_TYPE_CONTEXT) | ||||
/** Flag to pass to secp256k1_ec_pubkey_serialize. */ | /** Flag to pass to secp256k1_ec_pubkey_serialize. */ | ||||
#define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION) | #define SECP256K1_EC_COMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION | SECP256K1_FLAGS_BIT_COMPRESSION) | ||||
#define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION) | #define SECP256K1_EC_UNCOMPRESSED (SECP256K1_FLAGS_TYPE_COMPRESSION) | ||||
/** Prefix byte used to tag various encoded curvepoints for specific purposes */ | /** Prefix byte used to tag various encoded curvepoints for specific purposes */ | ||||
#define SECP256K1_TAG_PUBKEY_EVEN 0x02 | #define SECP256K1_TAG_PUBKEY_EVEN 0x02 | ||||
▲ Show 20 Lines • Show All 530 Lines • Show Last 20 Lines |