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
92a55785
Unverified
Commit
92a55785
authored
Jun 17, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2748 fix verifying ecdsa signature
parent
36ad7ae1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ECDSACrypto.cpp
ECDSACrypto.cpp
+3
-3
No files found.
ECDSACrypto.cpp
View file @
92a55785
...
...
@@ -131,7 +131,7 @@ string getECDSAPubKey(const char *_encryptedKeyHex) {
}
bool
verifyECDSASig
(
string
&
pubKeyStr
,
const
char
*
hashHex
,
const
char
*
signatureR
,
const
char
*
signatureS
)
{
const
char
*
signatureS
,
int
base
)
{
bool
result
=
false
;
signature
sig
=
signature_init
();
...
...
@@ -149,7 +149,7 @@ bool verifyECDSASig(string& pubKeyStr, const char *hashHex, const char *signatur
goto
clean
;
}
if
(
signature_set_str
(
sig
,
signatureR
,
signatureS
,
16
)
!=
0
)
{
if
(
signature_set_str
(
sig
,
signatureR
,
signatureS
,
base
)
!=
0
)
{
spdlog
::
error
(
"Failed to set str signature"
);
goto
clean
;
}
...
...
@@ -220,7 +220,7 @@ vector <string> ecdsaSignHash(const char *encryptedKeyHex, const char *hashHex,
/* Now verify signature */
if
(
!
verifyECDSASig
(
pubKeyStr
,
hashHex
,
signatureR
.
data
(),
signatureS
.
data
()))
{
if
(
!
verifyECDSASig
(
pubKeyStr
,
hashHex
,
signatureR
.
data
(),
signatureS
.
data
()
,
base
))
{
exception
=
make_shared
<
SGXException
>
(
667
,
"ECDSA did not verify"
);
goto
clean
;
}
...
...
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