/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/keys/ |
D | KeyWrapUtils.java | 26 import javax.crypto.Cipher; 72 Cipher cipher = getCipher(); in unwrap() 75 Cipher.UNWRAP_MODE, in unwrap() 79 return (SecretKey) cipher.unwrap(wrappedKey.key, KEY_ALGORITHM, Cipher.SECRET_KEY); in unwrap() 94 Cipher cipher = getCipher(); in wrap() 95 cipher.init(Cipher.WRAP_MODE, secondaryKey); in wrap() 126 private static Cipher getCipher() throws NoSuchPaddingException, NoSuchAlgorithmException { in getCipher() 127 return Cipher.getInstance(AES_GCM_MODE); in getCipher()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
D | WrappedKey.java | 32 import javax.crypto.Cipher; 72 Cipher cipher; in fromSecretKey() 74 cipher = Cipher.getInstance(KEY_WRAP_CIPHER_ALGORITHM); in fromSecretKey() 80 cipher.init(Cipher.WRAP_MODE, wrappingKey.getKey()); in fromSecretKey() 206 Cipher cipher = Cipher.getInstance(KEY_WRAP_CIPHER_ALGORITHM); in unwrapKeys() 222 Cipher.UNWRAP_MODE, in unwrapKeys() 228 wrappedKey.getKeyMaterial(), APPLICATION_KEY_ALGORITHM, Cipher.SECRET_KEY); in unwrapKeys()
|
D | SecureBox.java | 45 import javax.crypto.Cipher; 343 Cipher cipher; in aesGcmInternal() 345 cipher = Cipher.getInstance(ENC_ALG); in aesGcmInternal() 353 cipher.init(Cipher.DECRYPT_MODE, key, spec); in aesGcmInternal() 355 cipher.init(Cipher.ENCRYPT_MODE, key, spec); in aesGcmInternal()
|
D | PlatformKeyManager.java | 44 import javax.crypto.Cipher; 309 Cipher.getInstance(KEY_WRAP_CIPHER_ALGORITHM).init(Cipher.UNWRAP_MODE, in ensureDecryptionKeyIsValid()
|
/frameworks/base/core/java/android/hardware/biometrics/ |
D | CryptoObject.java | 25 import javax.crypto.Cipher; 41 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() 65 public Cipher getCipher() { in getCipher() 66 return mCrypto instanceof Cipher ? (Cipher) mCrypto : null; in getCipher()
|
/frameworks/base/packages/BackupEncryption/proto/ |
D | wrapped_key.proto | 10 // Type of Cipher algorithm the key is used for. 17 // What kind of Cipher algorithm the key is used for. We assume at the moment 20 // change Cipher algorithm. 26 // The Cipher with which the key was encrypted. 36 // Cipher algorithm used to wrap the key. We assume at the moment that this 38 // forwards compatibility if at some point we need to change Cipher algorithm. 41 // The nonce used to initialize the Cipher in AES/256/GCM mode.
|
D | backup_chunks_metadata.proto | 24 // Cipher type with which the chunks are encrypted. For now we only support AES/GCM/NoPadding, but 25 // this is for backwards-compatibility in case we need to change the default Cipher in the future. 70 // Cipher algorithm with which the chunks are encrypted. 118 // Cipher algorithm with which the chunk listing and chunks are encrypted.
|
/frameworks/base/services/core/java/com/android/server/locksettings/ |
D | RebootEscrowData.java | 31 import javax.crypto.Cipher; 114 Cipher c = Cipher.getInstance(CIPHER_ALGO); in fromEncryptedData() 115 c.init(Cipher.DECRYPT_MODE, key.getKey(), new IvParameterSpec(iv)); in fromEncryptedData() 137 Cipher cipher = Cipher.getInstance(CIPHER_ALGO); in fromSyntheticPassword() 138 cipher.init(Cipher.ENCRYPT_MODE, key.getKey()); in fromSyntheticPassword()
|
D | ManagedProfilePasswordCache.java | 41 import javax.crypto.Cipher; 114 Cipher cipher; in storePassword() 116 cipher = Cipher.getInstance("AES/GCM/NoPadding"); in storePassword() 117 cipher.init(Cipher.ENCRYPT_MODE, key); in storePassword() 152 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in retrievePassword() 153 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(128, iv)); in retrievePassword()
|
D | SyntheticPasswordCrypto.java | 38 import javax.crypto.Cipher; 65 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in decrypt() 67 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(DEFAULT_TAG_LENGTH_BITS, iv)); in decrypt() 78 Cipher cipher = Cipher.getInstance( in encrypt() 81 cipher.init(Cipher.ENCRYPT_MODE, key); in encrypt()
|
/frameworks/base/services/core/java/com/android/server/accounts/ |
D | CryptoHelper.java | 15 import javax.crypto.Cipher; 64 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encryptBundle() 65 cipher.init(Cipher.ENCRYPT_MODE, mEncryptionKey); in encryptBundle() 90 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decryptBundle() 91 cipher.init(Cipher.DECRYPT_MODE, mEncryptionKey, ivSpec); in decryptBundle()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
D | WrappedKeyTest.java | 41 import javax.crypto.Cipher; 77 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() 79 Cipher.UNWRAP_MODE, in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() 83 wrappedKey.getKeyMaterial(), KEY_ALGORITHM, Cipher.SECRET_KEY); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() 96 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() 98 Cipher.UNWRAP_MODE, in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() 102 wrappedKey.getKeyMaterial(), KEY_ALGORITHM, Cipher.SECRET_KEY); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
|
D | RecoverableKeyGeneratorTest.java | 46 import javax.crypto.Cipher; 130 Cipher cipher = Cipher.getInstance(KEY_WRAP_ALGORITHM); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 131 cipher.init(Cipher.DECRYPT_MODE, mDecryptKey.getKey(), in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 164 Cipher cipher = Cipher.getInstance(KEY_WRAP_ALGORITHM); in importKey_storesTheWrappedVersionOfTheRawMaterial() 165 cipher.init(Cipher.DECRYPT_MODE, mDecryptKey.getKey(), in importKey_storesTheWrappedVersionOfTheRawMaterial()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | WifiConfigStoreEncryptionUtil.java | 38 import javax.crypto.Cipher; 87 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encrypt() 90 cipher.init(Cipher.ENCRYPT_MODE, secretKeyReference); in encrypt() 119 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decrypt() 123 cipher.init(Cipher.DECRYPT_MODE, secretKeyReference, spec); in decrypt()
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/chunking/ |
D | ChunkEncryptor.java | 27 import javax.crypto.Cipher; 63 Cipher cipher; in encrypt() 65 cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encrypt() 67 Cipher.ENCRYPT_MODE, in encrypt()
|
/frameworks/base/keystore/java/android/security/keystore/ |
D | AndroidKeyStoreRSACipherSpi.java | 37 import javax.crypto.Cipher; 377 case Cipher.DECRYPT_MODE: in initKey() 378 case Cipher.UNWRAP_MODE: in initKey() 381 case Cipher.ENCRYPT_MODE: in initKey() 382 case Cipher.WRAP_MODE: in initKey() 398 case Cipher.ENCRYPT_MODE: in initKey() 399 case Cipher.WRAP_MODE: in initKey() 402 case Cipher.DECRYPT_MODE: in initKey() 403 case Cipher.UNWRAP_MODE: in initKey()
|
D | AndroidKeyStoreCipherSpiBase.java | 52 import javax.crypto.Cipher; 159 case Cipher.ENCRYPT_MODE: in init() 160 case Cipher.WRAP_MODE: in init() 163 case Cipher.DECRYPT_MODE: in init() 164 case Cipher.UNWRAP_MODE: in init() 686 case Cipher.SECRET_KEY: in engineUnwrap() 691 case Cipher.PRIVATE_KEY: in engineUnwrap() 702 case Cipher.PUBLIC_KEY: in engineUnwrap() 800 case Cipher.ENCRYPT_MODE: in opmodeToString() 802 case Cipher.DECRYPT_MODE: in opmodeToString() [all …]
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/ |
D | ChunkEncryptorTest.java | 43 import javax.crypto.Cipher; 149 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encrypt_decryptedResultCorrespondsToPlaintext() 151 Cipher.DECRYPT_MODE, in encrypt_decryptedResultCorrespondsToPlaintext()
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/tasks/ |
D | BackupFileDecryptorTask.java | 38 import javax.crypto.Cipher; 79 private final Cipher mCipher; 89 this.mCipher = Cipher.getInstance(CIPHER_ALGORITHM); in BackupFileDecryptorTask() 229 Cipher.DECRYPT_MODE, in decryptChunk() 288 Cipher.DECRYPT_MODE, in decryptChunkOrdering()
|
D | EncryptedBackupTask.java | 48 import javax.crypto.Cipher; 212 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encryptChunkOrdering() 217 Cipher.ENCRYPT_MODE, in encryptChunkOrdering()
|
/frameworks/base/identity/java/android/security/identity/ |
D | CredstoreIdentityCredential.java | 45 import javax.crypto.Cipher; 171 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in encryptMessageToReader() 173 cipher.init(Cipher.ENCRYPT_MODE, mSecretKey, encryptionParameterSpec); in encryptMessageToReader() 196 final Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in decryptMessageFromReader() 197 cipher.init(Cipher.DECRYPT_MODE, mReaderSecretKey, in decryptMessageFromReader()
|
/frameworks/base/services/backup/java/com/android/server/backup/fullbackup/ |
D | PerformAdbBackupTask.java | 59 import javax.crypto.Cipher; 156 Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding"); in emitAesBackupHeader() 158 c.init(Cipher.ENCRYPT_MODE, masterKeySpec); in emitAesBackupHeader() 175 Cipher mkC = Cipher.getInstance("AES/CBC/PKCS5Padding"); in emitAesBackupHeader() 176 mkC.init(Cipher.ENCRYPT_MODE, userKey); in emitAesBackupHeader()
|
/frameworks/base/services/backup/java/com/android/server/backup/restore/ |
D | PerformAdbRestoreTask.java | 48 import javax.crypto.Cipher; 222 Cipher c = Cipher.getInstance("AES/CBC/PKCS5Padding"); in attemptMasterKeyDecryption() 228 c.init(Cipher.DECRYPT_MODE, in attemptMasterKeyDecryption() 254 c.init(Cipher.DECRYPT_MODE, in attemptMasterKeyDecryption()
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/ |
D | KvBackupEncrypterTest.java | 53 import javax.crypto.Cipher; 279 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decryptChunk() 281 Cipher.DECRYPT_MODE, in decryptChunk()
|
D | EncryptedBackupTaskTest.java | 71 import javax.crypto.Cipher; 355 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decryptChunkOrdering() 357 Cipher.DECRYPT_MODE, in decryptChunkOrdering()
|