Skip to content

Commit 48a0801

Browse files
committed
Add shard_ids to PNNSRequest
1 parent 33bce86 commit 48a0801

File tree

1 file changed

+16
-13
lines changed
  • apple/swift_homomorphic_encryption/api/pnns/v1

1 file changed

+16
-13
lines changed

apple/swift_homomorphic_encryption/api/pnns/v1/pnns.proto

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 Apple Inc. and the Swift Homomorphic Encryption project authors
1+
// Copyright 2024-2025 Apple Inc. and the Swift Homomorphic Encryption project authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -40,32 +40,35 @@ message PNNSConfig {
4040
repeated uint64 extra_plaintext_moduli = 7;
4141
}
4242

43-
// PNNS Request
43+
// PNNS Request.
4444
message PNNSRequest {
45-
// optionally, the shard indices where this request should be routed
45+
// Optionally, the shard indices where this request should be routed.
4646
repeated uint32 shard_indices = 1;
47-
// Encrypted query, one per plaintext CRT component
47+
// Encrypted query, one per plaintext CRT component.
4848
repeated apple.swift_homomorphic_encryption.pnns.v1.SerializedCiphertextMatrix query = 2;
49-
// Key metadata
49+
// Key metadata.
5050
apple.swift_homomorphic_encryption.api.shared.v1.EvaluationKeyMetadata evaluation_key_metadata = 3;
51-
// Identifier for the PNNSConfig used to construct the query
51+
// Identifier for the PNNSConfig used to construct the query.
5252
bytes config_id = 4;
53-
// If set, evaluation key to query with. Will override evaluation key stored server-side
53+
// If set, evaluation key to query with. Will override evaluation key stored server-side.
5454
optional apple.swift_homomorphic_encryption.api.shared.v1.EvaluationKey evaluation_key = 5;
55+
// Optionally, the shard identifiers where this request should be routed.
56+
// If set, will override `shard_indices`.
57+
repeated string shard_ids = 6;
5558
}
5659

57-
// PNNS Shard Response
60+
// PNNS Shard Response.
5861
message PNNSShardResponse {
59-
// Encrypted reply, one per plaintext CRT component
62+
// Encrypted reply, one per plaintext CRT component.
6063
repeated apple.swift_homomorphic_encryption.pnns.v1.SerializedCiphertextMatrix reply = 1;
61-
// A list of entry identifiers the server computed similarities for
64+
// A list of entry identifiers the server computed similarities for.
6265
repeated uint64 entry_ids = 2;
63-
// Metadata for each entry in the database
66+
// Metadata for each entry in the database.
6467
repeated bytes entry_metadatas = 3;
6568
}
6669

67-
// PNNS Response
70+
// PNNS Response.
6871
message PNNSResponse {
69-
// PNNS responses from shards
72+
// PNNS responses from shards.
7073
repeated PNNSShardResponse shard_responses = 1;
7174
}

0 commit comments

Comments
 (0)