blob: f5399eef4f62c3bfaa063753fdb851e7d84d88c4 [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
nagendra modadugubdf53cd2017-12-04 21:28:02 -080057message HmacSharingParameters {
58 bytes seed = 1;
59 bytes nonce = 2;
60}
61
62message VerificationToken {
63 uint64 challenge = 1;
64 uint64 timestamp = 2;
65 KeyParameters params_verified = 3;
66 SecurityLevel security_level = 4;
67 bytes mac = 5;
68}
69
nagendra modaduguc9c76972017-10-24 14:54:00 -070070/*
71 * Internal types.
72 */
73message RSAKey {
74 uint32 e = 1;
75 bytes d = 2;
76 bytes n = 3;
77}
78
79message ECKey {
nagendra modadugu95ac9bb2018-01-24 16:33:03 -080080 /* TODO: should this be EcCurve. */
nagendra modaduguc9c76972017-10-24 14:54:00 -070081 uint32 curve_id = 1;
82 bytes d = 2;
83 bytes x = 3;
84 bytes y = 4;
85}
86
87message SymmetricKey {
nagendra modadugu8e4a8fe2018-01-03 02:18:58 -080088 bytes material = 1;
Andrew Scullb5f24a52017-10-13 19:46:40 +010089}