-
Notifications
You must be signed in to change notification settings - Fork 0
/
zkp_auth.proto
75 lines (58 loc) · 1.6 KB
/
zkp_auth.proto
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
syntax = "proto3";
package zkp_auth;
message RegisterRequest {
string user = 1;
bytes y1 = 2;
bytes y2 = 3;
}
message RegisterResponse {}
message AuthenticationChallengeRequest {
string user = 1;
bytes r1 = 2;
bytes r2 = 3;
}
message AuthenticationChallengeResponse {
string auth_id = 1;
bytes c = 2;
}
message AuthenticationAnswerRequest {
string auth_id = 1;
bytes s = 2;
}
message AuthenticationAnswerResponse {
string session_id = 1;
}
message Point {
bytes x = 1;
bool is_y_odd = 2;
}
message K256RegisterRequest {
string user = 1;
Point y1 = 2;
Point y2 = 3;
}
message K256RegisterResponse {}
message K256AuthenticationChallengeRequest {
string user = 1;
Point r1 = 2;
Point r2 = 3;
}
message K256AuthenticationChallengeResponse {
string auth_id = 1;
bytes c = 2;
}
message K256AuthenticationAnswerRequest {
string auth_id = 1;
bytes s = 2;
}
message K256AuthenticationAnswerResponse {
string session_id = 1;
}
service Auth {
rpc Register(RegisterRequest) returns (RegisterResponse) {}
rpc CreateAuthenticationChallenge(AuthenticationChallengeRequest) returns (AuthenticationChallengeResponse) {}
rpc VerifyAuthentication(AuthenticationAnswerRequest) returns (AuthenticationAnswerResponse) {}
rpc K256Register(K256RegisterRequest) returns (K256RegisterResponse) {}
rpc K256CreateAuthenticationChallenge(K256AuthenticationChallengeRequest) returns (K256AuthenticationChallengeResponse) {}
rpc K256VerifyAuthentication(K256AuthenticationAnswerRequest) returns (K256AuthenticationAnswerResponse) {}
}