-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpjc.proto
More file actions
78 lines (61 loc) · 1.62 KB
/
pjc.proto
File metadata and controls
78 lines (61 loc) · 1.62 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Copyright (c) Facebook, Inc. and its affiliates.
// SPDX-License-Identifier: Apache-2.0
syntax = "proto3";
package pjc;
import "google/api/annotations.proto";
import "google/protobuf/wrappers.proto";
option go_package = "./gen/go/pjc-proxy";
message Payload {
repeated bytes payload = 1;
}
message Init {
Payload public_key = 1;
}
message InitAck {}
message FeatureQuery {
uint64 feature_index = 1;
}
message FeatureAck {
FeatureQuery query_ack = 1;
}
message KeysAck {}
message Commitment {}
message CommitmentAck {}
message EncryptedSum {
Payload payload = 1;
}
message Stats {
repeated EncryptedSum encrypted_sums = 1;
int32 intersection_size = 2;
}
message StatsAck {}
message ServiceResponse {
oneof Ack {
KeysAck keys_ack = 1;
FeatureAck feature_ack = 2;
InitAck init_ack = 3;
}
}
service PJC {
rpc KeyExchange(Init) returns (InitAck) {
option (google.api.http) = {
post: "/v1/key_exchange"
body: "*"
};
}
rpc RecvUCompanyKeys(ServiceResponse) returns (stream Payload) {
option (google.api.http) = {post: "/v1/recv_u_company_keys"};
}
rpc SendECompanyKeys(stream Payload) returns (ServiceResponse) {
option (google.api.http) = {post: "/v1/send_e_company_keys"};
}
rpc SendUPartnerKeys(stream Payload) returns (ServiceResponse) {
option (google.api.http) = {post: "/v1/send_u_partner_keys"};
}
rpc SendUPartnerFeature(stream Payload) returns (ServiceResponse) {
option (google.api.http) = {post: "/v1/send_u_partner_feature"};
}
rpc RecvStats(Commitment) returns (Stats) {
option (google.api.http) = {post: "/v1/recv_stats"};
}
}