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
e3b7a60c
Unverified
Commit
e3b7a60c
authored
Sep 09, 2019
by
kladkogex
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes
parent
f0b1f121
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
8 deletions
+9
-8
BLSCrypto.cpp
BLSCrypto.cpp
+0
-2
BLSPrivateKeyShareSGX.cpp
BLSPrivateKeyShareSGX.cpp
+2
-0
CMakeLists.txt
CMakeLists.txt
+2
-2
BLSEnclave.cpp
secure_enclave/BLSEnclave.cpp
+1
-1
BLSEnclave.h
secure_enclave/BLSEnclave.h
+1
-1
secure_enclave.c
secure_enclave/secure_enclave.c
+3
-2
No files found.
BLSCrypto.cpp
View file @
e3b7a60c
...
@@ -98,8 +98,6 @@ bool sign(const char* _encryptedKeyHex, const char* _hashHex, size_t _t, size_t
...
@@ -98,8 +98,6 @@ bool sign(const char* _encryptedKeyHex, const char* _hashHex, size_t _t, size_t
hex2carray
(
_hashHex
,
&
binLen
,
hash
->
data
());
hex2carray
(
_hashHex
,
&
binLen
,
hash
->
data
());
auto
keyShare
=
std
::
make_shared
<
BLSPrivateKeyShareSGX
>
(
keyStr
,
_t
,
_n
);
auto
keyShare
=
std
::
make_shared
<
BLSPrivateKeyShareSGX
>
(
keyStr
,
_t
,
_n
);
auto
sigShare
=
keyShare
->
signWithHelperSGX
(
hash
,
_signerIndex
);
auto
sigShare
=
keyShare
->
signWithHelperSGX
(
hash
,
_signerIndex
);
...
...
BLSPrivateKeyShareSGX.cpp
View file @
e3b7a60c
...
@@ -159,6 +159,8 @@ std::shared_ptr<BLSSigShare> BLSPrivateKeyShareSGX::signWithHelperSGX(
...
@@ -159,6 +159,8 @@ std::shared_ptr<BLSSigShare> BLSPrivateKeyShareSGX::signWithHelperSGX(
BOOST_THROW_EXCEPTION
(
std
::
invalid_argument
(
"Invalid hex encrypted key"
));
BOOST_THROW_EXCEPTION
(
std
::
invalid_argument
(
"Invalid hex encrypted key"
));
}
}
cerr
<<
"Key is "
+
*
encryptedKeyHex
<<
endl
;
sgx_status_t
status
=
sgx_status_t
status
=
bls_sign_message
(
eid
,
&
errStatus
,
errMsg
,
encryptedKey
,
bls_sign_message
(
eid
,
&
errStatus
,
errMsg
,
encryptedKey
,
encryptedKeyHex
->
size
()
/
2
,
xStrArg
,
yStrArg
,
signature
);
encryptedKeyHex
->
size
()
/
2
,
xStrArg
,
yStrArg
,
signature
);
...
...
CMakeLists.txt
View file @
e3b7a60c
...
@@ -99,8 +99,8 @@ add_custom_target(sgxd COMMAND make all
...
@@ -99,8 +99,8 @@ add_custom_target(sgxd COMMAND make all
libff/libff/common/utils.cpp
libff/libff/common/utils.cpp
libff/libff/common/utils.hpp
libff/libff/common/utils.hpp
libff/libff/common/utils.tcc
libff/libff/common/utils.tcc
secure_enclave/BLS
Utils
.cpp
secure_enclave/BLS
Enclave
.cpp
secure_enclave/BLS
Utils
.h
secure_enclave/BLS
Enclave
.h
secure_enclave/secure_enclave.c
secure_enclave/secure_enclave.c
secure_enclave/secure_enclave_t.c
secure_enclave/secure_enclave_t.c
secure_enclave/secure_enclave_t.h
secure_enclave/secure_enclave_t.h
...
...
secure_enclave/BLSEnclave.cpp
View file @
e3b7a60c
...
@@ -125,7 +125,7 @@ void checkKey(int *err_status, char *err_string, const char *_keyString) {
...
@@ -125,7 +125,7 @@ void checkKey(int *err_status, char *err_string, const char *_keyString) {
}
}
bool
sign
(
const
char
*
_keyString
,
const
char
*
_hashXString
,
const
char
*
_hashYString
,
bool
enclave_
sign
(
const
char
*
_keyString
,
const
char
*
_hashXString
,
const
char
*
_hashYString
,
char
sig
[
BUF_LEN
])
{
char
sig
[
BUF_LEN
])
{
...
...
secure_enclave/BLSEnclave.h
View file @
e3b7a60c
...
@@ -19,7 +19,7 @@ EXTERNC void check_key(int *err_status, char *err_string, const char* _keyString
...
@@ -19,7 +19,7 @@ EXTERNC void check_key(int *err_status, char *err_string, const char* _keyString
EXTERNC
bool
sign
(
const
char
*
_keyString
,
const
char
*
_hashXString
,
const
char
*
_hashYString
,
EXTERNC
bool
enclave_
sign
(
const
char
*
_keyString
,
const
char
*
_hashXString
,
const
char
*
_hashYString
,
char
*
_sig
);
char
*
_sig
);
...
...
secure_enclave/secure_enclave.c
View file @
e3b7a60c
...
@@ -242,8 +242,9 @@ void bls_sign_message(int *err_status, char *err_string, uint8_t *encrypted_key,
...
@@ -242,8 +242,9 @@ void bls_sign_message(int *err_status, char *err_string, uint8_t *encrypted_key,
char
*
_hashY
,
char
*
signature
)
{
char
*
_hashY
,
char
*
signature
)
{
char
key
[
BUF_LEN
];
char
key
[
BUF_LEN
];
char
sig
[
BUF_LEN
]
;
char
*
sig
=
(
char
*
)
calloc
(
BUF_LEN
,
1
)
;
init
();
init
();
...
@@ -254,7 +255,7 @@ void bls_sign_message(int *err_status, char *err_string, uint8_t *encrypted_key,
...
@@ -254,7 +255,7 @@ void bls_sign_message(int *err_status, char *err_string, uint8_t *encrypted_key,
return
;
return
;
}
}
sign
(
key
,
_hashX
,
_hashY
,
sig
);
// enclave_
sign(key, _hashX, _hashY, sig);
strncpy
(
signature
,
sig
,
BUF_LEN
);
strncpy
(
signature
,
sig
,
BUF_LEN
);
...
...
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