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
ff80f1cc
Unverified
Commit
ff80f1cc
authored
Dec 11, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3023 remove unused code
parent
1c3468d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
30 deletions
+0
-30
BLSCrypto.cpp
BLSCrypto.cpp
+0
-30
No files found.
BLSCrypto.cpp
View file @
ff80f1cc
...
...
@@ -129,36 +129,6 @@ bool hex2carray(const char *_hex, uint64_t *_bin_len,
return
true
;
}
bool
sign
(
const
char
*
_encryptedKeyHex
,
const
char
*
_hashHex
,
size_t
_t
,
size_t
_n
,
size_t
_signerIndex
,
char
*
_sig
)
{
CHECK_STATE
(
_encryptedKeyHex
);
CHECK_STATE
(
_hashHex
);
CHECK_STATE
(
_sig
);
auto
keyStr
=
make_shared
<
string
>
(
_encryptedKeyHex
);
auto
hash
=
make_shared
<
array
<
uint8_t
,
32
>>
();
uint64_t
binLen
;
if
(
!
hex2carray
(
_hashHex
,
&
binLen
,
hash
->
data
(),
hash
->
size
()))
{
throw
SGXException
(
INVALID_HEX
,
"Invalid hash"
);
}
auto
keyShare
=
make_shared
<
BLSPrivateKeyShareSGX
>
(
keyStr
,
_t
,
_n
);
auto
sigShare
=
keyShare
->
signWithHelperSGX
(
hash
,
_signerIndex
);
auto
sigShareStr
=
sigShare
->
toString
();
strncpy
(
_sig
,
sigShareStr
->
c_str
(),
BUF_LEN
);
return
true
;
}
bool
sign_aes
(
const
char
*
_encryptedKeyHex
,
const
char
*
_hashHex
,
size_t
_t
,
size_t
_n
,
char
*
_sig
)
{
CHECK_STATE
(
_encryptedKeyHex
);
...
...
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