]>
Commit | Line | Data |
---|---|---|
71712b27 GM |
1 | /********************************************************************** |
2 | * Copyright (c) 2013, 2014 Pieter Wuille * | |
3 | * Distributed under the MIT software license, see the accompanying * | |
4 | * file COPYING or http://www.opensource.org/licenses/mit-license.php.* | |
5 | **********************************************************************/ | |
e2f71f1e PW |
6 | |
7 | #ifndef _SECP256K1_ECKEY_ | |
8 | #define _SECP256K1_ECKEY_ | |
9 | ||
10 | #include "group.h" | |
a9f5c8b8 | 11 | #include "scalar.h" |
a9b6595e PW |
12 | #include "ecmult.h" |
13 | #include "ecmult_gen.h" | |
e2f71f1e | 14 | |
a4a43d75 | 15 | static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size); |
bbe67d8b | 16 | static int secp256k1_eckey_pubkey_serialize(secp256k1_ge_t *elem, unsigned char *pub, int *size, int compressed); |
eb74c36b | 17 | |
a4a43d75 | 18 | static int secp256k1_eckey_privkey_parse(secp256k1_scalar_t *key, const unsigned char *privkey, int privkeylen); |
a9b6595e | 19 | static int secp256k1_eckey_privkey_serialize(const secp256k1_ecmult_gen_context_t *ctx, unsigned char *privkey, int *privkeylen, const secp256k1_scalar_t *key, int compressed); |
e2f71f1e | 20 | |
a4a43d75 | 21 | static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak); |
a9b6595e | 22 | static int secp256k1_eckey_pubkey_tweak_add(const secp256k1_ecmult_context_t *ctx, secp256k1_ge_t *key, const secp256k1_scalar_t *tweak); |
a4a43d75 | 23 | static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak); |
a9b6595e | 24 | static int secp256k1_eckey_pubkey_tweak_mul(const secp256k1_ecmult_context_t *ctx, secp256k1_ge_t *key, const secp256k1_scalar_t *tweak); |
eb74c36b | 25 | |
e2f71f1e | 26 | #endif |