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
e97a9fc5
Unverified
Commit
e97a9fc5
authored
Apr 17, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2454-add-logs-to-enclave
parent
09386fd2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
ECDSACrypto.cpp
ECDSACrypto.cpp
+1
-1
secure_enclave.c
secure_enclave/secure_enclave.c
+2
-2
secure_enclave.edl
secure_enclave/secure_enclave.edl
+3
-3
secure_enclave.i
secure_enclave/secure_enclave.i
+2
-2
No files found.
ECDSACrypto.cpp
View file @
e97a9fc5
...
@@ -159,7 +159,7 @@ vector<string> ecdsaSignHash(const char *encryptedKeyHex, const char *hashHex, i
...
@@ -159,7 +159,7 @@ vector<string> ecdsaSignHash(const char *encryptedKeyHex, const char *hashHex, i
status
=
ecdsa_sign1
(
eid
,
&
err_status
,
errMsg
,
encr_key
,
ECDSA_ENCR_LEN
,
(
unsigned
char
*
)
hashHex
,
signature_r
,
status
=
ecdsa_sign1
(
eid
,
&
err_status
,
errMsg
,
encr_key
,
ECDSA_ENCR_LEN
,
(
unsigned
char
*
)
hashHex
,
signature_r
,
signature_s
,
&
signature_v
,
base
);
signature_s
,
&
signature_v
,
base
);
else
else
status
=
ecdsa_sign_aes
(
eid
,
&
err_status
,
errMsg
,
encr_key
,
dec_len
,
(
unsigned
char
*
)
hashHex
,
signature_r
,
status
=
trustedEcdsaSignAES
(
eid
,
&
err_status
,
errMsg
,
encr_key
,
dec_len
,
(
unsigned
char
*
)
hashHex
,
signature_r
,
signature_s
,
&
signature_v
,
base
);
signature_s
,
&
signature_v
,
base
);
if
(
err_status
!=
0
)
{
if
(
err_status
!=
0
)
{
throw
SGXException
(
-
666
,
errMsg
);
throw
SGXException
(
-
666
,
errMsg
);
...
...
secure_enclave/secure_enclave.c
View file @
e97a9fc5
...
@@ -273,7 +273,7 @@ void trustedGetPublicEcdsaKey(int *err_status, char *err_string,
...
@@ -273,7 +273,7 @@ void trustedGetPublicEcdsaKey(int *err_status, char *err_string,
point_clear
(
Pkey
);
point_clear
(
Pkey
);
}
}
void
ecdsa_sign1
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
dec_len
,
void
trustedEcdsaSign
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
dec_len
,
unsigned
char
*
hash
,
char
*
sig_r
,
char
*
sig_s
,
uint8_t
*
sig_v
,
int
base
)
{
unsigned
char
*
hash
,
char
*
sig_r
,
char
*
sig_s
,
uint8_t
*
sig_v
,
int
base
)
{
char
*
arr_m
=
NULL
;
char
*
arr_m
=
NULL
;
...
@@ -1140,7 +1140,7 @@ void trustedGetPublicEcdsaKey_aes(int *err_status, char *err_string,
...
@@ -1140,7 +1140,7 @@ void trustedGetPublicEcdsaKey_aes(int *err_status, char *err_string,
point_clear
(
Pkey
);
point_clear
(
Pkey
);
}
}
void
ecdsa_sign_aes
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
enc_len
,
void
trustedEcdsaSignAES
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
enc_len
,
unsigned
char
*
hash
,
char
*
sig_r
,
char
*
sig_s
,
uint8_t
*
sig_v
,
int
base
)
{
unsigned
char
*
hash
,
char
*
sig_r
,
char
*
sig_s
,
uint8_t
*
sig_v
,
int
base
)
{
domain_parameters
curve
=
domain_parameters_init
();
domain_parameters
curve
=
domain_parameters_init
();
...
...
secure_enclave/secure_enclave.edl
View file @
e97a9fc5
...
@@ -99,7 +99,7 @@ enclave {
...
@@ -99,7 +99,7 @@ enclave {
unsigned _t,
unsigned _t,
unsigned _n);
unsigned _n);
public void
ecdsa_sign1
(
public void
trustedEcdsaSign
(
[user_check] int *err_status,
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[out, count = 1024] char* err_string,
[in, count = 1024] uint8_t* encrypted_key,
[in, count = 1024] uint8_t* encrypted_key,
...
@@ -201,7 +201,7 @@ enclave {
...
@@ -201,7 +201,7 @@ enclave {
[out, count = 1024] char * pub_key_x,
[out, count = 1024] char * pub_key_x,
[out, count = 1024] char * pub_key_y);
[out, count = 1024] char * pub_key_y);
public void
ecdsa_sign_aes
(
public void
trustedEcdsaSignAES
(
[user_check] int *err_status,
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[out, count = 1024] char* err_string,
[in, count = 1024] uint8_t* encrypted_key,
[in, count = 1024] uint8_t* encrypted_key,
...
@@ -259,7 +259,7 @@ enclave {
...
@@ -259,7 +259,7 @@ enclave {
uint8_t _n,
uint8_t _n,
uint8_t ind);
uint8_t ind);
public void trustedGetPublicShares_aes
(
public void trustedGetPublicShares_aes(
[user_check] int *err_status,
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[out, count = 1024] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
...
...
secure_enclave/secure_enclave.i
View file @
e97a9fc5
...
@@ -5476,7 +5476,7 @@ void trustedGenDkgSecret(int* err_status, char* err_string, uint8_t* encrypted_d
...
@@ -5476,7 +5476,7 @@ void trustedGenDkgSecret(int* err_status, char* err_string, uint8_t* encrypted_d
void trustedDecryptDkgSecret(int* err_status, char* err_string, uint8_t* encrypted_dkg_secret, uint8_t* decrypted_dkg_secret, uint32_t enc_len);
void trustedDecryptDkgSecret(int* err_status, char* err_string, uint8_t* encrypted_dkg_secret, uint8_t* decrypted_dkg_secret, uint32_t enc_len);
void trustedGetSecretShares(int* err_status, char* err_string, uint8_t* decrypted_dkg_secret, uint32_t enc_len, char* secret_shares, unsigned int _t, unsigned int _n);
void trustedGetSecretShares(int* err_status, char* err_string, uint8_t* decrypted_dkg_secret, uint32_t enc_len, char* secret_shares, unsigned int _t, unsigned int _n);
void trustedGetPublicShares(int* err_status, char* err_string, uint8_t* decrypted_dkg_secret, uint32_t enc_len, char* public_shares, unsigned int _t, unsigned int _n);
void trustedGetPublicShares(int* err_status, char* err_string, uint8_t* decrypted_dkg_secret, uint32_t enc_len, char* public_shares, unsigned int _t, unsigned int _n);
void
ecdsa_sign1
(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t dec_len, unsigned char* hash, char* signature, int test_len);
void
trustedEcdsaSign
(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t dec_len, unsigned char* hash, char* signature, int test_len);
sgx_status_t oc_realloc(uint64_t* retval, void* optr, size_t osz, size_t nsz);
sgx_status_t oc_realloc(uint64_t* retval, void* optr, size_t osz, size_t nsz);
sgx_status_t oc_free(void* optr, size_t sz);
sgx_status_t oc_free(void* optr, size_t sz);
...
@@ -6940,7 +6940,7 @@ struct signature_s
...
@@ -6940,7 +6940,7 @@ struct signature_s
mpz_t s;
mpz_t s;
};
};
void
ecdsa_sign1
(int *err_status, char *err_string, uint8_t *encrypted_key,
void
trustedEcdsaSign
(int *err_status, char *err_string, uint8_t *encrypted_key,
uint32_t dec_len, unsigned char* hash, char * signature, int test_len) {
uint32_t dec_len, unsigned char* hash, char * signature, int test_len) {
domain_parameters curve = domain_parameters_init();
domain_parameters curve = domain_parameters_init();
...
...
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