Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
7c69b319
Unverified
Commit
7c69b319
authored
Aug 09, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3067-cleanup-sgx
parent
6b668a32
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
147 additions
and
7 deletions
+147
-7
DKGCrypto.cpp
DKGCrypto.cpp
+2
-0
EnclaveCommon.cpp
secure_enclave/EnclaveCommon.cpp
+10
-0
EnclaveCommon.h
secure_enclave/EnclaveCommon.h
+2
-0
secure_enclave.c
secure_enclave/secure_enclave.c
+133
-7
No files found.
DKGCrypto.cpp
View file @
7c69b319
...
@@ -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
;
...
...
secure_enclave/EnclaveCommon.cpp
View file @
7c69b319
...
@@ -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
);
...
...
secure_enclave/EnclaveCommon.h
View file @
7c69b319
...
@@ -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
);
...
...
secure_enclave/secure_enclave.c
View file @
7c69b319
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment