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
66ae3806
Unverified
Commit
66ae3806
authored
Aug 27, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2892 calculate bls public keys on sgx
parent
069d19c0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
1 deletion
+124
-1
DKGCrypto.cpp
DKGCrypto.cpp
+67
-0
DKGCrypto.h
DKGCrypto.h
+4
-0
SGXWalletServer.cpp
SGXWalletServer.cpp
+43
-0
SGXWalletServer.hpp
SGXWalletServer.hpp
+4
-0
abstractstubserver.h
abstractstubserver.h
+6
-1
No files found.
DKGCrypto.cpp
View file @
66ae3806
...
@@ -318,6 +318,73 @@ vector<string> GetBLSPubKey(const char *encryptedKeyHex) {
...
@@ -318,6 +318,73 @@ vector<string> GetBLSPubKey(const char *encryptedKeyHex) {
return
pubKeyVect
;
return
pubKeyVect
;
}
}
string
convertHexToDec
(
const
string
&
hex_str
)
{
mpz_t
dec
;
mpz_init
(
dec
);
string
ret
=
""
;
try
{
if
(
mpz_set_str
(
dec
,
hex_str
.
c_str
(),
16
)
==
-
1
)
{
mpz_clear
(
dec
);
return
ret
;
}
char
arr
[
mpz_sizeinbase
(
dec
,
10
)
+
2
];
char
*
result
=
mpz_get_str
(
arr
,
10
,
dec
);
ret
=
result
;
}
catch
(
exception
&
e
)
{
throw
SGXException
(
INCORRECT_STRING_CONVERSION
,
e
.
what
());
mpz_clear
(
dec
);
return
ret
;
}
catch
(...)
{
throw
SGXException
(
UNKNOWN_ERROR
,
""
);
mpz_clear
(
dec
);
return
ret
;
}
return
ret
;
}
vector
<
string
>
calculateAllBlsPublicKeys
(
const
vector
<
string
>&
public_shares
)
{
size_t
n
=
public_shares
.
size
();
size_t
t
=
public_shares
[
0
].
length
()
/
256
;
uint64_t
share_length
=
256
;
uint8_t
coord_length
=
64
;
vector
<
string
>
result
(
n
);
vector
<
libff
::
alt_bn128_G2
>
public_keys
(
n
,
libff
::
alt_bn128_G2
::
zero
());
vector
<
libff
::
alt_bn128_G2
>
public_values
(
n
,
libff
::
alt_bn128_G2
::
zero
());
for
(
size_t
i
=
0
;
i
<
n
;
++
i
)
{
for
(
size_t
j
=
0
;
j
<
t
;
++
j
)
{
libff
::
alt_bn128_G2
public_share
;
uint64_t
pos0
=
share_length
*
i
;
string
x_c0_str
=
convertHexToDec
(
public_shares
[
i
].
substr
(
pos0
,
coord_length
));
string
x_c1_str
=
convertHexToDec
(
public_shares
[
i
].
substr
(
pos0
+
coord_length
,
coord_length
));
string
y_c0_str
=
convertHexToDec
(
public_shares
[
i
].
substr
(
pos0
+
2
*
coord_length
,
coord_length
));
string
y_c1_str
=
convertHexToDec
(
public_shares
[
i
].
substr
(
pos0
+
3
*
coord_length
,
coord_length
));
public_share
.
X
.
c0
=
libff
::
alt_bn128_Fq
(
x_c0_str
.
c_str
());
public_share
.
X
.
c1
=
libff
::
alt_bn128_Fq
(
x_c1_str
.
c_str
());
public_share
.
Y
.
c0
=
libff
::
alt_bn128_Fq
(
y_c0_str
.
c_str
());
public_share
.
Y
.
c1
=
libff
::
alt_bn128_Fq
(
y_c1_str
.
c_str
());
public_share
.
Z
=
libff
::
alt_bn128_Fq2
::
one
();
public_values
[
i
]
=
public_values
[
i
]
+
public_share
;
}
}
for
(
size_t
i
=
0
;
i
<
n
;
++
i
)
{
for
(
size_t
j
=
0
;
j
<
n
;
++
j
)
{
public_keys
[
i
]
=
public_keys
[
i
]
+
libff
::
power
(
libff
::
alt_bn128_Fr
(
j
+
1
),
i
)
*
public_values
[
j
];
}
}
return
result
;
}
string
decryptDHKey
(
const
string
&
polyName
,
int
ind
)
{
string
decryptDHKey
(
const
string
&
polyName
,
int
ind
)
{
vector
<
char
>
errMsg1
(
1024
,
0
);
vector
<
char
>
errMsg1
(
1024
,
0
);
int
errStatus
=
0
;
int
errStatus
=
0
;
...
...
DKGCrypto.h
View file @
66ae3806
...
@@ -47,6 +47,10 @@ vector<string> GetBLSPubKey(const char * encryptedKeyHex);
...
@@ -47,6 +47,10 @@ vector<string> GetBLSPubKey(const char * encryptedKeyHex);
vector
<
string
>
mult_G2
(
const
string
&
x
);
vector
<
string
>
mult_G2
(
const
string
&
x
);
string
convertHexToDec
(
const
string
&
hex_str
);
vector
<
string
>
calculateAllBlsPublicKeys
(
const
vector
<
string
>&
public_shares
);
bool
TestCreateBLSShare
(
const
char
*
s_shares
);
bool
TestCreateBLSShare
(
const
char
*
s_shares
);
#endif //SGXD_DKGCRYPTO_H
#endif //SGXD_DKGCRYPTO_H
SGXWalletServer.cpp
View file @
66ae3806
...
@@ -520,6 +520,45 @@ Json::Value SGXWalletServer::getBLSPublicKeyShareImpl(const string &_blsKeyName)
...
@@ -520,6 +520,45 @@ Json::Value SGXWalletServer::getBLSPublicKeyShareImpl(const string &_blsKeyName)
RETURN_SUCCESS
(
result
);
RETURN_SUCCESS
(
result
);
}
}
Json
::
Value
calculateAllBLSPublicKeysImpl
(
const
Json
::
Value
&
publicShares
,
int
t
,
int
n
)
{
spdlog
::
info
(
"Entering {}"
,
__FUNCTION__
);
INIT_RESULT
(
result
)
try
{
if
(
!
check_n_t
(
t
,
n
))
{
throw
SGXException
(
INVALID_DKG_PARAMS
,
"Invalid DKG parameters: n or t "
);
}
if
(
!
publicShares
.
isArray
())
{
throw
SGXException
(
INVALID_DKG_PARAMS
,
"Invalid public shares format"
);
}
if
(
publicShares
.
size
()
!=
(
uint64_t
)
n
)
{
throw
SGXException
(
INVALID_DKG_PARAMS
,
"Invalid length of public shares"
);
}
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
if
(
!
publicShares
[
i
].
isString
())
{
throw
SGXException
(
INVALID_DKG_PARAMS
,
"Invalid public shares parts format"
);
}
if
(
publicShares
[
i
].
asString
().
length
()
!=
(
uint64_t
)
256
*
t
)
{
throw
SGXException
(
INVALID_DKG_PARAMS
,
"Invalid length of public shares parts"
);
}
}
vector
<
string
>
public_shares
(
n
);
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
public_shares
[
i
]
=
publicShares
[
i
].
asString
();
}
vector
<
string
>
public_keys
=
calculateAllBlsPublicKeys
(
public_shares
);
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
result
[
"publicKeys"
][
i
]
=
public_keys
[
i
];
}
}
HANDLE_SGX_EXCEPTION
(
result
)
RETURN_SUCCESS
(
result
);
}
Json
::
Value
SGXWalletServer
::
complaintResponseImpl
(
const
string
&
_polyName
,
int
_ind
)
{
Json
::
Value
SGXWalletServer
::
complaintResponseImpl
(
const
string
&
_polyName
,
int
_ind
)
{
spdlog
::
info
(
"Entering {}"
,
__FUNCTION__
);
spdlog
::
info
(
"Entering {}"
,
__FUNCTION__
);
INIT_RESULT
(
result
)
INIT_RESULT
(
result
)
...
@@ -634,6 +673,10 @@ Json::Value SGXWalletServer::getBLSPublicKeyShare(const string &blsKeyName) {
...
@@ -634,6 +673,10 @@ Json::Value SGXWalletServer::getBLSPublicKeyShare(const string &blsKeyName) {
return
getBLSPublicKeyShareImpl
(
blsKeyName
);
return
getBLSPublicKeyShareImpl
(
blsKeyName
);
}
}
Json
::
Value
calculateAllBLSPublicKeys
(
const
Json
::
Value
&
publicShares
,
int
t
,
int
n
)
{
return
calculateAllBLSPublicKeysImpl
(
publicShares
,
t
,
n
);
}
Json
::
Value
SGXWalletServer
::
generateECDSAKey
()
{
Json
::
Value
SGXWalletServer
::
generateECDSAKey
()
{
return
generateECDSAKeyImpl
();
return
generateECDSAKeyImpl
();
}
}
...
...
SGXWalletServer.hpp
View file @
66ae3806
...
@@ -74,6 +74,8 @@ public:
...
@@ -74,6 +74,8 @@ public:
virtual
Json
::
Value
getBLSPublicKeyShare
(
const
string
&
blsKeyName
);
virtual
Json
::
Value
getBLSPublicKeyShare
(
const
string
&
blsKeyName
);
virtual
Json
::
Value
calculateAllBLSPublicKeys
(
const
Json
::
Value
&
publicShares
,
int
t
,
int
n
);
virtual
Json
::
Value
complaintResponse
(
const
string
&
polyName
,
int
ind
);
virtual
Json
::
Value
complaintResponse
(
const
string
&
polyName
,
int
ind
);
virtual
Json
::
Value
multG2
(
const
string
&
x
);
virtual
Json
::
Value
multG2
(
const
string
&
x
);
...
@@ -120,6 +122,8 @@ public:
...
@@ -120,6 +122,8 @@ public:
static
Json
::
Value
getBLSPublicKeyShareImpl
(
const
string
&
_blsKeyName
);
static
Json
::
Value
getBLSPublicKeyShareImpl
(
const
string
&
_blsKeyName
);
static
Json
::
Value
calculateAllBLSPublicKeysImpl
(
const
Json
::
Value
&
publicShares
,
int
t
,
int
n
);
static
Json
::
Value
complaintResponseImpl
(
const
string
&
_polyName
,
int
_ind
);
static
Json
::
Value
complaintResponseImpl
(
const
string
&
_polyName
,
int
_ind
);
static
Json
::
Value
multG2Impl
(
const
string
&
_x
);
static
Json
::
Value
multG2Impl
(
const
string
&
_x
);
...
...
abstractstubserver.h
View file @
66ae3806
...
@@ -44,11 +44,12 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
...
@@ -44,11 +44,12 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"ecdsaSignMessageHash"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"base"
,
jsonrpc
::
JSON_INTEGER
,
"keyName"
,
jsonrpc
::
JSON_STRING
,
"messageHash"
,
jsonrpc
::
JSON_STRING
,
NULL
),
&
AbstractStubServer
::
ecdsaSignMessageHashI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"ecdsaSignMessageHash"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"base"
,
jsonrpc
::
JSON_INTEGER
,
"keyName"
,
jsonrpc
::
JSON_STRING
,
"messageHash"
,
jsonrpc
::
JSON_STRING
,
NULL
),
&
AbstractStubServer
::
ecdsaSignMessageHashI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"generateDKGPoly"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
generateDKGPolyI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"generateDKGPoly"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
generateDKGPolyI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"getVerificationVector"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
getVerificationVectorI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"getVerificationVector"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
getVerificationVectorI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"getSecretShare"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"publicKeys"
,
jsonrpc
::
JSON_ARRAY
,
"n"
,
jsonrpc
::
JSON_INTEGER
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
getSecretShareI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"getSecretShare"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"publicKeys"
,
jsonrpc
::
JSON_ARRAY
,
"n"
,
jsonrpc
::
JSON_INTEGER
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
getSecretShareI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"dkgVerification"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"publicShares"
,
jsonrpc
::
JSON_STRING
,
"ethKeyName"
,
jsonrpc
::
JSON_STRING
,
"secretShare"
,
jsonrpc
::
JSON_STRING
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
"n"
,
jsonrpc
::
JSON_INTEGER
,
"index"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
dkgVerificationI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"dkgVerification"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"publicShares"
,
jsonrpc
::
JSON_STRING
,
"ethKeyName"
,
jsonrpc
::
JSON_STRING
,
"secretShare"
,
jsonrpc
::
JSON_STRING
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
"n"
,
jsonrpc
::
JSON_INTEGER
,
"index"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
dkgVerificationI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"createBLSPrivateKey"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"blsKeyName"
,
jsonrpc
::
JSON_STRING
,
"ethKeyName"
,
jsonrpc
::
JSON_STRING
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"secretShare"
,
jsonrpc
::
JSON_STRING
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
"n"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
createBLSPrivateKeyI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"createBLSPrivateKey"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"blsKeyName"
,
jsonrpc
::
JSON_STRING
,
"ethKeyName"
,
jsonrpc
::
JSON_STRING
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"secretShare"
,
jsonrpc
::
JSON_STRING
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
"n"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
createBLSPrivateKeyI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"getBLSPublicKeyShare"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"blsKeyName"
,
jsonrpc
::
JSON_STRING
,
NULL
),
&
AbstractStubServer
::
getBLSPublicKeyShareI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"getBLSPublicKeyShare"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"blsKeyName"
,
jsonrpc
::
JSON_STRING
,
NULL
),
&
AbstractStubServer
::
getBLSPublicKeyShareI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"calculateAllBLSPublicKeys"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"publicShares"
,
jsonrpc
::
JSON_ARRAY
,
"n"
,
jsonrpc
::
JSON_INTEGER
,
"t"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
calculateAllBLSPublicKeysI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"complaintResponse"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"ind"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
complaintResponseI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"complaintResponse"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
"ind"
,
jsonrpc
::
JSON_INTEGER
,
NULL
),
&
AbstractStubServer
::
complaintResponseI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"multG2"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"x"
,
jsonrpc
::
JSON_STRING
,
NULL
),
&
AbstractStubServer
::
multG2I
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"multG2"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"x"
,
jsonrpc
::
JSON_STRING
,
NULL
),
&
AbstractStubServer
::
multG2I
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"isPolyExists"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
NULL
),
&
AbstractStubServer
::
isPolyExistsI
);
this
->
bindAndAddMethod
(
jsonrpc
::
Procedure
(
"isPolyExists"
,
jsonrpc
::
PARAMS_BY_NAME
,
jsonrpc
::
JSON_OBJECT
,
"polyName"
,
jsonrpc
::
JSON_STRING
,
NULL
),
&
AbstractStubServer
::
isPolyExistsI
);
...
@@ -105,6 +106,9 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
...
@@ -105,6 +106,9 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
{
{
response
=
this
->
getBLSPublicKeyShare
(
request
[
"blsKeyName"
].
asString
());
response
=
this
->
getBLSPublicKeyShare
(
request
[
"blsKeyName"
].
asString
());
}
}
inline
virtual
void
calculateAllBLSPublicKeysI
(
const
Json
::
Value
&
request
,
Json
::
Value
&
response
)
{
response
=
this
->
calculateAllBLSPublicKeys
(
request
[
"publicShares"
],
request
[
"t"
].
asInt
(),
request
[
"n"
].
asInt
());
}
inline
virtual
void
complaintResponseI
(
const
Json
::
Value
&
request
,
Json
::
Value
&
response
)
inline
virtual
void
complaintResponseI
(
const
Json
::
Value
&
request
,
Json
::
Value
&
response
)
{
{
response
=
this
->
complaintResponse
(
request
[
"polyName"
].
asString
(),
request
[
"ind"
].
asInt
());
response
=
this
->
complaintResponse
(
request
[
"polyName"
].
asString
(),
request
[
"ind"
].
asInt
());
...
@@ -147,6 +151,7 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
...
@@ -147,6 +151,7 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
virtual
Json
::
Value
dkgVerification
(
const
std
::
string
&
publicShares
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
SecretShare
,
int
t
,
int
n
,
int
index
)
=
0
;
virtual
Json
::
Value
dkgVerification
(
const
std
::
string
&
publicShares
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
SecretShare
,
int
t
,
int
n
,
int
index
)
=
0
;
virtual
Json
::
Value
createBLSPrivateKey
(
const
std
::
string
&
blsKeyName
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
polyName
,
const
std
::
string
&
SecretShare
,
int
t
,
int
n
)
=
0
;
virtual
Json
::
Value
createBLSPrivateKey
(
const
std
::
string
&
blsKeyName
,
const
std
::
string
&
ethKeyName
,
const
std
::
string
&
polyName
,
const
std
::
string
&
SecretShare
,
int
t
,
int
n
)
=
0
;
virtual
Json
::
Value
getBLSPublicKeyShare
(
const
std
::
string
&
blsKeyName
)
=
0
;
virtual
Json
::
Value
getBLSPublicKeyShare
(
const
std
::
string
&
blsKeyName
)
=
0
;
virtual
Json
::
Value
calculateAllBLSPublicKeys
(
const
Json
::
Value
&
publicShares
,
int
t
,
int
n
)
=
0
;
virtual
Json
::
Value
complaintResponse
(
const
std
::
string
&
polyName
,
int
ind
)
=
0
;
virtual
Json
::
Value
complaintResponse
(
const
std
::
string
&
polyName
,
int
ind
)
=
0
;
virtual
Json
::
Value
multG2
(
const
std
::
string
&
x
)
=
0
;
virtual
Json
::
Value
multG2
(
const
std
::
string
&
x
)
=
0
;
virtual
Json
::
Value
isPolyExists
(
const
std
::
string
&
polyName
)
=
0
;
virtual
Json
::
Value
isPolyExists
(
const
std
::
string
&
polyName
)
=
0
;
...
...
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