Unverified Commit e37be46c authored by kladko's avatar kladko

SKALE-3067-cleanup-sgx

parent 89734e75
...@@ -135,11 +135,16 @@ libff::alt_bn128_Fr *keyFromString(const char *_keyStringHex) { ...@@ -135,11 +135,16 @@ libff::alt_bn128_Fr *keyFromString(const char *_keyStringHex) {
int inited = 0; int inited = 0;
domain_parameters curve;
void enclave_init() { void enclave_init() {
if (inited == 1) if (inited == 1)
return; return;
inited = 1; inited = 1;
libff::init_alt_bn128_params(); libff::init_alt_bn128_params();
curve = domain_parameters_init();
domain_parameters_load_curve(curve, secp256k1);
} }
bool enclave_sign(const char *_keyString, const char *_hashXString, const char *_hashYString, bool enclave_sign(const char *_keyString, const char *_hashXString, const char *_hashYString,
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
@date 2019 @date 2019
*/ */
#include "DomainParameters.h"
#include "Signature.h"
#include "Curves.h"
#ifndef SGXWALLET_ENCLAVECOMMON_H #ifndef SGXWALLET_ENCLAVECOMMON_H
#define SGXWALLET_ENCLAVECOMMON_H #define SGXWALLET_ENCLAVECOMMON_H
...@@ -59,5 +64,7 @@ extern uint32_t globalLogLevel_; ...@@ -59,5 +64,7 @@ extern uint32_t globalLogLevel_;
extern unsigned char* globalRandom; extern unsigned char* globalRandom;
extern domain_parameters curve;
#endif //SGXWALLET_ENCLAVECOMMON_H #endif //SGXWALLET_ENCLAVECOMMON_H
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment