Home
last modified time | relevance | path

Searched refs:recoveryKey (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DKeySyncUtilsTest.java133 SecretKey recoveryKey = KeySyncUtils.generateRecoveryKey(); in decryptApplicationKey_decryptsAnApplicationKey_nullMetadata() local
137 recoveryKey, in decryptApplicationKey_decryptsAnApplicationKey_nullMetadata()
141 byte[] keyMaterial = KeySyncUtils.decryptApplicationKey(recoveryKey.getEncoded(), in decryptApplicationKey_decryptsAnApplicationKey_nullMetadata()
150 SecretKey recoveryKey = KeySyncUtils.generateRecoveryKey(); in decryptApplicationKey_decryptsAnApplicationKey_nonNullMetadata() local
154 recoveryKey, in decryptApplicationKey_decryptsAnApplicationKey_nonNullMetadata()
158 byte[] keyMaterial = KeySyncUtils.decryptApplicationKey(recoveryKey.getEncoded(), in decryptApplicationKey_decryptsAnApplicationKey_nonNullMetadata()
188 SecretKey recoveryKey = KeySyncUtils.generateRecoveryKey(); in decryptApplicationKey_throwsIfWrongMetadata() local
192 recoveryKey, in decryptApplicationKey_throwsIfWrongMetadata()
202 KeySyncUtils.decryptApplicationKey(recoveryKey.getEncoded(), in decryptApplicationKey_throwsIfWrongMetadata()
209 KeySyncUtils.decryptApplicationKey(recoveryKey.getEncoded(), in decryptApplicationKey_throwsIfWrongMetadata()
[all …]
DRecoverableKeyStoreManagerTest.java964 SecretKey recoveryKey = randomRecoveryKey(); in recoverKeyChainSnapshot_throwsIfFailedToDecryptAllApplicationKeys() local
966 keyClaimant, TEST_SECRET, TEST_VAULT_PARAMS, recoveryKey); in recoverKeyChainSnapshot_throwsIfFailedToDecryptAllApplicationKeys()
994 SecretKey recoveryKey = randomRecoveryKey(); in recoverKeyChainSnapshot_doesNotThrowIfNoApplicationKeysToBeDecrypted() local
996 keyClaimant, TEST_SECRET, TEST_VAULT_PARAMS, recoveryKey); in recoverKeyChainSnapshot_doesNotThrowIfNoApplicationKeysToBeDecrypted()
1014 SecretKey recoveryKey = randomRecoveryKey(); in recoverKeyChainSnapshot_returnsDecryptedKeys() local
1016 keyClaimant, TEST_SECRET, TEST_VAULT_PARAMS, recoveryKey); in recoverKeyChainSnapshot_returnsDecryptedKeys()
1021 encryptedApplicationKey(recoveryKey, applicationKeyBytes)) in recoverKeyChainSnapshot_returnsDecryptedKeys()
1044 SecretKey recoveryKey = randomRecoveryKey(); in recoverKeyChainSnapshot_worksOnOtherApplicationKeysIfOneDecryptionFails() local
1046 keyClaimant, TEST_SECRET, TEST_VAULT_PARAMS, recoveryKey); in recoverKeyChainSnapshot_worksOnOtherApplicationKeysIfOneDecryptionFails()
1059 encryptedApplicationKey(recoveryKey, applicationKeyBytes2)) in recoverKeyChainSnapshot_worksOnOtherApplicationKeysIfOneDecryptionFails()
[all …]
DKeySyncTaskTest.java536 byte[] recoveryKey = decryptThmEncryptedKey( in run_sendsEncryptedKeysIfAvailableToSync_withRawPublicKey()
556 recoveryKey, keyData.getEncryptedKeyMaterial(), TEST_APP_KEY_METADATA_NULL); in run_sendsEncryptedKeysIfAvailableToSync_withRawPublicKey()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DKeySyncUtils.java87 SecretKey recoveryKey in thmEncryptRecoveryKey() argument
89 byte[] encryptedRecoveryKey = locallyEncryptRecoveryKey(lockScreenHash, recoveryKey); in thmEncryptRecoveryKey()
126 static byte[] locallyEncryptRecoveryKey(byte[] lockScreenHash, SecretKey recoveryKey) in locallyEncryptRecoveryKey() argument
132 /*payload=*/ recoveryKey.getEncoded()); in locallyEncryptRecoveryKey()
158 SecretKey recoveryKey, Map<String, Pair<SecretKey, byte[]>> keys) in encryptKeysWithRecoveryKey() argument
178 /*sharedSecret=*/ recoveryKey.getEncoded(), in encryptKeysWithRecoveryKey()
276 public static byte[] decryptApplicationKey(byte[] recoveryKey, byte[] encryptedApplicationKey, in decryptApplicationKey() argument
287 /*sharedSecret=*/ recoveryKey, in decryptApplicationKey()
DKeySyncTask.java288 SecretKey recoveryKey; in syncKeysForAgent() local
290 recoveryKey = generateRecoveryKey(); in syncKeysForAgent()
299 recoveryKey, rawKeysWithMetadata); in syncKeysForAgent()
330 recoveryKey); in syncKeysForAgent()
DRecoverableKeyStoreManager.java619 byte[] recoveryKey = decryptRecoveryKey(sessionEntry, encryptedRecoveryKey); in recoverKeyChainSnapshot()
620 Map<String, byte[]> keysByAlias = recoverApplicationKeys(recoveryKey, in recoverKeyChainSnapshot()
869 private @NonNull Map<String, byte[]> recoverApplicationKeys(@NonNull byte[] recoveryKey, in recoverApplicationKeys() argument
878 byte[] keyMaterial = KeySyncUtils.decryptApplicationKey(recoveryKey, in recoverApplicationKeys()