|
15 | 15 | syntax = "proto3";
|
16 | 16 | package apple.swift_homomorphic_encryption.api.v1;
|
17 | 17 |
|
18 |
| -import "apple/swift_homomorphic_encryption/pir/v1/pir.proto"; |
19 |
| -import "apple/swift_homomorphic_encryption/pir/v1/pir_algorithm.proto"; |
20 |
| -import "apple/swift_homomorphic_encryption/v1/he.proto"; |
21 |
| - |
22 |
| -// Evaluation key metadata. |
23 |
| -message EvaluationKeyMetadata { |
24 |
| - // Timestamp of the (secret) key generation, seconds from Unix epoch. |
25 |
| - uint64 timestamp = 1; |
26 |
| - // Key identifier (SHA256 of `EvaluationKeyConfig`). |
27 |
| - bytes identifier = 2; |
28 |
| -} |
29 |
| - |
30 |
| -// Status of the evaluation key. |
31 |
| -message KeyStatus { |
32 |
| - // When was this key last updated (seconds from Unix epoch), 0 when key is missing. |
33 |
| - uint64 timestamp = 1; |
34 |
| - // Configuration for the key. |
35 |
| - apple.swift_homomorphic_encryption.v1.EvaluationKeyConfig key_config = 2; |
36 |
| - reserved 3; |
37 |
| -} |
38 |
| - |
39 |
| -// Container for multiple evaluation keys. |
40 |
| -message EvaluationKeys { |
41 |
| - // Evaluation keys. |
42 |
| - repeated EvaluationKey keys = 1; |
43 |
| -} |
44 |
| - |
45 |
| -// Evaluation key upload. |
46 |
| -message EvaluationKey { |
47 |
| - // Metadata for the key. |
48 |
| - EvaluationKeyMetadata metadata = 1; |
49 |
| - // Evaluation key. |
50 |
| - apple.swift_homomorphic_encryption.v1.SerializedEvaluationKey evaluation_key = 2; |
51 |
| -} |
| 18 | +import "apple/swift_homomorphic_encryption/api/v1/api_evaluation_key.proto"; |
| 19 | +import "apple/swift_homomorphic_encryption/api/v1/api_pir.proto"; |
52 | 20 |
|
53 | 21 | // Request for server side configurations.
|
54 | 22 | message ConfigRequest {
|
@@ -110,58 +78,3 @@ message Response {
|
110 | 78 | }
|
111 | 79 | reserved 2;
|
112 | 80 | }
|
113 |
| - |
114 |
| -// Configuration for one shard of the PIR database. |
115 |
| -message PIRShardConfig { |
116 |
| - // Number of entries in the shard. |
117 |
| - uint64 num_entries = 1; |
118 |
| - // Size in bytes of entries in the shard. |
119 |
| - uint64 entry_size = 2; |
120 |
| - // Dimensions that make up the hypercube. |
121 |
| - repeated uint64 dimensions = 3; |
122 |
| - // Unique identifier for the shard. |
123 |
| - optional string shard_id = 4; |
124 |
| - // Whether to compress vectorized PIR response. |
125 |
| - optional bool compress_vectorized_pir_response = 5; |
126 |
| - // The additional "batching" introduced in vectorized pir to accommodate large entry size. |
127 |
| - optional uint64 vectorized_pir_internal_batching_size = 6; |
128 |
| -} |
129 |
| - |
130 |
| -// Configuration for one PIR usecase. |
131 |
| -message PIRConfig { |
132 |
| - // Encryption parameters. |
133 |
| - apple.swift_homomorphic_encryption.v1.EncryptionParameters encryption_parameters = 1; |
134 |
| - // Configuration for each shard. |
135 |
| - repeated PIRShardConfig shard_configs = 2; |
136 |
| - // Parameters specific to KeywordPIR. |
137 |
| - apple.swift_homomorphic_encryption.pir.v1.KeywordPirParameters keyword_pir_params = 3; |
138 |
| - // Server-side PIR algorithm. |
139 |
| - apple.swift_homomorphic_encryption.pir.v1.PirAlgorithm algorithm = 4; |
140 |
| - // Maximum number of queries allowed in a single request. |
141 |
| - uint64 batch_size = 5; |
142 |
| - // Hash of EvaluationKeyConfig. |
143 |
| - bytes evaluation_key_config_hash = 6; |
144 |
| - reserved 7, 8; |
145 |
| -} |
146 |
| - |
147 |
| -// PIR Request. |
148 |
| -message PIRRequest { |
149 |
| - // Shard index where this request should be routed. Can be overridden by shard_id. |
150 |
| - uint32 shard_index = 1; |
151 |
| - // Encrypted query. |
152 |
| - apple.swift_homomorphic_encryption.pir.v1.EncryptedIndices query = 2; |
153 |
| - // Evaluation key metadata. |
154 |
| - EvaluationKeyMetadata evaluation_key_metadata = 3; |
155 |
| - // Hash of the `PIRConfig` used to construct the query. |
156 |
| - bytes configuration_hash = 4; |
157 |
| - // If set, route request to a shard with this `shard_id` instead of `shard_index`. |
158 |
| - optional string shard_id = 5; |
159 |
| - // If set, evaluation key to query with. Will override evaluation key stored server-side. |
160 |
| - optional EvaluationKey evaluation_key = 6; |
161 |
| -} |
162 |
| - |
163 |
| -// PIR Response. |
164 |
| -message PIRResponse { |
165 |
| - // Encrypted replies, each of which is a ciphertext vector. |
166 |
| - repeated apple.swift_homomorphic_encryption.v1.SerializedCiphertextVec replies = 1; |
167 |
| -} |
0 commit comments