Home
last modified time | relevance | path

Searched refs:SecretKey (Results 1 – 25 of 55) sorted by relevance

123

/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DWrappedKeyTest.java43 import javax.crypto.SecretKey;
73 SecretKey rawKey = generateKey(); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata()
82 SecretKey unwrappedKey = (SecretKey) cipher.unwrap( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata()
92 SecretKey rawKey = generateKey(); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
101 SecretKey unwrappedKey = (SecretKey) cipher.unwrap( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
110 SecretKey rawKey = generateKey(); in fromSecretKey_returnsAKeyWithTheGenerationIdOfTheWrappingKey()
121 SecretKey appKey = generateKey(); in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
127 Map<String, Pair<SecretKey, byte[]>> unwrappedKeys = WrappedKey.unwrapKeys( in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
140 SecretKey appKey = generateKey(); in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
146 Map<String, Pair<SecretKey, byte[]>> unwrappedKeys = WrappedKey.unwrapKeys( in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
[all …]
DTestOnlyInsecureCertificateHelperTest.java19 import javax.crypto.SecretKey;
68 Map<String, Pair<SecretKey, byte[]>> rawKeys = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_emptyKeysList()
69 Map<String, Pair<SecretKey, byte[]>> expectedResult = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_emptyKeysList()
71 Map<String, Pair<SecretKey, byte[]>> filteredKeys = in testKeepOnlyWhitelistedInsecureKeys_emptyKeysList()
79 Map<String, Pair<SecretKey, byte[]>> rawKeys = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey()
80 Map<String, Pair<SecretKey, byte[]>> expectedResult = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey()
85 Map<String, Pair<SecretKey, byte[]>> filteredKeys = in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey()
93 Map<String, Pair<SecretKey, byte[]>> rawKeys = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_singleWhitelistedKey()
94 Map<String, Pair<SecretKey, byte[]>> expectedResult = new HashMap<>(); in testKeepOnlyWhitelistedInsecureKeys_singleWhitelistedKey()
100 Map<String, Pair<SecretKey, byte[]>> filteredKeys = in testKeepOnlyWhitelistedInsecureKeys_singleWhitelistedKey()
[all …]
DKeySyncUtilsTest.java47 import javax.crypto.SecretKey;
91 SecretKey key = KeySyncUtils.generateRecoveryKey(); in generateRecoveryKey_returnsA256BitKey()
98 SecretKey a = KeySyncUtils.generateRecoveryKey(); in generateRecoveryKey_generatesANewKeyEachTime()
99 SecretKey b = KeySyncUtils.generateRecoveryKey(); in generateRecoveryKey_generatesANewKeyEachTime()
133 SecretKey recoveryKey = KeySyncUtils.generateRecoveryKey(); in decryptApplicationKey_decryptsAnApplicationKey_nullMetadata()
134 SecretKey applicationKey = generateApplicationKey(); in decryptApplicationKey_decryptsAnApplicationKey_nullMetadata()
150 SecretKey recoveryKey = KeySyncUtils.generateRecoveryKey(); in decryptApplicationKey_decryptsAnApplicationKey_nonNullMetadata()
151 SecretKey applicationKey = generateApplicationKey(); in decryptApplicationKey_decryptsAnApplicationKey_nonNullMetadata()
188 SecretKey recoveryKey = KeySyncUtils.generateRecoveryKey(); in decryptApplicationKey_throwsIfWrongMetadata()
226 SecretKey recoveryKey = KeySyncUtils.generateRecoveryKey(); in decryptRecoveryKey_decryptsALocallyEncryptedKey()
[all …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/keys/
DTertiaryKeyGeneratorTest.java30 import javax.crypto.SecretKey;
50 SecretKey secretKey = mTertiaryKeyGenerator.generate(); in generate_generatesAESKeys()
58 SecretKey secretKey = mTertiaryKeyGenerator.generate(); in generate_generates256BitKeys()
68 SecretKey key1 = mTertiaryKeyGenerator.generate(); in generate_generatesNewKeys()
69 SecretKey key2 = mTertiaryKeyGenerator.generate(); in generate_generatesNewKeys()
DRecoverableKeyStoreSecondaryKeyTest.java40 import javax.crypto.SecretKey;
51 private SecretKey mGeneratedSecretKey;
85 SecretKey secretKey = mSecondaryKey.getSecretKey(); in getSecretKey()
/frameworks/base/services/backup/java/com/android/server/backup/encryption/keys/
DRecoverableKeyStoreSecondaryKeyManager.java31 import javax.crypto.SecretKey;
73 SecretKey key = (SecretKey) mRecoveryController.getKey(alias); in generate()
99 SecretKey secretKey = (SecretKey) mRecoveryController.getKey(alias); in get()
DRecoverableKeyStoreSecondaryKey.java27 import javax.crypto.SecretKey;
39 private final SecretKey mSecretKey;
48 public RecoverableKeyStoreSecondaryKey(String alias, SecretKey secretKey) { in RecoverableKeyStoreSecondaryKey()
62 public SecretKey getSecretKey() { in getSecretKey()
DTertiaryKeyGenerator.java23 import javax.crypto.SecretKey;
44 public SecretKey generate() { in generate()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DWrappedKey.java35 import javax.crypto.SecretKey;
64 public static WrappedKey fromSecretKey(PlatformEncryptionKey wrappingKey, SecretKey key, in fromSecretKey()
200 public static Map<String, Pair<SecretKey, byte[]>> unwrapKeys( in unwrapKeys()
205 HashMap<String, Pair<SecretKey, byte[]>> unwrappedKeys = new HashMap<>(); in unwrapKeys()
225 SecretKey key; in unwrapKeys()
227 key = (SecretKey) cipher.unwrap( in unwrapKeys()
DTestOnlyInsecureCertificateHelper.java35 import javax.crypto.SecretKey;
116 public Map<String, Pair<SecretKey, byte[]>> keepOnlyWhitelistedInsecureKeys( in keepOnlyWhitelistedInsecureKeys() argument
117 Map<String, Pair<SecretKey, byte[]>> rawKeys) { in keepOnlyWhitelistedInsecureKeys()
121 Map<String, Pair<SecretKey, byte[]>> filteredKeys = new HashMap<>(); in keepOnlyWhitelistedInsecureKeys()
122 for (Map.Entry<String, Pair<SecretKey, byte[]>> entry : rawKeys.entrySet()) { in keepOnlyWhitelistedInsecureKeys()
DKeySyncUtils.java40 import javax.crypto.SecretKey;
87 SecretKey recoveryKey in thmEncryptRecoveryKey()
126 static byte[] locallyEncryptRecoveryKey(byte[] lockScreenHash, SecretKey recoveryKey) in locallyEncryptRecoveryKey()
140 public static SecretKey generateRecoveryKey() throws NoSuchAlgorithmException { in generateRecoveryKey()
158 SecretKey recoveryKey, Map<String, Pair<SecretKey, byte[]>> keys) in encryptKeysWithRecoveryKey() argument
162 SecretKey key = keys.get(alias).first; in encryptKeysWithRecoveryKey()
DRecoverableKeyGenerator.java31 import javax.crypto.SecretKey;
102 SecretKey key = mKeyGenerator.generateKey(); in generateAndStoreKey()
146 SecretKey key = new SecretKeySpec(keyBytes, SECRET_KEY_ALGORITHM); in importKey()
DSecureBox.java50 import javax.crypto.SecretKey;
203 SecretKey encryptionKey = hkdfDeriveKey(keyingMaterial, HKDF_SALT, hkdfInfo); in encrypt()
272 SecretKey decryptionKey = hkdfDeriveKey(keyingMaterial, HKDF_SALT, hkdfInfo); in decrypt()
301 private static SecretKey hkdfDeriveKey(byte[] secret, byte[] salt, byte[] info) in hkdfDeriveKey()
325 private static byte[] aesGcmEncrypt(SecretKey key, byte[] nonce, byte[] plaintext, byte[] aad) in aesGcmEncrypt()
335 private static byte[] aesGcmDecrypt(SecretKey key, byte[] nonce, byte[] ciphertext, byte[] aad) in aesGcmDecrypt()
341 AesGcmOperation operation, SecretKey key, byte[] nonce, byte[] text, byte[] aad) in aesGcmInternal()
/frameworks/base/services/core/java/com/android/server/locksettings/
DSyntheticPasswordCrypto.java41 import javax.crypto.SecretKey;
55 private static byte[] decrypt(SecretKey key, byte[] blob) in decrypt()
69 private static byte[] encrypt(SecretKey key, byte[] blob) in encrypt()
129 SecretKey decryptionKey = (SecretKey) keyStore.getKey(keyAlias, null); in decryptBlobV1()
143 SecretKey decryptionKey = (SecretKey) keyStore.getKey(keyAlias, null); in decryptBlob()
160 SecretKey secretKey = keyGenerator.generateKey(); in createBlob()
/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/
DChunkHasher.java23 import javax.crypto.SecretKey;
29 private final SecretKey mSecretKey;
32 public ChunkHasher(SecretKey secretKey) { in ChunkHasher()
DChunkEncryptor.java28 import javax.crypto.SecretKey;
37 private final SecretKey mSecretKey;
44 public ChunkEncryptor(SecretKey secretKey, SecureRandom secureRandom) { in ChunkEncryptor()
/frameworks/base/services/backup/java/com/android/server/backup/utils/
DPasswordUtils.java28 import javax.crypto.SecretKey;
51 public static SecretKey buildPasswordKey(String algorithm, String pw, byte[] salt, int rounds) { in buildPasswordKey()
66 SecretKey key = buildPasswordKey(algorithm, pw, salt, rounds); in buildPasswordHash()
122 private static SecretKey buildCharArrayKey(String algorithm, char[] pwArray, byte[] salt, in buildCharArrayKey()
/frameworks/opt/net/ike/src/java/com/android/ike/ikev2/message/
DIkeEncryptedPayloadBody.java29 import javax.crypto.SecretKey;
59 byte[] message, Mac integrityMac, int checksumLen, Cipher decryptCipher, SecretKey dKey) in IkeEncryptedPayloadBody()
100 SecretKey eKey) { in IkeEncryptedPayloadBody()
122 SecretKey eKey, in IkeEncryptedPayloadBody()
198 byte[] dataToEncrypt, Cipher encryptCipher, SecretKey eKey, byte[] iv, byte[] padding) { in encrypt()
218 static byte[] decrypt(byte[] encryptedData, Cipher decryptCipher, SecretKey dKey, byte[] iv) in decrypt()
DIkeSkPayload.java26 import javax.crypto.SecretKey;
59 SecretKey dKey) in IkeSkPayload()
86 SecretKey eKey) { in IkeSkPayload()
/frameworks/base/keystore/java/android/security/keystore/
DAndroidKeyStoreSecretKey.java19 import javax.crypto.SecretKey;
26 public class AndroidKeyStoreSecretKey extends AndroidKeyStoreKey implements SecretKey {
DAndroidKeyStoreSecretKeyFactorySpi.java34 import javax.crypto.SecretKey;
48 protected KeySpec engineGetKeySpec(SecretKey key, in engineGetKeySpec()
225 protected SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException { in engineGenerateSecret()
232 protected SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException { in engineTranslateKey()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/testing/
DCryptoTestUtils.java23 import javax.crypto.SecretKey;
32 public static SecretKey generateAesKey() throws NoSuchAlgorithmException { in generateAesKey()
/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/cdc/
DFingerprintMixer.java25 import javax.crypto.SecretKey;
59 public FingerprintMixer(SecretKey secretKey, byte[] salt) throws InvalidKeyException { in FingerprintMixer()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DDataIntegrityChecker.java49 import javax.crypto.SecretKey;
177 SecretKey secretKeyReference = getOrCreateSecretKey(keyAlias); in encrypt()
204 SecretKey secretKeyReference = getOrCreateSecretKey(encryptedData.getKeyAlias()); in decrypt()
225 private SecretKey getOrCreateSecretKey(String keyAlias) { in getOrCreateSecretKey()
226 SecretKey secretKey = null; in getOrCreateSecretKey()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/
DChunkHasherTest.java31 import javax.crypto.SecretKey;
43 private SecretKey mSecretKey;

123