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
3a9c61fd
Unverified
Commit
3a9c61fd
authored
Aug 09, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "SKALE-3067-cleanup-sgx"
This reverts commit
2b3422d0
.
parent
2b3422d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
28 deletions
+26
-28
secure_enclave.c
secure_enclave/secure_enclave.c
+2
-1
secure_enclave.edl
secure_enclave/secure_enclave.edl
+24
-27
No files found.
secure_enclave/secure_enclave.c
View file @
3a9c61fd
...
@@ -1340,7 +1340,8 @@ trustedGenDkgSecretAES(int *errStatus, char *errString, uint8_t *encrypted_dkg_s
...
@@ -1340,7 +1340,8 @@ trustedGenDkgSecretAES(int *errStatus, char *errString, uint8_t *encrypted_dkg_s
void
void
trustedDecryptDkgSecretAES
(
int
*
errStatus
,
char
*
errString
,
uint8_t
*
encrypted_dkg_secret
,
trustedDecryptDkgSecretAES
(
int
*
errStatus
,
char
*
errString
,
uint8_t
*
encrypted_dkg_secret
,
uint8_t
*
decrypted_dkg_secret
,
uint32_t
*
dec_len
)
{
uint8_t
*
decrypted_dkg_secret
,
uint32_t
*
dec_len
)
{
LOG_DEBUG
(
__FUNCTION__
);
LOG_DEBUG
(
__FUNCTION__
);
int
status
=
AES_decrypt
(
encrypted_dkg_secret
,
*
dec_len
,
(
char
*
)
decrypted_dkg_secret
);
int
status
=
AES_decrypt
(
encrypted_dkg_secret
,
*
dec_len
,
(
char
*
)
decrypted_dkg_secret
);
...
...
secure_enclave/secure_enclave.edl
View file @
3a9c61fd
...
@@ -3,9 +3,6 @@
...
@@ -3,9 +3,6 @@
#define ECDSA_ENCR_LEN 93
#define ECDSA_ENCR_LEN 93
#define ECDSA_BIN_LEN 33
#define ECDSA_BIN_LEN 33
#define SMALL_BUF_SIZE 1024
#define SMALL_BUF_SIZE 1024
#define SMALL_BUF_SIZE3 3072
#define SMALL_BUF_SIZE10 10240
#define SMALL_BUF_SIZE7 7168
enclave {
enclave {
trusted {
trusted {
...
@@ -56,32 +53,32 @@ enclave {
...
@@ -56,32 +53,32 @@ enclave {
public void trustedGenDkgSecret (
public void trustedGenDkgSecret (
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_dkg_secret,
[out, count =
3050
] uint8_t* encrypted_dkg_secret,
[out] uint32_t * enc_len,
[out] uint32_t * enc_len,
size_t _t);
size_t _t);
public void trustedDecryptDkgSecret (
public void trustedDecryptDkgSecret (
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_dkg_secret,
[in, count =
3050
] uint8_t* encrypted_dkg_secret,
[out, count =
SMALL_BUF_SIZE3
] uint8_t* decrypted_dkg_secret,
[out, count =
2490
] uint8_t* decrypted_dkg_secret,
[out] uint32_t* dec_len);
[out] uint32_t* dec_len);
public void trustedGetSecretShares (
public void trustedGetSecretShares (
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_dkg_secret,
[in, count =
3050
] uint8_t* encrypted_dkg_secret,
[out] uint32_t* dec_len,
[out] uint32_t* dec_len,
[out, count =
SMALL_BUF_SIZE3
] char* secret_shares,
[out, count =
2490
] char* secret_shares,
unsigned _t,
unsigned _t,
unsigned _n);
unsigned _n);
public void trustedGetPublicShares (
public void trustedGetPublicShares (
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_dkg_secret,
[in, count =
3050
] uint8_t* encrypted_dkg_secret,
uint32_t enc_len,
uint32_t enc_len,
[out, count =
SMALL_BUF_SIZE1
0] char* public_shares,
[out, count =
1000
0] char* public_shares,
unsigned _t,
unsigned _t,
unsigned _n);
unsigned _n);
...
@@ -98,15 +95,15 @@ enclave {
...
@@ -98,15 +95,15 @@ enclave {
public void trustedSetEncryptedDkgPoly( [out] int *errStatus,
public void trustedSetEncryptedDkgPoly( [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_poly);
[in, count =
3050
] uint8_t* encrypted_poly);
public void trustedGetEncryptedSecretShare(
public void trustedGetEncryptedSecretShare(
[out]int *errStatus,
[out]int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[out] uint32_t* dec_len,
[out] uint32_t* dec_len,
[out, count =
SMALL_BUF_SIZE
3] char* result_str,
[out, count =
19
3] char* result_str,
[out, count =
SMALL_BUF_SIZE3
] char* s_shareG2,
[out, count =
320
] char* s_shareG2,
[in, string] char* pub_keyB,
[in, string] char* pub_keyB,
uint8_t _t,
uint8_t _t,
uint8_t _n,
uint8_t _n,
...
@@ -137,14 +134,14 @@ enclave {
...
@@ -137,14 +134,14 @@ enclave {
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
uint64_t key_len,
[out, count =
SMALL_BUF_SIZE
] char* bls_pub_key);
[out, count =
320
] char* bls_pub_key);
public void trustedComplaintResponse(
public void trustedComplaintResponse(
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE
] uint8_t *encrypted_dkg_secret,
[in, count =
3050
] uint8_t *encrypted_dkg_secret,
[out] uint32_t* dec_len,
[out] uint32_t* dec_len,
[out, count =
SMALL_BUF_SIZE
] char* s_shareG2,
[out, count =
320
] char* s_shareG2,
uint8_t _t,
uint8_t _t,
uint8_t _n,
uint8_t _n,
uint8_t ind1);
uint8_t ind1);
...
@@ -154,7 +151,7 @@ enclave {
...
@@ -154,7 +151,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
[out] uint32_t *enc_len,
[out] uint32_t *enc_len,
[out, count =
SMALL_BUF_SIZE
] char* hex_SEK);
[out, count =
65
] char* hex_SEK);
public void trustedSetSEK(
public void trustedSetSEK(
[out] int *errStatus,
[out] int *errStatus,
...
@@ -213,20 +210,20 @@ enclave {
...
@@ -213,20 +210,20 @@ enclave {
public void trustedGenDkgSecretAES (
public void trustedGenDkgSecretAES (
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_dkg_secret,
[out, count =
3050
] uint8_t* encrypted_dkg_secret,
[out] uint32_t * enc_len, size_t _t);
[out] uint32_t * enc_len, size_t _t);
public void trustedDecryptDkgSecretAES (
public void trustedDecryptDkgSecretAES (
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_dkg_secret,
[in, count =
3050
] uint8_t* encrypted_dkg_secret,
[out, count =
SMALL_BUF_SIZE3
] uint8_t* decrypted_dkg_secret,
[out, count =
2490
] uint8_t* decrypted_dkg_secret,
[user_check] uint32_t* dec_len);
[user_check] uint32_t* dec_len);
public void trustedSetEncryptedDkgPolyAES(
public void trustedSetEncryptedDkgPolyAES(
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_poly,
[in, count =
3050
] uint8_t* encrypted_poly,
[out] uint64_t* enc_len);
[out] uint64_t* enc_len);
public void trustedGetEncryptedSecretShareAES(
public void trustedGetEncryptedSecretShareAES(
...
@@ -234,8 +231,8 @@ enclave {
...
@@ -234,8 +231,8 @@ enclave {
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[out] uint32_t* dec_len,
[out] uint32_t* dec_len,
[out, count =
SMALL_BUF_SIZE
] char* result_str,
[out, count =
193
] char* result_str,
[out, count =
SMALL_BUF_SIZE
] char* s_shareG2,
[out, count =
320
] char* s_shareG2,
[in, string] char* pub_keyB,
[in, string] char* pub_keyB,
uint8_t _t,
uint8_t _t,
uint8_t _n,
uint8_t _n,
...
@@ -244,9 +241,9 @@ enclave {
...
@@ -244,9 +241,9 @@ enclave {
public void trustedGetPublicSharesAES(
public void trustedGetPublicSharesAES(
[out] int *errStatus,
[out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE3
] uint8_t* encrypted_dkg_secret,
[in, count =
3050
] uint8_t* encrypted_dkg_secret,
uint32_t enc_len,
uint32_t enc_len,
[out, count =
SMALL_BUF_SIZE1
0] char* public_shares,
[out, count =
1000
0] char* public_shares,
unsigned _t,
unsigned _t,
unsigned _n);
unsigned _n);
...
@@ -264,7 +261,7 @@ enclave {
...
@@ -264,7 +261,7 @@ enclave {
public void trustedCreateBlsKeyAES(
public void trustedCreateBlsKeyAES(
[out]int *errStatus,
[out]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count =
SMALL_BUF_SIZE7
] const char* s_shares,
[in, count =
6145
] const char* s_shares,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
uint64_t key_len,
[out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key,
[out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key,
...
@@ -284,7 +281,7 @@ enclave {
...
@@ -284,7 +281,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
uint64_t key_len,
[out, count =
SMALL_BUF_SIZE
] char* bls_pub_key);
[out, count =
320
] char* bls_pub_key);
};
};
untrusted {
untrusted {
...
...
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