blob: 0b1a398098fbf4526df753f5ded0b65d77efaec2 [file] [log] [blame]
Max Biresd6d89522018-02-23 10:53:10 -08001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package keystore;
20
21option optimize_for = LITE_RUNTIME;
22
23message KeyConfig {
24 // What type of encryption algorithm is this key being generated/imported for
25 // e.g. AES, RSA, etc
26 optional string algorithm = 1;
27
28 // Size of the key being generated/imported
29 optional int32 key_size = 2;
30
31 // Log whether the key was generated, imported, securely imported, or derived.
32 optional string origin = 3;
33
34 // What auth types does this key require? If none, then no auth required.
35 optional string user_auth_type = 4;
36
37 // If user authentication is required, is the requirement time based? If it
38 // is not time based then this field will not be used and the key is per
39 // operation. Per operation keys must be user authenticated on each usage.
40 optional int32 user_auth_key_timeout = 5;
41
42 // Track which padding modes this key supports.
43 repeated string padding = 6;
44
45 // Track which digests this key supports
46 repeated string digest = 7;
47
48 // Check what block mode is being used depending on the mode of encryption
49 repeated string block_mode = 8;
50
51 // Was the key generated/imported successfully?
52 optional bool was_creation_successful = 9;
53
54 // What purposes can this key be used for?
55 repeated string purpose = 10;
56
57 // Which ec curve was selected if elliptic curve cryptography is in use
58 optional string ec_curve = 11;
59
60 // Standalone or is a file system required
61 optional string key_blob_usage_reqs = 12;
62}