 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
16 unsigned char key[32];
17 unsigned char blind[32];
20 static void bench_generator_setup(
void* arg) {
22 memset(data->
key, 0x31, 32);
23 memset(data->
blind, 0x13, 32);
26 static void bench_generator_generate(
void* arg) {
30 for (i = 0; i < 20000; i++) {
37 static void bench_generator_generate_blinded(
void* arg) {
41 for (i = 0; i < 20000; i++) {
44 data->
key[1 + (i & 30)]++;
45 data->
blind[1 + (i & 30)]++;
54 run_benchmark(
"generator_generate", bench_generator_generate, bench_generator_setup, NULL, &data, 10, 20000);
55 run_benchmark(
"generator_generate_blinded", bench_generator_generate_blinded, bench_generator_setup, NULL, &data, 10, 20000);
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_generator_generate_blinded(const secp256k1_context2 *ctx, secp256k1_generator *gen, const unsigned char *key32, const unsigned char *blind32) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
Generate a blinded generator for the curve.
SECP256K1_API void secp256k1_context_destroy(secp256k1_context2 *ctx)
Destroy a secp256k1 context object.
void run_benchmark(char *name, void(*benchmark)(void *), void(*setup)(void *), void(*teardown)(void *), void *data, int count, int iter)
Opaque data structure that stores a base point.
SECP256K1_API secp256k1_context2 * secp256k1_context_create2(unsigned int flags) SECP256K1_WARN_UNUSED_RESULT
Create a secp256k1 context object.
#define SECP256K1_CONTEXT_VERIFY
Flags to pass to secp256k1_context_create2.
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_generator_generate(const secp256k1_context2 *ctx, secp256k1_generator *gen, const unsigned char *seed32) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3)
Generate a generator for the curve.
#define SECP256K1_CONTEXT_SIGN