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
97e978ba
Unverified
Commit
97e978ba
authored
May 25, 2021
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-4096 add more logs
parent
416359cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
DKGCrypto.cpp
DKGCrypto.cpp
+0
-1
DKGUtils.cpp
secure_enclave/DKGUtils.cpp
+1
-1
secure_enclave.c
secure_enclave/secure_enclave.c
+5
-5
No files found.
DKGCrypto.cpp
View file @
97e978ba
...
@@ -532,7 +532,6 @@ vector <string> calculateAllBlsPublicKeys(const vector <string> &public_shares)
...
@@ -532,7 +532,6 @@ vector <string> calculateAllBlsPublicKeys(const vector <string> &public_shares)
public_share
.
Z
=
libff
::
alt_bn128_Fq2
::
one
();
public_share
.
Z
=
libff
::
alt_bn128_Fq2
::
one
();
public_values
[
j
]
=
public_values
[
j
]
+
public_share
;
public_values
[
j
]
=
public_values
[
j
]
+
public_share
;
}
}
}
}
...
...
secure_enclave/DKGUtils.cpp
View file @
97e978ba
...
@@ -392,7 +392,7 @@ int calc_public_shares(const char *decrypted_coeffs, char *public_shares,
...
@@ -392,7 +392,7 @@ int calc_public_shares(const char *decrypted_coeffs, char *public_shares,
ret
=
1
;
ret
=
1
;
}
catch
(...)
{
}
catch
(...)
{
LOG_ERROR
(
"Unknown throwable"
);
LOG_ERROR
(
"Unknown throwable"
);
ret
=
1
;
ret
=
2
;
}
}
clean
:
clean
:
...
...
secure_enclave/secure_enclave.c
View file @
97e978ba
...
@@ -316,9 +316,11 @@ void trustedSetSEK(int *errStatus, char *errString, uint8_t *encrypted_sek) {
...
@@ -316,9 +316,11 @@ void trustedSetSEK(int *errStatus, char *errString, uint8_t *encrypted_sek) {
(
uint8_t
*
)
aes_key_hex
,
&
dec_len
);
(
uint8_t
*
)
aes_key_hex
,
&
dec_len
);
if
(
status
==
0x3001
)
{
if
(
status
==
0x3001
)
{
LOG_ERROR
(
"Could not decrypt LevelDB storage!
\n
"
const
char
errorMessage
[]
=
"Could not decrypt LevelDB storage!
\n
"
"If you upgraded sgxwallet software or if you are restoring from backup, please run sgxwallet with -b flag and "
"If you upgraded sgxwallet software or if you are restoring from backup, please run sgxwallet with -b flag and "
"pass your backup key."
);
"pass your backup key."
;
snprintf
(
errString
,
BUF_LEN
,
errorMessage
);
LOG_ERROR
(
errorMessage
);
}
}
CHECK_STATUS2
(
"sgx unseal SEK failed with status %d"
);
CHECK_STATUS2
(
"sgx unseal SEK failed with status %d"
);
...
@@ -360,8 +362,6 @@ void trustedSetSEKBackup(int *errStatus, char *errString,
...
@@ -360,8 +362,6 @@ void trustedSetSEKBackup(int *errStatus, char *errString,
LOG_INFO
(
"SGX call completed"
);
LOG_INFO
(
"SGX call completed"
);
}
}
void
trustedGenerateEcdsaKey
(
int
*
errStatus
,
char
*
errString
,
void
trustedGenerateEcdsaKey
(
int
*
errStatus
,
char
*
errString
,
uint8_t
*
encryptedPrivateKey
,
uint64_t
*
enc_len
,
char
*
pub_key_x
,
char
*
pub_key_y
)
{
uint8_t
*
encryptedPrivateKey
,
uint64_t
*
enc_len
,
char
*
pub_key_x
,
char
*
pub_key_y
)
{
LOG_INFO
(
__FUNCTION__
);
LOG_INFO
(
__FUNCTION__
);
...
@@ -1006,7 +1006,7 @@ void trustedGetPublicShares(int *errStatus, char *errString, uint8_t *encrypted_
...
@@ -1006,7 +1006,7 @@ void trustedGetPublicShares(int *errStatus, char *errString, uint8_t *encrypted_
CHECK_STATUS2
(
"aes decrypt data - encrypted_dkg_secret failed with status %d"
);
CHECK_STATUS2
(
"aes decrypt data - encrypted_dkg_secret failed with status %d"
);
status
=
calc_public_shares
(
decrypted_dkg_secret
,
public_shares
,
_t
)
!=
0
;
status
=
calc_public_shares
(
decrypted_dkg_secret
,
public_shares
,
_t
);
CHECK_STATUS
(
"t does not match polynomial in db"
);
CHECK_STATUS
(
"t does not match polynomial in db"
);
SET_SUCCESS
SET_SUCCESS
...
...
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