15
15
syntax = "proto3" ;
16
16
package apple.swift_homomorphic_encryption.api.v1 ;
17
17
18
- import "apple/swift_homomorphic_encryption/api/v1/api_evaluation_key.proto" ;
19
- import "apple/swift_homomorphic_encryption/api/v1/api_pir.proto" ;
20
-
21
- // Request for server side configurations.
22
- message ConfigRequest {
23
- // List of usecases to fetch configs for.
24
- // When set to empty array, all configs will be returned.
25
- repeated string usecases = 1 ;
26
- }
18
+ import "apple/swift_homomorphic_encryption/api/pir/v1/pir.proto" ;
19
+ import "apple/swift_homomorphic_encryption/api/pnns/v1/pnns.proto" ;
20
+ import "apple/swift_homomorphic_encryption/api/shared/v1/api_shared.proto" ;
27
21
28
22
// Usecase configuration.
29
23
message Config {
30
24
// Configuration.
31
25
oneof config {
32
26
// Configuration for a PIR usecase.
33
- PIRConfig pir_config = 1 ;
27
+ apple.swift_homomorphic_encryption.api.pir.v1.PIRConfig pir_config = 1 ;
28
+ // Configuration for a PNNS usecase.
29
+ apple.swift_homomorphic_encryption.api.pnns.v1.PNNSConfig pnns_config = 2 ;
34
30
}
35
- reserved 2 ;
36
31
// Unique identifier for the configuration.
37
32
bytes config_id = 3 ;
38
33
}
39
34
35
+ // Request for server side configurations.
36
+ message ConfigRequest {
37
+ // List of usecases to fetch configs for.
38
+ // When set to empty array, all configs will be returned.
39
+ repeated string usecases = 1 ;
40
+ }
41
+
40
42
// Server side configurations.
41
43
message ConfigResponse {
42
44
// usecases with associated configurations.
43
45
map <string , Config > configs = 1 ;
44
46
// Configuration & status of evaluation keys.
45
- repeated KeyStatus key_info = 2 ;
47
+ repeated apple.swift_homomorphic_encryption.api.shared.v1. KeyStatus key_info = 2 ;
46
48
}
47
49
48
50
// Container for multiple requests.
@@ -64,17 +66,19 @@ message Request {
64
66
// Generic request.
65
67
oneof request {
66
68
// PIR request.
67
- PIRRequest pir_request = 2 ;
69
+ apple.swift_homomorphic_encryption.api.pir.v1.PIRRequest pir_request = 2 ;
70
+ // PNNS request.
71
+ apple.swift_homomorphic_encryption.api.pnns.v1.PNNSRequest pnns_request = 3 ;
68
72
}
69
- reserved 3 ;
70
73
}
71
74
72
75
// Generic response.
73
76
message Response {
74
77
// Generic response.
75
78
oneof response {
76
79
// Response to a `PIRRequest`.
77
- PIRResponse pir_response = 1 ;
80
+ apple.swift_homomorphic_encryption.api.pir.v1.PIRResponse pir_response = 1 ;
81
+ // Response to a `PNNSRequest`.
82
+ apple.swift_homomorphic_encryption.api.pnns.v1.PNNSResponse pnns_response = 2 ;
78
83
}
79
- reserved 2 ;
80
84
}
0 commit comments