Skip to content

Commit 4994676

Browse files
authored
Remove {PrivateInformationRetrieval,PrivateNearestNeighborSearch}Protobuf (#234)
1 parent 7ff2740 commit 4994676

File tree

47 files changed

+23
-7016
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+23
-7016
lines changed

.spi.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: 1
22
builder:
33
configs:
44
- documentation_targets:
5+
- ApplicationProtobuf
56
- HomomorphicEncryption
67
- HomomorphicEncryptionProtobuf
78
- PIRGenerateDatabase
@@ -10,7 +11,5 @@ builder:
1011
- PNNSGenerateDatabase
1112
- PNNSProcessDatabase
1213
- PrivateInformationRetrieval
13-
- PrivateInformationRetrievalProtobuf
1414
- PrivateNearestNeighborSearch
15-
- PrivateNearestNeighborSearchProtobuf
1615
swift_version: 6.0

Package.resolved

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,9 @@ let package = Package(
4646
.library(
4747
name: "PrivateInformationRetrieval",
4848
targets: ["PrivateInformationRetrieval"]),
49-
.library(
50-
name: "PrivateInformationRetrievalProtobuf",
51-
targets: ["PrivateInformationRetrievalProtobuf"]),
5249
.library(
5350
name: "PrivateNearestNeighborSearch",
5451
targets: ["PrivateNearestNeighborSearch"]),
55-
.library(
56-
name: "PrivateNearestNeighborSearchProtobuf",
57-
targets: ["PrivateNearestNeighborSearchProtobuf"]),
5852
.library(name: "ApplicationProtobuf", targets: ["ApplicationProtobuf"]),
5953
.library(name: "_TestUtilities", targets: ["_TestUtilities"]),
6054
.executable(name: "PIRGenerateDatabase", targets: ["PIRGenerateDatabase"]),
@@ -109,14 +103,6 @@ let package = Package(
109103
dependencies: ["HomomorphicEncryption",
110104
.product(name: "Numerics", package: "swift-numerics")],
111105
swiftSettings: librarySettings),
112-
.target(
113-
name: "PrivateInformationRetrievalProtobuf",
114-
dependencies: ["PrivateInformationRetrieval",
115-
"HomomorphicEncryption",
116-
"HomomorphicEncryptionProtobuf",
117-
.product(name: "SwiftProtobuf", package: "swift-protobuf")],
118-
exclude: ["generated/README.md", "protobuf_module_mappings.txtpb"],
119-
swiftSettings: librarySettings),
120106
.target(
121107
name: "PrivateNearestNeighborSearch",
122108
dependencies: [
@@ -125,14 +111,6 @@ let package = Package(
125111
"_HomomorphicEncryptionExtras",
126112
],
127113
swiftSettings: librarySettings),
128-
.target(
129-
name: "PrivateNearestNeighborSearchProtobuf",
130-
dependencies: ["PrivateNearestNeighborSearch",
131-
"HomomorphicEncryption",
132-
"HomomorphicEncryptionProtobuf",
133-
.product(name: "SwiftProtobuf", package: "swift-protobuf")],
134-
exclude: ["generated/README.md", "protobuf_module_mappings.txtpb"],
135-
swiftSettings: librarySettings),
136114
.target(
137115
name: "ApplicationProtobuf",
138116
dependencies: ["HomomorphicEncryptionProtobuf",
@@ -156,15 +134,15 @@ let package = Package(
156134
dependencies: [
157135
.product(name: "ArgumentParser", package: "swift-argument-parser"),
158136
"HomomorphicEncryption",
159-
"PrivateInformationRetrievalProtobuf",
137+
"ApplicationProtobuf",
160138
],
161139
swiftSettings: executableSettings),
162140
.executableTarget(
163141
name: "PIRProcessDatabase",
164142
dependencies: [
165143
.product(name: "ArgumentParser", package: "swift-argument-parser"),
166144
"HomomorphicEncryptionProtobuf",
167-
"PrivateInformationRetrievalProtobuf",
145+
"ApplicationProtobuf",
168146
"HomomorphicEncryption",
169147
.product(name: "Logging", package: "swift-log"),
170148
],
@@ -174,23 +152,23 @@ let package = Package(
174152
dependencies: [
175153
.product(name: "ArgumentParser", package: "swift-argument-parser"),
176154
"HomomorphicEncryption",
177-
"PrivateInformationRetrievalProtobuf",
155+
"ApplicationProtobuf",
178156
],
179157
swiftSettings: executableSettings),
180158
.executableTarget(
181159
name: "PNNSGenerateDatabase",
182160
dependencies: [
183161
.product(name: "ArgumentParser", package: "swift-argument-parser"),
184162
"HomomorphicEncryption",
185-
"PrivateNearestNeighborSearchProtobuf",
163+
"ApplicationProtobuf",
186164
],
187165
swiftSettings: executableSettings),
188166
.executableTarget(
189167
name: "PNNSProcessDatabase",
190168
dependencies: [
191169
.product(name: "ArgumentParser", package: "swift-argument-parser"),
192170
"HomomorphicEncryptionProtobuf",
193-
"PrivateNearestNeighborSearchProtobuf",
171+
"ApplicationProtobuf",
194172
"HomomorphicEncryption",
195173
.product(name: "Logging", package: "swift-log"),
196174
],
@@ -229,24 +207,11 @@ let package = Package(
229207
"PrivateInformationRetrieval", "_TestUtilities",
230208
.product(name: "Numerics", package: "swift-numerics"),
231209
], swiftSettings: executableSettings),
232-
.testTarget(
233-
name: "PrivateInformationRetrievalProtobufTests",
234-
dependencies: [
235-
"PrivateInformationRetrieval",
236-
"PrivateInformationRetrievalProtobuf",
237-
"_TestUtilities",
238-
], swiftSettings: executableSettings),
239210
.testTarget(
240211
name: "PrivateNearestNeighborSearchTests",
241212
dependencies: [
242213
"PrivateNearestNeighborSearch", "HomomorphicEncryption", "_TestUtilities",
243214
], swiftSettings: executableSettings),
244-
.testTarget(
245-
name: "PrivateNearestNeighborSearchProtobufTests",
246-
dependencies: [
247-
"PrivateNearestNeighborSearch",
248-
"PrivateNearestNeighborSearchProtobuf",
249-
], swiftSettings: executableSettings),
250215
.testTarget(
251216
name: "ApplicationProtobufTests",
252217
dependencies: [
@@ -282,9 +247,8 @@ if enableBenchmarking {
282247
"HomomorphicEncryption",
283248
"HomomorphicEncryptionProtobuf",
284249
"PrivateInformationRetrieval",
285-
"PrivateInformationRetrievalProtobuf",
286250
"PrivateNearestNeighborSearch",
287-
"PrivateNearestNeighborSearchProtobuf",
251+
"ApplicationProtobuf",
288252
],
289253
swiftSettings: benchmarkSettings),
290254
.executableTarget(

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ Swift Homomorphic Encryption is a collection of libraries and executables.
1111
For more information, refer to documentation for the libraries:
1212
* [HomomorphicEncryptionProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryptionprotobuf)
1313
* [HomomorphicEncryption](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption)
14-
* [PrivateInformationRetrievalProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrievalprotobuf)
14+
* [ApplicationProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/applicationprotobuf)
1515
* [PrivateInformationRetrieval](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrieval)
16-
* [PrivateNearestNeighborSearchProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privatenearestneighborsearchprotobuf)
1716
* [PrivateNearestNeighborSearch](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privatenearestneighborsearch)
1817

1918
and executables:

Sources/HomomorphicEncryption/HomomorphicEncryption.docc/HomomorphicEncryption.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ Swift Homomorphic Encryption is a collection of libraries and executables implem
77
For more information, refer to documentation for the libraries:
88
* [HomomorphicEncryptionProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryptionprotobuf)
99
* [HomomorphicEncryption](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption)
10-
* [PrivateInformationRetrievalProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrievalprotobuf)
10+
* [ApplicationProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/applicationprotobuf)
1111
* [PrivateInformationRetrieval](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrieval)
12-
* [PrivateNearestNeighborSearchProtobuf](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privatenearestneighborsearchprotobuf)
1312
* [PrivateNearestNeighborSearch](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privatenearestneighborsearch)
1413

1514
and executables:

Sources/PIRGenerateDatabase/PIRGenerateDatabase.docc/PIRGenerateDatabase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ PIRGenerateDatabase \
3434

3535
This will generate a database of 100 rows, with keywords 0 to 99, and each value repeating the keyword for 10 to 20 bytes.
3636

37-
The database is a serialized [Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrievalprotobuf/apple_swifthomomorphicencryption_pir_v1_keyworddatabase).
37+
The database is a serialized [Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/applicationprotobuf/apple_swifthomomorphicencryption_pir_v1_keyworddatabase).
3838
For readability, the `.txtpb` extension ensures the output database will be saved in protocol buffer text format.
3939

4040
> Note: For a more compact format, use the `.binpb` extension to save the database in protocol buffer binary format.

Sources/PIRGenerateDatabase/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
import ApplicationProtobuf
1516
import ArgumentParser
1617
import Foundation
1718
import HomomorphicEncryption
1819
import PrivateInformationRetrieval
19-
import PrivateInformationRetrievalProtobuf
2020

2121
enum ValueTypeArguments: String, CaseIterable, ExpressibleByArgument {
2222
case random

Sources/PIRProcessDatabase/PIRProcessDatabase.docc/PIRProcessDatabase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ There are four required parameters:
3636
1. `rlweParameters` is one of the [PredefinedRlweParameters](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/homomorphicencryption/predefinedrlweparameters),
3737
e.g., `n_4096_logq_27_28_28_logt_5`.
3838
2. `inputDatabase` is the path to the unprocessed input database. It must be a
39-
serialized [Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/privateinformationretrievalprotobuf/apple_swifthomomorphicencryption_pir_v1_keyworddatabase).
39+
serialized [Apple_SwiftHomomorphicEncryption_Pir_V1_KeywordDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/applicationprotobuf/apple_swifthomomorphicencryption_pir_v1_keyworddatabase).
4040

4141
> Note: The [PIRGenerateDatabase](https://swiftpackageindex.com/apple/swift-homomorphic-encryption/main/documentation/pirgeneratedatabase) binary can be used to generate a sample database.
4242

Sources/PIRProcessDatabase/main.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
import ApplicationProtobuf
1516
import ArgumentParser
1617
import Crypto
1718
import Foundation
1819
import HomomorphicEncryption
1920
import HomomorphicEncryptionProtobuf
2021
import Logging
2122
import PrivateInformationRetrieval
22-
import PrivateInformationRetrievalProtobuf
2323

2424
/// The different table sizes that can be used for the PIR database.
2525
enum TableSizeOption: Codable, Equatable, Hashable {
@@ -561,8 +561,7 @@ extension ProcessKeywordDatabase.ShardValidationResult {
561561
descriptionDict["evaluation key size"] = try sizeString(
562562
byteCount: evaluationKey.size(),
563563
count: evaluationKey.config.keyCount,
564-
label: "keys"
565-
)
564+
label: "keys")
566565
descriptionDict["response size"] = try sizeString(byteCount: response.size(),
567566
count: response.ciphertexts.flatMap(\.self).count,
568567
label: "ciphertexts")

Sources/PIRShardDatabase/ShardDatabase.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
import ApplicationProtobuf
1516
import ArgumentParser
1617
import HomomorphicEncryption
1718
import PrivateInformationRetrieval
18-
import PrivateInformationRetrievalProtobuf
1919

2020
extension KeywordDatabaseShard {
2121
func save(to path: String) throws {

0 commit comments

Comments
 (0)