blob: d56ff16b9224fc4cd064e9803cb5dfabdb8e3936 [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
nagendra modadugu251238b2018-05-07 16:24:49 -070062message HardwareAuthToken {
63 uint64 challenge = 1;
64 uint64 user_id = 2;
65 uint64 authenticator_id = 3;
66 HardwareAuthenticatorType authenticator_type = 4;
67 uint64 timestamp = 5;
68 bytes mac = 6;
69}
70
nagendra modadugubdf53cd2017-12-04 21:28:02 -080071message VerificationToken {
72 uint64 challenge = 1;
73 uint64 timestamp = 2;
74 KeyParameters params_verified = 3;
75 SecurityLevel security_level = 4;
76 bytes mac = 5;
77}
78
nagendra modaduguc9c76972017-10-24 14:54:00 -070079/*
80 * Internal types.
81 */
82message RSAKey {
83 uint32 e = 1;
84 bytes d = 2;
85 bytes n = 3;
86}
87
88message ECKey {
nagendra modadugu95ac9bb2018-01-24 16:33:03 -080089 /* TODO: should this be EcCurve. */
nagendra modaduguc9c76972017-10-24 14:54:00 -070090 uint32 curve_id = 1;
91 bytes d = 2;
92 bytes x = 3;
93 bytes y = 4;
94}
95
96message SymmetricKey {
nagendra modadugu8e4a8fe2018-01-03 02:18:58 -080097 bytes material = 1;
Andrew Scullb5f24a52017-10-13 19:46:40 +010098}
Janis Danisevskis64a6d542018-05-29 21:56:21 -070099
100enum PresharedSecretStatus {
101 NOT_SET = 0;
102 ALREADY_SET = 1;
103}
nagendra modadugu16abee72018-06-06 11:49:04 -0700104
105enum AttestationSelector {
106 ATTEST_TEST = 0;
107 ATTEST_BATCH = 1;
108 ATTEST_INDIVIDUAL = 2;
109}