1// Copyright 2023 Google LLC
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.
14syntax = "proto3";
15
16package cobalt;
17
18option java_multiple_files = true;
19option java_package = "com.google.cobalt";
20
21////////////////////////////////////////////////////////////////////////////////
22// NOTE: This file is used by the Cobalt client and the Cobalt servers.
23// The source-of-truth of this file is located in Cobalt's open source code
24// repository, and the file is copied to Android where it is used by the Cobalt
25// client. Do not edit the copy of this file in this Android repo as those edits
26// will be overwritten when the file is next copied.
27////////////////////////////////////////////////////////////////////////////////
28
29// A CobaltEncryptionKey carries a Cobalt encryption key (public key) along with
30// metadata about the key.
31message CobaltEncryptionKey {
32  // Serialized key.
33  bytes serialized_key = 1;
34
35  // Unique index for this key. Used in EncryptedMessage.
36  uint32 key_index = 2;
37
38  enum KeyPurpose {
39    UNSET = 0;
40    SHUFFLER = 1;
41    ANALYZER = 2;
42  }
43
44  // Encrypt messages for shuffler or analyzer?
45  KeyPurpose purpose = 3;
46}
47