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
8250f8b2
Unverified
Commit
8250f8b2
authored
Mar 12, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test
parent
a7b11c04
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
124 deletions
+126
-124
SGXWalletServer.cpp
SGXWalletServer.cpp
+86
-86
SGXWalletServer.hpp
SGXWalletServer.hpp
+39
-37
start.sh
docker/start.sh
+1
-1
No files found.
SGXWalletServer.cpp
View file @
8250f8b2
This diff is collapsed.
Click to expand it.
SGXWalletServer.hpp
View file @
8250f8b2
...
...
@@ -36,48 +36,50 @@ class SGXWalletServer : public AbstractStubServer {
SGXWalletServer
*
server
=
nullptr
;
std
::
recursive_mutex
m
;
recursive_mutex
m
;
public
:
SGXWalletServer
(
AbstractServerConnector
&
_connector
,
serverVersion_t
_type
);
virtual
Json
::
Value
importBLSKeyShare
(
const
st
d
::
string
&
_keyShare
,
const
std
::
string
&
_keyShareName
,
int
_t
,
int
_n
,
int
index
);
importBLSKeyShare
(
const
st
ring
&
_keyShare
,
const
string
&
_keyShareName
,
int
_t
,
int
_n
,
int
index
);
virtual
Json
::
Value
blsSignMessageHash
(
const
std
::
string
&
_keyShareName
,
const
std
::
string
&
_messageHash
,
int
_t
,
int
_n
,
int
_signerIndex
);
blsSignMessageHash
(
const
string
&
_keyShareName
,
const
string
&
_messageHash
,
int
_t
,
int
_n
,
int
_signerIndex
);
virtual
Json
::
Value
importECDSAKey
(
const
st
d
::
string
&
_key
,
const
std
::
string
&
_keyName
);
virtual
Json
::
Value
importECDSAKey
(
const
st
ring
&
_key
,
const
string
&
_keyName
);
virtual
Json
::
Value
generateECDSAKey
();
virtual
Json
::
Value
renameECDSAKey
(
const
st
d
::
string
&
_keyName
,
const
std
::
string
&
_tmpKeyName
);
virtual
Json
::
Value
renameECDSAKey
(
const
st
ring
&
_keyName
,
const
string
&
_tmpKeyName
);
virtual
Json
::
Value
ecdsaSignMessageHash
(
int
_base
,
const
std
::
string
&
_keyShareName
,
const
std
::
string
&
_messageHash
);
virtual
Json
::
Value
ecdsaSignMessageHash
(
int
_base
,
const
string
&
_keyShareName
,
const
string
&
_messageHash
);
virtual
Json
::
Value
getPublicECDSAKey
(
const
st
d
::
st
ring
&
_keyName
);
virtual
Json
::
Value
getPublicECDSAKey
(
const
string
&
_keyName
);
virtual
Json
::
Value
generateDKGPoly
(
const
st
d
::
st
ring
&
_polyName
,
int
_t
);
virtual
Json
::
Value
generateDKGPoly
(
const
string
&
_polyName
,
int
_t
);
virtual
Json
::
Value
getVerificationVector
(
const
st
d
::
st
ring
&
_polynomeName
,
int
_t
,
int
_n
);
virtual
Json
::
Value
getVerificationVector
(
const
string
&
_polynomeName
,
int
_t
,
int
_n
);
virtual
Json
::
Value
getSecretShare
(
const
st
d
::
st
ring
&
_polyName
,
const
Json
::
Value
&
_publicKeys
,
int
t
,
int
n
);
virtual
Json
::
Value
getSecretShare
(
const
string
&
_polyName
,
const
Json
::
Value
&
_publicKeys
,
int
t
,
int
n
);
virtual
Json
::
Value
dkgVerification
(
const
st
d
::
string
&
publicShares
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
SecretShare
,
dkgVerification
(
const
st
ring
&
_publicShares
,
const
string
&
ethKeyName
,
const
string
&
SecretShare
,
int
t
,
int
n
,
int
index
);
virtual
Json
::
Value
createBLSPrivateKey
(
const
st
d
::
string
&
blsKeyName
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
polyName
,
const
st
d
::
st
ring
&
SecretShare
,
int
t
,
int
n
);
createBLSPrivateKey
(
const
st
ring
&
blsKeyName
,
const
string
&
ethKeyName
,
const
string
&
polyName
,
const
string
&
SecretShare
,
int
t
,
int
n
);
virtual
Json
::
Value
getBLSPublicKeyShare
(
const
st
d
::
st
ring
&
blsKeyName
);
virtual
Json
::
Value
getBLSPublicKeyShare
(
const
string
&
blsKeyName
);
virtual
Json
::
Value
complaintResponse
(
const
st
d
::
st
ring
&
polyName
,
int
ind
);
virtual
Json
::
Value
complaintResponse
(
const
string
&
polyName
,
int
ind
);
virtual
Json
::
Value
multG2
(
const
st
d
::
st
ring
&
x
);
virtual
Json
::
Value
multG2
(
const
string
&
x
);
virtual
Json
::
Value
isPolyExists
(
const
st
d
::
st
ring
&
polyName
);
virtual
Json
::
Value
isPolyExists
(
const
string
&
polyName
);
virtual
Json
::
Value
getServerStatus
();
...
...
@@ -85,48 +87,48 @@ public:
static
void
writeDataToDB
(
const
string
&
Name
,
const
string
&
value
);
static
void
writeKeyShare
(
const
string
&
_keyShareName
,
const
string
&
value
,
int
index
,
int
n
,
int
t
);
static
void
writeKeyShare
(
const
string
&
_keyShareName
,
const
string
&
_value
,
int
_index
,
int
_n
,
int
_
t
);
static
shared_ptr
<
st
d
::
st
ring
>
readKeyShare
(
const
string
&
_keyShare
);
static
shared_ptr
<
string
>
readKeyShare
(
const
string
&
_keyShare
);
static
Json
::
Value
importBLSKeyShareImpl
(
const
st
d
::
string
&
keyShare
,
const
std
::
string
&
keyShareName
,
int
t
,
int
n
,
int
index
);
importBLSKeyShareImpl
(
const
st
ring
&
_keyShare
,
const
string
&
_keyShareName
,
int
t
,
int
n
,
int
_
index
);
static
Json
::
Value
blsSignMessageHashImpl
(
const
st
d
::
string
&
keyShareName
,
const
std
::
string
&
messageHash
,
int
t
,
int
n
,
int
signerIndex
);
blsSignMessageHashImpl
(
const
st
ring
&
_keyShareName
,
const
string
&
_
messageHash
,
int
t
,
int
n
,
int
_
signerIndex
);
static
Json
::
Value
importECDSAKeyImpl
(
const
st
d
::
string
&
_key
,
const
std
::
string
&
_keyName
);
static
Json
::
Value
importECDSAKeyImpl
(
const
st
ring
&
_key
,
const
string
&
_keyName
);
static
Json
::
Value
generateECDSAKeyImpl
();
static
Json
::
Value
renameECDSAKeyImpl
(
const
st
d
::
string
&
KeyName
,
const
std
::
string
&
tempKeyName
);
static
Json
::
Value
renameECDSAKeyImpl
(
const
st
ring
&
_keyName
,
const
string
&
_
tempKeyName
);
static
Json
::
Value
ecdsaSignMessageHashImpl
(
int
base
,
const
std
::
string
&
keyName
,
const
std
::
string
&
messageHash
);
static
Json
::
Value
ecdsaSignMessageHashImpl
(
int
_base
,
const
string
&
keyName
,
const
string
&
_
messageHash
);
static
Json
::
Value
getPublicECDSAKeyImpl
(
const
st
d
::
string
&
keyName
);
static
Json
::
Value
getPublicECDSAKeyImpl
(
const
st
ring
&
_
keyName
);
static
Json
::
Value
generateDKGPolyImpl
(
const
st
d
::
string
&
polyName
,
int
t
);
static
Json
::
Value
generateDKGPolyImpl
(
const
st
ring
&
_polyName
,
int
_
t
);
static
Json
::
Value
getVerificationVectorImpl
(
const
st
d
::
string
&
polyName
,
int
t
,
int
n
);
static
Json
::
Value
getVerificationVectorImpl
(
const
st
ring
&
_polyName
,
int
_t
,
int
_
n
);
static
Json
::
Value
getSecretShareImpl
(
const
st
d
::
string
&
polyName
,
const
Json
::
Value
&
publicKeys
,
int
t
,
int
n
);
static
Json
::
Value
getSecretShareImpl
(
const
st
ring
&
_polyName
,
const
Json
::
Value
&
_publicKeys
,
int
_t
,
int
_
n
);
static
Json
::
Value
dkgVerificationImpl
(
const
st
d
::
string
&
publicShares
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
S
ecretShare
,
int
t
,
int
n
,
int
index
);
dkgVerificationImpl
(
const
st
ring
&
_publicShares
,
const
string
&
_ethKeyName
,
const
string
&
_s
ecretShare
,
int
_t
,
int
_n
,
int
_
index
);
static
Json
::
Value
createBLSPrivateKeyImpl
(
const
st
d
::
string
&
blsKeyName
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
polyName
,
const
st
d
::
string
&
SecretShare
,
int
t
,
int
n
);
createBLSPrivateKeyImpl
(
const
st
ring
&
_blsKeyName
,
const
string
&
_ethKeyName
,
const
string
&
_
polyName
,
const
st
ring
&
_secretShare
,
int
_t
,
int
_
n
);
static
Json
::
Value
getBLSPublicKeyShareImpl
(
const
st
d
::
string
&
blsKeyName
);
static
Json
::
Value
getBLSPublicKeyShareImpl
(
const
st
ring
&
_
blsKeyName
);
static
Json
::
Value
complaintResponseImpl
(
const
st
d
::
string
&
polyName
,
int
ind
);
static
Json
::
Value
complaintResponseImpl
(
const
st
ring
&
_polyName
,
int
_
ind
);
static
Json
::
Value
multG2Impl
(
const
st
d
::
string
&
x
);
static
Json
::
Value
multG2Impl
(
const
st
ring
&
_
x
);
static
Json
::
Value
isPolyExistsImpl
(
const
st
d
::
string
&
polyName
);
static
Json
::
Value
isPolyExistsImpl
(
const
st
ring
&
_
polyName
);
static
Json
::
Value
getServerStatusImpl
();
...
...
docker/start.sh
View file @
8250f8b2
...
...
@@ -19,7 +19,7 @@ if [ "$1" = -t ]; then
./testw
[
dkg_api_test]
./testw
[
is_poly_test]
./testw
[
AES-encrypt-decrypt]
./testw
[
ecdsa_api_test]
#
./testw [ecdsa_api_test]
#./testw [dkg-encr_sshares]
#./testw [bls_sign]
./testw
[
many_threads_test]
...
...
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