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
24667d66
Unverified
Commit
24667d66
authored
Sep 08, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3205
parent
178b5ed5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
ECDSACrypto.cpp
ECDSACrypto.cpp
+7
-9
sgxwallet_common.h
sgxwallet_common.h
+1
-1
No files found.
ECDSACrypto.cpp
View file @
24667d66
...
...
@@ -38,6 +38,7 @@
#include "BLSCrypto.h"
#include "SEKManager.h"
#include "ECDSACrypto.h"
void
fillRandomBuffer
(
vector
<
unsigned
char
>
&
_buffer
)
{
...
...
@@ -58,12 +59,11 @@ vector <string> genECDSAKey() {
sgx_status_t
status
=
SGX_SUCCESS
;
{
READ_LOCK
(
initMutex
);
RESTART_BEGIN
status
=
trustedGenerateEcdsaKeyAES
(
eid
,
&
errStatus
,
errMsg
.
data
(),
encr_pr_key
.
data
(),
&
enc_len
,
pub_key_x
.
data
(),
pub_key_y
.
data
());
}
RESTART_END
HANDLE_TRUSTED_FUNCTION_ERROR
(
status
,
errStatus
,
errMsg
.
data
());
...
...
@@ -106,11 +106,10 @@ string getECDSAPubKey(const std::string& _encryptedKeyHex) {
sgx_status_t
status
=
SGX_SUCCESS
;
{
READ_LOCK
(
initMutex
);
RESTART_BEGIN
status
=
trustedGetPublicEcdsaKeyAES
(
eid
,
&
errStatus
,
errMsg
.
data
(),
encrPrKey
.
data
(),
enc_len
,
pubKeyX
.
data
(),
pubKeyY
.
data
());
}
RESTART_END
HANDLE_TRUSTED_FUNCTION_ERROR
(
status
,
errStatus
,
errMsg
.
data
())
...
...
@@ -196,13 +195,12 @@ vector <string> ecdsaSignHash(const std::string& encryptedKeyHex, const char *ha
sgx_status_t
status
=
SGX_SUCCESS
;
{
READ_LOCK
(
initMutex
);
RESTART_BEGIN
status
=
trustedEcdsaSignAES
(
eid
,
&
errStatus
,
errMsg
.
data
(),
encryptedKey
.
data
(),
decLen
,
hashHex
,
signatureR
.
data
(),
signatureS
.
data
(),
&
signatureV
,
base
);
}
RESTART_END
HANDLE_TRUSTED_FUNCTION_ERROR
(
status
,
errStatus
,
errMsg
.
data
());
...
...
sgxwallet_common.h
View file @
24667d66
...
...
@@ -124,7 +124,7 @@ spdlog::error(__FUNCTION__); \
spdlog::error("Restarting sgx ..."); \
reinitEnclave(); \
} \
} while (__ATTEMPTS__ < 2);
} while (
status != SGX_SUCCESS &&
__ATTEMPTS__ < 2);
...
...
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