|
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 |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -40,32 +40,35 @@ message PNNSConfig { |
40 | 40 | repeated uint64 extra_plaintext_moduli = 7; |
41 | 41 | } |
42 | 42 |
|
43 | | -// PNNS Request |
| 43 | +// PNNS Request. |
44 | 44 | message PNNSRequest { |
45 | | - // optionally, the shard indices where this request should be routed |
| 45 | + // Optionally, the shard indices where this request should be routed. |
46 | 46 | repeated uint32 shard_indices = 1; |
47 | | - // Encrypted query, one per plaintext CRT component |
| 47 | + // Encrypted query, one per plaintext CRT component. |
48 | 48 | repeated apple.swift_homomorphic_encryption.pnns.v1.SerializedCiphertextMatrix query = 2; |
49 | | - // Key metadata |
| 49 | + // Key metadata. |
50 | 50 | 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. |
52 | 52 | 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. |
54 | 54 | 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; |
55 | 58 | } |
56 | 59 |
|
57 | | -// PNNS Shard Response |
| 60 | +// PNNS Shard Response. |
58 | 61 | message PNNSShardResponse { |
59 | | - // Encrypted reply, one per plaintext CRT component |
| 62 | + // Encrypted reply, one per plaintext CRT component. |
60 | 63 | 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. |
62 | 65 | repeated uint64 entry_ids = 2; |
63 | | - // Metadata for each entry in the database |
| 66 | + // Metadata for each entry in the database. |
64 | 67 | repeated bytes entry_metadatas = 3; |
65 | 68 | } |
66 | 69 |
|
67 | | -// PNNS Response |
| 70 | +// PNNS Response. |
68 | 71 | message PNNSResponse { |
69 | | - // PNNS responses from shards |
| 72 | + // PNNS responses from shards. |
70 | 73 | repeated PNNSShardResponse shard_responses = 1; |
71 | 74 | } |
0 commit comments