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
90460056
Unverified
Commit
90460056
authored
Nov 09, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3430-add-new-ecdsa
parent
18a40039
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
DKGCrypto.cpp
DKGCrypto.cpp
+3
-5
secure_enclave.c
secure_enclave/secure_enclave.c
+10
-1
secure_enclave.edl
secure_enclave/secure_enclave.edl
+2
-6
No files found.
DKGCrypto.cpp
View file @
90460056
...
...
@@ -238,10 +238,6 @@ getSecretShares(const string &_polyName, const char *_encryptedPolyHex, const ve
READ_LOCK
(
sgxInitMutex
);
status
=
trustedSetEncryptedDkgPoly
(
eid
,
&
errStatus
,
errMsg1
.
data
(),
encrDKGPoly
.
data
(),
encLen
);
HANDLE_TRUSTED_FUNCTION_ERROR
(
status
,
errStatus
,
errMsg1
.
data
());
string
result
;
for
(
int
i
=
0
;
i
<
_n
;
i
++
)
{
...
...
@@ -259,7 +255,9 @@ getSecretShares(const string &_polyName, const char *_encryptedPolyHex, const ve
spdlog
::
debug
(
"pubKeyB is {}"
,
pub_keyB
);
sgx_status_t
status
=
SGX_SUCCESS
;
status
=
trustedGetEncryptedSecretShare
(
eid
,
&
errStatus
,
errMsg1
.
data
(),
encryptedSkey
.
data
(),
&
decLen
,
status
=
trustedGetEncryptedSecretShare
(
eid
,
&
errStatus
,
encrDKGPoly
.
data
(),
encLen
,
errMsg1
.
data
(),
encryptedSkey
.
data
(),
&
decLen
,
currentShare
.
data
(),
sShareG2
.
data
(),
pubKeyB
.
data
(),
_t
,
_n
,
i
+
1
);
...
...
secure_enclave/secure_enclave.c
View file @
90460056
...
...
@@ -847,10 +847,14 @@ void trustedSetEncryptedDkgPoly(int *errStatus, char *errString, uint8_t *encryp
LOG_INFO
(
"SGX call completed"
);
}
void
trustedGetEncryptedSecretShare
(
int
*
errStatus
,
char
*
errString
,
uint8_t
*
encrypted_skey
,
uint64_t
*
dec_len
,
void
trustedGetEncryptedSecretShare
(
int
*
errStatus
,
char
*
errString
,
uint8_t
*
_encrypted_poly
,
uint64_t
_enc_len
,
uint8_t
*
encrypted_skey
,
uint64_t
*
dec_len
,
char
*
result_str
,
char
*
s_shareG2
,
char
*
pub_keyB
,
uint8_t
_t
,
uint8_t
_n
,
uint8_t
ind
)
{
LOG_INFO
(
__FUNCTION__
);
INIT_ERROR_STATE
...
...
@@ -864,6 +868,11 @@ void trustedGetEncryptedSecretShare(int *errStatus, char *errString, uint8_t *en
LOG_DEBUG
(
__FUNCTION__
);
trustedSetEncryptedDkgPoly
(
errStatus
,
errString
,
_encrypted_poly
,
_enc_len
);
CHECK_STATUS2
(
"trustedSetEncryptedDkgPoly failed with status %d "
);
SAFE_CHAR_BUF
(
skey
,
BUF_LEN
);
SAFE_CHAR_BUF
(
pub_key_x
,
BUF_LEN
);
SAFE_CHAR_BUF
(
pub_key_y
,
BUF_LEN
);
...
...
secure_enclave/secure_enclave.edl
View file @
90460056
...
...
@@ -88,15 +88,11 @@ enclave {
[out, count = 3072] uint8_t* decrypted_dkg_secret
);
public void trustedSetEncryptedDkgPoly(
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_poly,
uint64_t enc_len);
public void trustedGetEncryptedSecretShare(
[out]int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[in, count = 3050] uint8_t* encrypted_poly,
uint64_t enc_len,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[out] uint64_t* dec_len,
[out, count = 193] char* result_str,
...
...
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