|
|
@ -46,9 +46,6 @@
|
|
|
|
#include "hex.h"
|
|
|
|
#include "hex.h"
|
|
|
|
#include "span.h"
|
|
|
|
#include "span.h"
|
|
|
|
#include "hash.h"
|
|
|
|
#include "hash.h"
|
|
|
|
extern "C" {
|
|
|
|
|
|
|
|
#include "crypto-ops.h"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace crypto {
|
|
|
|
namespace crypto {
|
|
|
|
|
|
|
|
|
|
|
@ -116,9 +113,6 @@ namespace crypto {
|
|
|
|
void operator=(const crypto_ops &);
|
|
|
|
void operator=(const crypto_ops &);
|
|
|
|
~crypto_ops();
|
|
|
|
~crypto_ops();
|
|
|
|
|
|
|
|
|
|
|
|
static void hash_to_ec(const public_key &key, ge_p3 &res) ;
|
|
|
|
|
|
|
|
friend void hash_to_ec(const public_key &key, ge_p3 &res) ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key = secret_key(), bool recover = false);
|
|
|
|
static secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key = secret_key(), bool recover = false);
|
|
|
|
friend secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key, bool recover);
|
|
|
|
friend secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key, bool recover);
|
|
|
|
static bool check_key(const public_key &);
|
|
|
|
static bool check_key(const public_key &);
|
|
|
@ -172,9 +166,6 @@ namespace crypto {
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline void hash_to_ec(const public_key &key, ge_p3 &res) {
|
|
|
|
|
|
|
|
crypto_ops::hash_to_ec(key,res);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Generate a new key pair
|
|
|
|
/* Generate a new key pair
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key = secret_key(), bool recover = false) {
|
|
|
|
inline secret_key generate_keys(public_key &pub, secret_key &sec, const secret_key& recovery_key = secret_key(), bool recover = false) {
|
|
|
|