blob: 0f2c2fc6c9590cee95f1803df8cadd721329f3ca [file] [log] [blame]
Robert Berry25f51352018-03-28 20:26:57 +01001/*
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
17package com.android.server.locksettings.recoverablekeystore.serialization;
18
19/**
20 * Describes the XML schema of the {@link android.security.keystore.recovery.KeyChainSnapshot} file.
21 */
22class KeyChainSnapshotSchema {
23 static final String NAMESPACE = null;
24
25 static final String OUTPUT_ENCODING = "UTF-8";
26
27 static final String CERTIFICATE_FACTORY_TYPE = "X.509";
28 static final String CERT_PATH_ENCODING = "PkiPath";
29
30 static final String TAG_KEY_CHAIN_SNAPSHOT = "keyChainSnapshot";
31
32 static final String TAG_SNAPSHOT_VERSION = "snapshotVersion";
33 static final String TAG_COUNTER_ID = "counterId";
34 static final String TAG_MAX_ATTEMPTS = "maxAttempts";
35 static final String TAG_RECOVERY_KEY_MATERIAL = "recoveryKeyMaterial";
36 static final String TAG_SERVER_PARAMS = "serverParams";
37 static final String TAG_TRUSTED_HARDWARE_CERT_PATH = "thmCertPath";
Dmitry Dementyevebdd19c2018-04-10 16:03:52 -070038 static final String TAG_BACKEND_PUBLIC_KEY = "backendPublicKey"; // Deprecated.
Robert Berry25f51352018-03-28 20:26:57 +010039
40 static final String TAG_KEY_CHAIN_PROTECTION_PARAMS_LIST =
41 "keyChainProtectionParamsList";
42 static final String TAG_KEY_CHAIN_PROTECTION_PARAMS = "keyChainProtectionParams";
43 static final String TAG_USER_SECRET_TYPE = "userSecretType";
44 static final String TAG_LOCK_SCREEN_UI_TYPE = "lockScreenUiType";
45
46 static final String TAG_KEY_DERIVATION_PARAMS = "keyDerivationParams";
47 static final String TAG_ALGORITHM = "algorithm";
48 static final String TAG_MEMORY_DIFFICULTY = "memoryDifficulty";
49 static final String TAG_SALT = "salt";
50
51 static final String TAG_APPLICATION_KEYS = "applicationKeysList";
52 static final String TAG_APPLICATION_KEY = "applicationKey";
53 static final String TAG_ALIAS = "alias";
54 static final String TAG_KEY_MATERIAL = "keyMaterial";
55
56 // Statics only
57 private KeyChainSnapshotSchema() {}
58}