-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv1.proto
57 lines (47 loc) · 1.15 KB
/
v1.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
syntax = "proto3";
package zkauth.v1;
message RegisterRequest {
string user = 1;
string y1 = 2;
string y2 = 3;
}
message RegisterResponse {}
message AuthenticationChallengeRequest {
string user = 1;
string r1 = 2;
string r2 = 3;
}
message AuthenticationChallengeResponse {
string auth_id = 1;
string c = 2;
}
message AuthenticationAnswerRequest {
string auth_id = 1;
string s = 2;
}
message AuthenticationAnswerResponse {
string session_id = 1;
}
message GetConfigurationRequest {}
message Configuration {
message DiscreteLogarithm {
string p = 1;
string q = 2;
string g = 3;
string h = 4;
}
message EllipticCurve {
string g = 1;
string h = 2;
}
oneof flavor {
DiscreteLogarithm discrete_logarithm = 1;
EllipticCurve elliptic_curve = 2;
}
}
service Auth {
rpc GetConfiguration(GetConfigurationRequest) returns (Configuration) {}
rpc Register(RegisterRequest) returns (RegisterResponse) {}
rpc CreateAuthenticationChallenge(AuthenticationChallengeRequest) returns (AuthenticationChallengeResponse) {}
rpc VerifyAuthentication(AuthenticationAnswerRequest) returns (AuthenticationAnswerResponse) {}
}