summaryrefslogtreecommitdiffstats
path: root/authsecret/1.0/IAuthSecret.hal
blob: 9a0fd5fd5a894e14b8e0a34e0f7c0c262dba3ea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package android.hardware.authsecret@1.0;

/**
 * This security HAL allows vendor components to be cryptographically tied to
 * the primary user's credential. For example, security hardware could require
 * proof that the credential is known before applying updates.
 *
 * This HAL is optional so does not require an implementation on device.
 */
interface IAuthSecret {
    /**
     * When the primary user is unlocked, this method is passed a secret to
     * prove that is has been successfully unlocked. The primary user can either
     * be unlocked by a person entering their credential or by another party
     * using an escrow token e.g. a device administrator.
     *
     * The first time this is called, the secret must be used to provision state
     * that depends on the primary user's secret. The same secret must be passed
     * on each call until the next factory reset.
     *
     * Upon factory reset, any dependence on the secret must be removed as that
     * secret is now lost and must never be derived again. A new secret must be
     * created for the new primary user which must be used to newly provision
     * state the first time this method is called after factory reset.
     *
     * The secret must be at least 16 bytes.
     *
     * @param secret blob derived from the primary user's credential.
     */
    oneway primaryUserCredential(vec<uint8_t> secret);
};