blob: 70b06567e66bfab6411623af8859bc3d6260bccd [file] [log] [blame]
nagendra modadugubdcfaa82017-09-17 17:11:36 -07001/*
2 * Copyright (C) 2017 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 = "proto3";
18
19package nugget.app.keymaster;
20
nagendra modaduguebfdd372017-10-25 23:52:25 -070021import "nugget/app/keymaster/keymaster_defs.proto";
22
Andrew Scullb5f24a52017-10-13 19:46:40 +010023message KeyParameter {
nagendra modaduguebfdd372017-10-25 23:52:25 -070024 Tag tag = 1; /* Possible values defined here
Andrew Scullb5f24a52017-10-13 19:46:40 +010025 * ::android::hardware::keymaster::V3_0::Tag
26 */
27 uint32 integer = 2;
28 uint64 long_integer = 3;
29 bytes blob = 4;
30}
31
32message KeyParameters {
33 repeated KeyParameter params = 1;
34}
35
36message KeyBlob {
37 bytes blob = 1;
38}
39
40message OperationHandle {
41 uint64 handle = 1;
42}
43
44message Certificate {
45 bytes data = 1;
46}
47
48message CertificateChain {
49 repeated Certificate certificates = 1;
50}
51
52message KeyCharacteristics {
nagendra modaduguc9c76972017-10-24 14:54:00 -070053 KeyParameters software_enforced = 1;
54 KeyParameters tee_enforced = 2;
55}
56
57/*
58 * Internal types.
59 */
60message RSAKey {
61 uint32 e = 1;
62 bytes d = 2;
63 bytes n = 3;
64}
65
66message ECKey {
67 uint32 curve_id = 1;
68 bytes d = 2;
69 bytes x = 3;
70 bytes y = 4;
71}
72
73message SymmetricKey {
74 uint32 algorithm = 1;
75 bytes material = 2;
Andrew Scullb5f24a52017-10-13 19:46:40 +010076}