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
9f4d903b
Unverified
Commit
9f4d903b
authored
Aug 02, 2021
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-4411 add format check
parent
baac2f5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
SGXWalletServer.cpp
SGXWalletServer.cpp
+4
-0
TEUtils.cpp
secure_enclave/TEUtils.cpp
+3
-3
sgxwallet_common.h
sgxwallet_common.h
+1
-0
No files found.
SGXWalletServer.cpp
View file @
9f4d903b
...
...
@@ -994,6 +994,10 @@ Json::Value SGXWalletServer::getDecryptionShareImpl(const std::string& blsKeyNam
throw
SGXException
(
BLS_SIGN_INVALID_KS_NAME
,
string
(
__FUNCTION__
)
+
":Invalid BLSKey name"
);
}
if
(
publicDecryptionValue
.
length
()
<
7
||
publicDecryptionValue
.
length
()
>
78
*
4
)
{
throw
SGXException
(
INVALID_DECRYPTION_VALUE_FORMAT
,
string
(
__FUNCTION__
)
+
":Invalid publicDecryptionValue format"
);
}
shared_ptr
<
string
>
encryptedKeyHex_ptr
=
readFromDb
(
blsKeyName
);
vector
<
string
>
decryptionValueVector
=
calculateDecryptionShare
(
encryptedKeyHex_ptr
->
c_str
(),
publicDecryptionValue
);
...
...
secure_enclave/TEUtils.cpp
View file @
9f4d903b
...
...
@@ -111,12 +111,12 @@ std::string ConvertG2ElementToString(const libff::alt_bn128_G2 &elem, int base =
return
result
;
}
std
::
vector
<
libff
::
alt_bn128_Fq
>
SplitStringToFq
(
const
char
*
co
eff
s
,
const
char
symbol
)
{
std
::
vector
<
libff
::
alt_bn128_Fq
>
SplitStringToFq
(
const
char
*
co
ord
s
,
const
char
symbol
)
{
std
::
vector
<
libff
::
alt_bn128_Fq
>
result
;
std
::
string
str
(
co
eff
s
);
std
::
string
str
(
co
ord
s
);
std
::
string
delim
;
CHECK_ARG_CLEAN
(
co
eff
s
);
CHECK_ARG_CLEAN
(
co
ord
s
);
try
{
...
...
sgxwallet_common.h
View file @
9f4d903b
...
...
@@ -184,6 +184,7 @@ extern bool autoconfirm;
#define SGX_SERVER_FAILED_TO_START -111
#define CORRUPT_DATABASE -112
#define INVALID_SEK -113
#define INVALID_DECRYPTION_VALUE_FORMAT -114
#define SGX_ENCLAVE_ERROR -666
...
...
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