2020-12-17 08:33:49 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* Copyright (c) 2013, 2014 Pieter Wuille *
|
|
|
|
* Distributed under the MIT software license, see the accompanying *
|
|
|
|
* file COPYING or https://www.opensource.org/licenses/mit-license.php.*
|
|
|
|
***********************************************************************/
|
2014-10-27 02:57:27 -07:00
|
|
|
|
2017-08-26 18:44:21 +03:00
|
|
|
#ifndef SECP256K1_ECKEY_H
|
|
|
|
#define SECP256K1_ECKEY_H
|
2014-10-27 02:57:27 -07:00
|
|
|
|
2015-09-01 04:35:10 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
|
2014-10-27 02:57:27 -07:00
|
|
|
#include "group.h"
|
2014-10-28 04:08:15 -07:00
|
|
|
#include "scalar.h"
|
2015-02-03 17:27:00 -08:00
|
|
|
#include "ecmult.h"
|
|
|
|
#include "ecmult_gen.h"
|
2014-10-27 02:57:27 -07:00
|
|
|
|
2015-09-21 20:57:54 +02:00
|
|
|
static int secp256k1_eckey_pubkey_parse(secp256k1_ge *elem, const unsigned char *pub, size_t size);
|
2015-10-21 17:43:29 +02:00
|
|
|
static int secp256k1_eckey_pubkey_serialize(secp256k1_ge *elem, unsigned char *pub, size_t *size, int compressed);
|
2014-10-27 02:57:27 -07:00
|
|
|
|
2015-09-21 20:57:54 +02:00
|
|
|
static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar *key, const secp256k1_scalar *tweak);
|
2021-06-25 18:46:11 -04:00
|
|
|
static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge *key, const secp256k1_scalar *tweak);
|
2015-09-21 20:57:54 +02:00
|
|
|
static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar *key, const secp256k1_scalar *tweak);
|
2021-06-25 18:46:11 -04:00
|
|
|
static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge *key, const secp256k1_scalar *tweak);
|
2014-10-27 03:27:55 -07:00
|
|
|
|
2017-08-26 18:44:21 +03:00
|
|
|
#endif /* SECP256K1_ECKEY_H */
|