-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMember.h
More file actions
57 lines (35 loc) · 1.36 KB
/
Copy pathMember.h
File metadata and controls
57 lines (35 loc) · 1.36 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
#include "common.h"
#include <vector>
#include <sstream>
#include <map>
namespace group_sig {
class member {
public:
member(std::string id, public_para *para, ZZ psk);
std::string JoinGroupMsg(ZZ psk);
// static public_para get_para();
bool onRecvV(std::string msg);
std::string sig(const ZZ &x) const;
std::string sig(const std::string &x) const;
bool ver(std::string msg, std::string sig) const;
cspair SKLOG(const ZZ &m, const ZZ &y, const ZZ &g, const ZZ &x) const;
cspair SKLOGLOG(const ZZ &m, const ZZ &y, const ZZ &g, const ZZ &a, const ZZ &alpha) const;
cspair SKROOTLOG(const ZZ &m, const ZZ &y, const ZZ &g, const ZZ &e, const ZZ &beta) const;
bool SKLOGLOGver(const ZZ &m, const ZZ &y, const ZZ &g, const ZZ &ax, const ZZ &a, const cspair &p) const;
bool SKROOTLOGver(const ZZ &m, const ZZ &y, const ZZ &g, const ZZ &e, const cspair &p) const;
std::string onKeyExchangeRequestRecv(std::string msg) const;
void onGroupKeyBoardcastRecv(std::string msg);
ZZ groupKey;
bool getNewGM(std::string &ip);
private:
const std::string id;
ZZ x;
ZZ y;
ZZ z;
ZZ v;
public_para *para;
ZZ psk;
std::map<std::string, std::string> client_map;
};
}