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
dcd5da17
Unverified
Commit
dcd5da17
authored
Jan 27, 2020
by
svetaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change naming
parent
325db7d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
SGXWalletServer.cpp
SGXWalletServer.cpp
+4
-4
testw.cpp
testw.cpp
+4
-4
No files found.
SGXWalletServer.cpp
View file @
dcd5da17
...
...
@@ -466,7 +466,7 @@ Json::Value getVerificationVectorImpl(const string& polyName, int t, int n) {
for
(
int
i
=
0
;
i
<
t
;
i
++
){
vector
<
string
>
cur_coef
=
verifVector
.
at
(
i
);
for
(
int
j
=
0
;
j
<
4
;
j
++
){
result
[
"
Verification
Vector"
][
i
][
j
]
=
cur_coef
.
at
(
j
);
result
[
"
verification
Vector"
][
i
][
j
]
=
cur_coef
.
at
(
j
);
}
}
...
...
@@ -474,7 +474,7 @@ Json::Value getVerificationVectorImpl(const string& polyName, int t, int n) {
cerr
<<
" err str "
<<
_e
.
errString
<<
endl
;
result
[
"status"
]
=
_e
.
status
;
result
[
"errorMessage"
]
=
_e
.
errString
;
result
[
"
Verification
Vector"
]
=
""
;
result
[
"
verification
Vector"
]
=
""
;
}
return
result
;
...
...
@@ -640,7 +640,7 @@ Json::Value getBLSPublicKeyShareImpl(const string & blsKeyName){
}
vector
<
string
>
public_key_vect
=
GetBLSPubKey
(
encryptedKeyHex_ptr
->
c_str
());
for
(
uint8_t
i
=
0
;
i
<
4
;
i
++
)
{
result
[
"
BLS
PublicKeyShare"
][
i
]
=
public_key_vect
.
at
(
i
);
result
[
"
bls
PublicKeyShare"
][
i
]
=
public_key_vect
.
at
(
i
);
}
}
catch
(
RPCException
&
_e
)
{
...
...
@@ -668,7 +668,7 @@ Json::Value complaintResponseImpl(const string& polyName, int ind){
string
DHKey
=
decrypt_DHKey
(
polyName
,
ind
);
result
[
"share*G2"
]
=
*
shareG2_ptr
;
result
[
"
DH
Key"
]
=
DHKey
;
result
[
"
dh
Key"
]
=
DHKey
;
}
catch
(
RPCException
&
_e
)
{
cerr
<<
" err str "
<<
_e
.
errString
<<
endl
;
...
...
testw.cpp
View file @
dcd5da17
...
...
@@ -789,7 +789,7 @@ TEST_CASE("BLS_DKG test", "[bls_dkg]") {
secretShares
[
i
]
=
c
.
getSecretShare
(
poly_names
[
i
],
pubEthKeys
,
t
,
n
);
for
(
uint8_t
k
=
0
;
k
<
t
;
k
++
)
{
for
(
uint8_t
j
=
0
;
j
<
4
;
j
++
)
{
string
pubShare
=
VerifVects
[
i
][
"
Verification
Vector"
][
k
][
j
].
asString
();
string
pubShare
=
VerifVects
[
i
][
"
verification
Vector"
][
k
][
j
].
asString
();
pubShares
[
i
]
+=
ConvertDecToHex
(
pubShare
);
}
}
...
...
@@ -799,7 +799,7 @@ TEST_CASE("BLS_DKG test", "[bls_dkg]") {
Json
::
Value
complaintResponse
=
c
.
complaintResponse
(
poly_names
[
1
],
0
);
cerr
<<
"share * G2 is "
<<
complaintResponse
[
"share*G2"
].
asString
();
cerr
<<
"DHKey is "
<<
complaintResponse
[
"
DH
Key"
].
asString
();
cerr
<<
"DHKey is "
<<
complaintResponse
[
"
dh
Key"
].
asString
();
int
k
=
0
;
...
...
@@ -856,7 +856,7 @@ TEST_CASE("BLS_DKG test", "[bls_dkg]") {
vector
<
string
>
pubKey_vect
;
for
(
uint8_t
j
=
0
;
j
<
4
;
j
++
){
pubKey_vect
.
push_back
(
pubBLSKeys
[
i
][
"
BLS
PublicKeyShare"
][
j
].
asString
());
pubKey_vect
.
push_back
(
pubBLSKeys
[
i
][
"
bls
PublicKeyShare"
][
j
].
asString
());
}
BLSPublicKeyShare
pubKey
(
make_shared
<
vector
<
string
>>
(
pubKey_vect
),
t
,
n
);
REQUIRE
(
pubKey
.
VerifySigWithHelper
(
hash_arr
,
make_shared
<
BLSSigShare
>
(
sig
)
,
t
,
n
));
...
...
@@ -1022,7 +1022,7 @@ void SendRPCRequest(){
secretShares
[
i
]
=
c
.
getSecretShare
(
poly_names
[
i
],
pubEthKeys
,
t
,
n
);
for
(
uint8_t
k
=
0
;
k
<
t
;
k
++
)
{
for
(
uint8_t
j
=
0
;
j
<
4
;
j
++
)
{
string
pubShare
=
VerifVects
[
i
][
"
Verification
Vector"
][
k
][
j
].
asString
();
string
pubShare
=
VerifVects
[
i
][
"
verification
Vector"
][
k
][
j
].
asString
();
pubShares
[
i
]
+=
ConvertDecToHex
(
pubShare
);
}
}
...
...
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