/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
H A D | WrappedKeyTest.java | 74 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NULL_METADATA); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() 93 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NON_NULL_METADATA); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() 111 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NULL_METADATA); in fromSecretKey_returnsAKeyWithTheGenerationIdOfTheWrappingKey() 121 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata() 123 HashMap<String, WrappedKey> keysByAlias = new HashMap<>(); in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata() 140 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata() 142 HashMap<String, WrappedKey> keysByAlias = new HashMap<>(); in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata() 159 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_doesNotDieIfSomeKeysAreUnwrappable() 161 HashMap<String, WrappedKey> keysByAlias = new HashMap<>(); in decryptWrappedKeys_doesNotDieIfSomeKeysAreUnwrappable() 174 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_throwsIfPlatformKeyGenerationIdDoesNotMatch() [all …]
|
H A D | RecoverableKeyGeneratorTest.java | 101 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey_nullMetadata() 111 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey_nonNullMetadata() 129 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 163 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in importKey_storesTheWrappedVersionOfTheRawMaterial()
|
H A D | KeySyncTaskTest.java | 248 WrappedKey.fromSecretKey(mEncryptKey, applicationKey, TEST_APP_KEY_METADATA_NULL)); in run_doesNotSendAnythingIfNoRecoveryAgentSet() 264 WrappedKey.fromSecretKey(mEncryptKey, applicationKey, TEST_APP_KEY_METADATA_NULL)); in run_doesNotSendAnythingIfNoDeviceIdIsSet() 829 WrappedKey.fromSecretKey(mEncryptKey, applicationKey, metadata)); in addApplicationKey()
|
H A D | RecoverableKeyStoreManagerTest.java | 1273 WrappedKey wrappedKey = new WrappedKey(NONCE, KEY_MATERIAL, keyMetadata, GENERATION_ID, in setRecoveryStatus()
|
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/ |
H A D | RecoverableKeyStoreDbTest.java | 89 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey() 116 WrappedKey key1 = new WrappedKey( in insertKey_allowsTwoUidsToHaveSameAlias() 121 WrappedKey key2 = new WrappedKey( in insertKey_allowsTwoUidsToHaveSameAlias() 143 WrappedKey key = new WrappedKey( in removeKey_removesAKey() 228 WrappedKey wrappedKey = new WrappedKey( in getAllKeys_doesNotReturnKeysWithBadGenerationId() 246 WrappedKey wrappedKey = new WrappedKey( in getAllKeys_doesNotReturnKeysWithBadUserId() 382 WrappedKey wrappedKey = in setPlatformKeyGenerationId_invalidatesExistingKeysForUser() 432 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, in setRecoveryStatus_withSingleKey() 459 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, in getStatusForAllKeys_with3Keys() 517 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, in testInvalidateKeysForUser_withSingleKey() [all …]
|
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
H A D | WrappedKey.java | 43 public class WrappedKey { class 64 public static WrappedKey fromSecretKey(PlatformEncryptionKey wrappingKey, SecretKey key, in fromSecretKey() 100 return new WrappedKey( in fromSecretKey() 118 public WrappedKey(byte[] nonce, byte[] keyMaterial, @Nullable byte[] keyMetadata, in WrappedKey() method in WrappedKey 136 public WrappedKey(byte[] nonce, byte[] keyMaterial, @Nullable byte[] keyMetadata, in WrappedKey() method in WrappedKey 202 Map<String, WrappedKey> wrappedKeys) in unwrapKeys() 210 WrappedKey wrappedKey = wrappedKeys.get(alias); in unwrapKeys()
|
H A D | RecoverableKeyGenerator.java | 104 WrappedKey wrappedKey = WrappedKey.fromSecretKey(platformKey, key, metadata); in generateAndStoreKey() 148 WrappedKey wrappedKey = WrappedKey.fromSecretKey(platformKey, key, metadata); in importKey()
|
H A D | KeySyncTask.java | 429 Map<String, WrappedKey> wrappedKeys = mRecoverableKeyStoreDb.getAllKeys( in getKeysToSync() 431 return WrappedKey.unwrapKeys(decryptKey, wrappedKeys); in getKeysToSync()
|
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/ |
H A D | CleanupManager.java | 26 import com.android.server.locksettings.recoverablekeystore.WrappedKey; 163 Map<String, WrappedKey> allKeys = mDatabase.getAllKeys(userId, uid, generationId); in removeAllKeysForRecoveryAgent()
|
H A D | RecoverableKeyStoreDb.java | 31 import com.android.server.locksettings.recoverablekeystore.WrappedKey; 97 public long insertKey(int userId, int uid, String alias, WrappedKey wrappedKey) { in insertKey() 122 @Nullable public WrappedKey getKey(int uid, String alias) { in getKey() 176 return new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, recoveryStatus); in getKey() 265 public @NonNull Map<String, WrappedKey> getAllKeys(int userId, int recoveryAgentUid, in getAllKeys() 295 HashMap<String, WrappedKey> keys = new HashMap<>(); in getAllKeys() 315 keys.put(alias, new WrappedKey(nonce, keyMaterial, keyMetadata, in getAllKeys()
|