Unverified Commit 7c69b319 authored by kladko's avatar kladko

SKALE-3067-cleanup-sgx

parent 6b668a32
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#include "third_party/spdlog/spdlog.h" #include "third_party/spdlog/spdlog.h"
#include "common.h" #include "common.h"
vector<string> splitString(const char *coeffs, const char symbol) { vector<string> splitString(const char *coeffs, const char symbol) {
string str(coeffs); string str(coeffs);
string delim; string delim;
......
...@@ -36,6 +36,16 @@ ...@@ -36,6 +36,16 @@
using namespace std; using namespace std;
thread_local uint8_t* decryptedDkgPoly1 = nullptr;
uint8_t* getThreadLocalDecryptedDkgPoly() {
if (decryptedDkgPoly1 == nullptr) {
decryptedDkgPoly1 = (uint8_t*) calloc(DKG_BUFER_LENGTH, 1);
}
return decryptedDkgPoly1;
}
string *stringFromKey(libff::alt_bn128_Fr *_key) { string *stringFromKey(libff::alt_bn128_Fr *_key) {
mpz_t t; mpz_t t;
mpz_init(t); mpz_init(t);
......
...@@ -47,6 +47,8 @@ EXTERNC void enclave_init(); ...@@ -47,6 +47,8 @@ EXTERNC void enclave_init();
void get_global_random(unsigned char* _randBuff, uint64_t size); void get_global_random(unsigned char* _randBuff, uint64_t size);
EXTERNC uint8_t* getThreadLocalDecryptedDkgPoly();
EXTERNC void LOG_INFO(const char* msg); EXTERNC void LOG_INFO(const char* msg);
EXTERNC void LOG_WARN(const char* _msg); EXTERNC void LOG_WARN(const char* _msg);
EXTERNC void LOG_ERROR(const char* _msg); EXTERNC void LOG_ERROR(const char* _msg);
......
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