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
b95ab32d
Unverified
Commit
b95ab32d
authored
Aug 13, 2020
by
Stan Kladko
Committed by
GitHub
Aug 13, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #140 from skalenetwork/SKALE-3067-cleanip2
Skale 3067 cleanip2
parents
0637814a
b000e648
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
1232 deletions
+38
-1232
BLSPrivateKeyShareSGX.cpp
BLSPrivateKeyShareSGX.cpp
+1
-1
Log.h
Log.h
+1
-1
secure_enclave.c
secure_enclave/secure_enclave.c
+0
-844
secure_enclave.edl
secure_enclave/secure_enclave.edl
+0
-135
testw.cpp
testw.cpp
+36
-251
No files found.
BLSPrivateKeyShareSGX.cpp
View file @
b95ab32d
...
...
@@ -151,7 +151,7 @@ std::string BLSPrivateKeyShareSGX::signWithHelperSGXstr(
cerr
<<
"Key is "
+
*
encryptedKeyHex
<<
endl
;
sgx_status_t
status
=
trustedBlsSignMessage
(
eid
,
&
errStatus
,
errMsg
,
encryptedKey
,
trustedBlsSignMessage
AES
(
eid
,
&
errStatus
,
errMsg
,
encryptedKey
,
encryptedKeyHex
->
size
()
/
2
,
xStrArg
,
yStrArg
,
signature
);
printf
(
"sig is: %s
\n
"
,
signature
);
...
...
Log.h
View file @
b95ab32d
...
...
@@ -79,7 +79,7 @@ public:
#define HANDLE_SGX_EXCEPTION(__RESULT__) \
catch (SGXException& _e) { \
__RESULT__["status"] = _e.status
; \
if (_e.status != 0) {__RESULT__["status"] = _e.status;} else { __RESULT__["status"] = UNKNOWN_ERROR;}
; \
__RESULT__["errorMessage"] = _e.errString; \
return __RESULT__; \
} catch (exception& _e) { \
...
...
secure_enclave/secure_enclave.c
View file @
b95ab32d
This diff is collapsed.
Click to expand it.
secure_enclave/secure_enclave.edl
View file @
b95ab32d
...
...
@@ -11,141 +11,6 @@ enclave {
public void trustedEnclaveInit(uint32_t _logLevel);
public void trustedGenerateEcdsaKey (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[out] uint32_t *enc_len,
[out, count = SMALL_BUF_SIZE] char * pub_key_x,
[out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedGetPublicEcdsaKey (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t dec_len,
[out, count = SMALL_BUF_SIZE] char * pub_key_x,
[out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedEncryptKey (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] const char* key,
[out, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[out] uint32_t *enc_len);
public void trustedDecryptKey (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len,
[out, count = SMALL_BUF_SIZE] char* key );
public void trustedBlsSignMessage (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len,
[in, string] char* hashX ,
[in, string] char* hashY ,
[out, count = SMALL_BUF_SIZE] char* signature);
public void trustedGenDkgSecret (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = 3050] uint8_t* encrypted_dkg_secret,
[out] uint32_t * enc_len,
size_t _t);
public void trustedDecryptDkgSecret (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
[out, count = 2490] uint8_t* decrypted_dkg_secret,
[out] uint32_t* dec_len);
public void trustedGetSecretShares (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
[out] uint32_t* dec_len,
[out, count = 2490] char* secret_shares,
unsigned _t,
unsigned _n);
public void trustedGetPublicShares (
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
uint32_t enc_len,
[out, count = 10000] char* public_shares,
unsigned _t,
unsigned _n);
public void trustedEcdsaSign(
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len,
[in, string] unsigned char* hash,
[out, count = SMALL_BUF_SIZE] char* sig_r,
[out, count = SMALL_BUF_SIZE] char* sig_s,
[out] uint8_t* sig_v,
int base);
public void trustedSetEncryptedDkgPoly( [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_poly);
public void trustedGetEncryptedSecretShare(
[out]int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[out] uint32_t* dec_len,
[out, count = 193] char* result_str,
[out, count = 320] char* s_shareG2,
[in, string] char* pub_keyB,
uint8_t _t,
uint8_t _n,
uint8_t ind);
public void trustedDkgVerify(
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, string] const char* public_shares,
[in, string] const char* s_share,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
unsigned _t,
int _ind,
[out] int* result);
public void trustedCreateBlsKey(
[out]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, string] const char* s_shares,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
[out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key,
[out] uint32_t *enc_bls_key_len);
public void trustedGetBlsPubKey(
[out]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
[out, count = 320] char* bls_pub_key);
public void trustedComplaintResponse(
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t *encrypted_dkg_secret,
[out] uint32_t* dec_len,
[out, count = 320] char* s_shareG2,
uint8_t _t,
uint8_t _n,
uint8_t ind1);
public void trustedGenerateSEK(
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
...
...
testw.cpp
View file @
b95ab32d
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