Skip to content

Commit 9961dae

Browse files
authored
Add PNNS SerializedProcessedDatabase (#9)
1 parent 25e8161 commit 9961dae

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2024 Apple Inc. and the Swift Homomorphic Encryption project authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
package apple.swift_homomorphic_encryption.pnns.v1;
17+
18+
import "apple/swift_homomorphic_encryption/pnns/v1/pnns.proto";
19+
import "apple/swift_homomorphic_encryption/pnns/v1/pnns_server_config.proto";
20+
21+
// Serialized pre-processed nearest neighbors database.
22+
message SerializedProcessedDatabase {
23+
// Pre-computed values for the nearest neighbors computation, one per plaintext CRT modulus.
24+
repeated SerializedPlaintextMatrix plaintext_matrices = 1;
25+
// Unique identifier for each entry in the database.
26+
repeated uint64 entry_ids = 2;
27+
// Metadata for each entry in the database.
28+
repeated bytes entry_metadatas = 3;
29+
// Configuration used to create the database.
30+
ServerConfig server_config = 4;
31+
}

0 commit comments

Comments
 (0)