Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 24 of 24) sorted by relevance

/frameworks/base/services/core/java/com/android/server/accounts/
DCryptoHelper.java64 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encryptBundle() local
65 cipher.init(Cipher.ENCRYPT_MODE, mEncryptionKey); in encryptBundle()
66 byte[] encryptedBytes = cipher.doFinal(clearBytes); in encryptBundle()
67 byte[] iv = cipher.getIV(); in encryptBundle()
90 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decryptBundle() local
91 cipher.init(Cipher.DECRYPT_MODE, mEncryptionKey, ivSpec); in decryptBundle()
92 byte[] decryptedBytes = cipher.doFinal(encryptedBytes); in decryptBundle()
116 …private byte[] createMac(@NonNull byte[] cipher, @NonNull byte[] iv) throws GeneralSecurityExcepti… in createMac() argument
119 mac.update(cipher); in createMac()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/keys/
DKeyWrapUtils.java72 Cipher cipher = getCipher(); in unwrap() local
74 cipher.init( in unwrap()
79 return (SecretKey) cipher.unwrap(wrappedKey.key, KEY_ALGORITHM, Cipher.SECRET_KEY); in unwrap()
94 Cipher cipher = getCipher(); in wrap() local
95 cipher.init(Cipher.WRAP_MODE, secondaryKey); in wrap()
98 wrappedKey.key = cipher.wrap(tertiaryKey); in wrap()
99 wrappedKey.nonce = cipher.getIV(); in wrap()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DWrappedKey.java72 Cipher cipher; in fromSecretKey() local
74 cipher = Cipher.getInstance(KEY_WRAP_CIPHER_ALGORITHM); in fromSecretKey()
80 cipher.init(Cipher.WRAP_MODE, wrappingKey.getKey()); in fromSecretKey()
83 encryptedKeyMaterial = cipher.wrap(key); in fromSecretKey()
101 /*nonce=*/ cipher.getIV(), in fromSecretKey()
206 Cipher cipher = Cipher.getInstance(KEY_WRAP_CIPHER_ALGORITHM); in unwrapKeys() local
221 cipher.init( in unwrapKeys()
227 key = (SecretKey) cipher.unwrap( in unwrapKeys()
DSecureBox.java343 Cipher cipher; in aesGcmInternal() local
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()
362 cipher.updateAAD(aad); in aesGcmInternal()
363 return cipher.doFinal(text); in aesGcmInternal()
/frameworks/base/services/core/java/com/android/server/locksettings/
DManagedProfilePasswordCache.java114 Cipher cipher; in storePassword() local
116 cipher = Cipher.getInstance("AES/GCM/NoPadding"); in storePassword()
117 cipher.init(Cipher.ENCRYPT_MODE, key); in storePassword()
118 byte[] ciphertext = cipher.doFinal(password.getCredential()); in storePassword()
119 byte[] iv = cipher.getIV(); in storePassword()
152 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in retrievePassword() local
153 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(128, iv)); in retrievePassword()
154 credential = cipher.doFinal(ciphertext); in retrievePassword()
DSyntheticPasswordCrypto.java69 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in decrypt() local
71 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(DEFAULT_TAG_LENGTH_BITS, iv)); in decrypt()
72 return cipher.doFinal(ciphertext); in decrypt()
82 Cipher cipher = Cipher.getInstance( in encrypt() local
85 cipher.init(Cipher.ENCRYPT_MODE, key); in encrypt()
86 byte[] ciphertext = cipher.doFinal(blob); in encrypt()
87 byte[] iv = cipher.getIV(); in encrypt()
91 final GCMParameterSpec spec = cipher.getParameters().getParameterSpec( in encrypt()
DAesEncryptionUtil.java93 Cipher cipher = Cipher.getInstance(CIPHER_ALGO); in encrypt() local
94 cipher.init(Cipher.ENCRYPT_MODE, key); in encrypt()
95 cipherText = cipher.doFinal(plainText); in encrypt()
96 iv = cipher.getIV(); in encrypt()
DLockSettingsService.java1335 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in getDecryptedPasswordForTiedProfile() local
1338 cipher.init(Cipher.DECRYPT_MODE, decryptionKey, new GCMParameterSpec(128, iv)); in getDecryptedPasswordForTiedProfile()
1339 decryptionResult = cipher.doFinal(encryptedPassword); in getDecryptedPasswordForTiedProfile()
1943 Cipher cipher = Cipher.getInstance( in tieProfileLockToParent() local
1946 cipher.init(Cipher.ENCRYPT_MODE, keyStoreEncryptionKey); in tieProfileLockToParent()
1947 encryptionResult = cipher.doFinal(password.getCredential()); in tieProfileLockToParent()
1948 iv = cipher.getIV(); in tieProfileLockToParent()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/chunking/
DChunkEncryptor.java63 Cipher cipher; in encrypt() local
65 cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encrypt()
66 cipher.init( in encrypt()
78 encryptedBytes = cipher.doFinal(plaintext); in encrypt()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DRecoverableKeyGeneratorTest.java130 Cipher cipher = Cipher.getInstance(KEY_WRAP_ALGORITHM); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() local
131 cipher.init(Cipher.DECRYPT_MODE, mDecryptKey.getKey(), in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial()
133 byte[] unwrappedMaterial = cipher.doFinal(wrappedKey.getKeyMaterial()); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial()
164 Cipher cipher = Cipher.getInstance(KEY_WRAP_ALGORITHM); in importKey_storesTheWrappedVersionOfTheRawMaterial() local
165 cipher.init(Cipher.DECRYPT_MODE, mDecryptKey.getKey(), in importKey_storesTheWrappedVersionOfTheRawMaterial()
167 byte[] unwrappedMaterial = cipher.doFinal(wrappedKey.getKeyMaterial()); in importKey_storesTheWrappedVersionOfTheRawMaterial()
DWrappedKeyTest.java76 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() local
77 cipher.init( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata()
81 SecretKey unwrappedKey = (SecretKey) cipher.unwrap( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata()
95 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() local
96 cipher.init( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
100 SecretKey unwrappedKey = (SecretKey) cipher.unwrap( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
/frameworks/proto_logging/stats/enums/stats/tls/
Denums.proto33 // If you add new cipher suite, make sure id is the same as in IANA's database (see link above)
48 // TLSv1.2 cipher suites
58 // Pre-Shared Key (PSK) cipher suites
65 // TLS 1.3 cipher suites
/frameworks/base/core/java/android/hardware/biometrics/
DCryptoObject.java41 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
42 mCrypto = cipher; in CryptoObject()
DBiometricPrompt.java672 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
673 super(cipher); in CryptoObject()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/
DChunkEncryptorTest.java149 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encrypt_decryptedResultCorrespondsToPlaintext() local
150 cipher.init( in encrypt_decryptedResultCorrespondsToPlaintext()
154 byte[] decrypted = cipher.doFinal(chunk.encryptedBytes()); in encrypt_decryptedResultCorrespondsToPlaintext()
/frameworks/base/identity/java/android/security/identity/
DCredstoreIdentityCredential.java172 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in encryptMessageToReader() local
174 cipher.init(Cipher.ENCRYPT_MODE, mSecretKey, encryptionParameterSpec); in encryptMessageToReader()
175 messageCiphertextAndAuthTag = cipher.doFinal(messagePlaintext); in encryptMessageToReader()
197 final Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in decryptMessageFromReader() local
198 cipher.init(Cipher.DECRYPT_MODE, mReaderSecretKey, in decryptMessageFromReader()
200 plainText = cipher.doFinal(messageCiphertext); in decryptMessageFromReader()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/tasks/
DEncryptedBackupTask.java212 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encryptChunkOrdering() local
216 cipher.init( in encryptChunkOrdering()
228 cipher.doFinal( in encryptChunkOrdering()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/
DPinStorage.java1145 final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION); in encrypt() local
1146 cipher.init(Cipher.ENCRYPT_MODE, secretKey); in encrypt()
1149 encryptedPin.iv = cipher.getIV(); in encrypt()
1150 encryptedPin.encryptedStoredPin = cipher.doFinal(input); in encrypt()
1171 final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION); in decrypt() local
1174 cipher.init(Cipher.DECRYPT_MODE, secretKey, spec); in decrypt()
1175 return cipher.doFinal(encryptedPin.encryptedStoredPin); in decrypt()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/
DKvBackupEncrypterTest.java279 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decryptChunk() local
280 cipher.init( in decryptChunk()
284 byte[] decryptedBytes = cipher.doFinal(encryptedChunk.encryptedBytes()); in decryptChunk()
DEncryptedBackupTaskTest.java355 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decryptChunkOrdering() local
356 cipher.init( in decryptChunkOrdering()
365 cipher.doFinal( in decryptChunkOrdering()
DBackupFileDecryptorTaskTest.java549 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in encrypt() local
551 cipher.init( in encrypt()
556 byte[] encryptedBytes = cipher.doFinal(nanoBytes); in encrypt()
/frameworks/proto_logging/stats/enums/system/security/keystore2/
Denums.proto39 // Block cipher algorithms
/frameworks/base/core/java/android/hardware/fingerprint/
DFingerprintManager.java222 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
223 super(cipher); in CryptoObject()
/frameworks/proto_logging/stats/
Datoms.proto14184 /** Block cipher algorithms */