Move non-ECDSA operations from ecdsa to eckey

This commit is contained in:
Pieter Wuille
2014-10-27 02:57:27 -07:00
parent ae6bc76e32
commit e2f71f1efe
6 changed files with 153 additions and 123 deletions

16
src/eckey.h Normal file
View File

@@ -0,0 +1,16 @@
// Copyright (c) 2013-2014 Pieter Wuille
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef _SECP256K1_ECKEY_
#define _SECP256K1_ECKEY_
#include "group.h"
#include "num.h"
int static secp256k1_ecdsa_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size);
void static secp256k1_ecdsa_pubkey_serialize(secp256k1_ge_t *elem, unsigned char *pub, int *size, int compressed);
int static secp256k1_ecdsa_privkey_parse(secp256k1_num_t *key, const unsigned char *privkey, int privkeylen);
int static secp256k1_ecdsa_privkey_serialize(unsigned char *privkey, int *privkeylen, const secp256k1_num_t *key, int compressed);
#endif