-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdkg.h
More file actions
25 lines (19 loc) · 793 Bytes
/
dkg.h
File metadata and controls
25 lines (19 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef DKG_CPP
#define DKG_CPP
#include <bls/bls384_256.h>
#include <vector>
struct Member {
blsSecretKey id;
blsId bls_id;
std::vector<blsSecretKey> recevied_shares;
};
struct GenerateContribution {
std::vector<blsPublicKey> vvec;
std::vector<blsSecretKey> skContribution;
};
GenerateContribution generateContribution(const std::vector<Member>& ids, int threshold);
GenerateContribution generateZeroContribution(std::vector<Member>& ids, int threshold);
blsSecretKey addContributionShares(const std::vector<blsSecretKey>& secret_key_shares);
bool verifyContributionShare(const blsId& id, const blsSecretKey& contribution, const std::vector<blsPublicKey>& vvec);
std::vector<blsPublicKey> addVerificationVectors(std::vector<std::vector<blsPublicKey>>& vvecs);
#endif