Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 22 of 22) 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/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()
/frameworks/base/services/core/java/com/android/server/locksettings/
DUnifiedProfilePasswordCache.java108 Cipher cipher; in storePassword() local
110 cipher = Cipher.getInstance("AES/GCM/NoPadding"); in storePassword()
111 cipher.init(Cipher.ENCRYPT_MODE, key); in storePassword()
112 byte[] ciphertext = cipher.doFinal(password.getCredential()); in storePassword()
113 byte[] iv = cipher.getIV(); in storePassword()
145 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in retrievePassword() local
146 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(128, iv)); in retrievePassword()
147 credential = cipher.doFinal(ciphertext); in retrievePassword()
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()
DSyntheticPasswordCrypto.java71 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in decrypt() local
73 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(AES_GCM_TAG_SIZE * 8, iv)); in decrypt()
74 return cipher.doFinal(ciphertext); in decrypt()
84 Cipher cipher = Cipher.getInstance( in encrypt() local
87 cipher.init(Cipher.ENCRYPT_MODE, key); in encrypt()
88 byte[] ciphertext = cipher.doFinal(blob); in encrypt()
89 byte[] iv = cipher.getIV(); in encrypt()
93 final GCMParameterSpec spec = cipher.getParameters().getParameterSpec( in encrypt()
DLockSettingsService.java1539 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in getDecryptedPasswordForTiedProfile() local
1542 cipher.init(Cipher.DECRYPT_MODE, decryptionKey, new GCMParameterSpec(128, iv)); in getDecryptedPasswordForTiedProfile()
1543 decryptionResult = cipher.doFinal(encryptedPassword); in getDecryptedPasswordForTiedProfile()
2151 Cipher cipher = Cipher.getInstance( in tieProfileLockToParent() local
2154 cipher.init(Cipher.ENCRYPT_MODE, keyStoreEncryptionKey); in tieProfileLockToParent()
2155 ciphertext = cipher.doFinal(password.getCredential()); in tieProfileLockToParent()
2156 iv = cipher.getIV(); in tieProfileLockToParent()
/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.proto36 // If you add new cipher suite, make sure id is the same as in IANA's database (see link above)
51 // TLSv1.2 cipher suites
61 // Pre-Shared Key (PSK) cipher suites
68 // TLS 1.3 cipher suites
/frameworks/base/libs/securebox/src/com/android/security/
DSecureBox.java347 Cipher cipher; in aesGcmInternal() local
349 cipher = Cipher.getInstance(ENC_ALG); in aesGcmInternal()
357 cipher.init(Cipher.DECRYPT_MODE, key, spec); in aesGcmInternal()
359 cipher.init(Cipher.ENCRYPT_MODE, key, spec); in aesGcmInternal()
366 cipher.updateAAD(aad); in aesGcmInternal()
367 return cipher.doFinal(text); in aesGcmInternal()
/frameworks/base/core/java/android/hardware/biometrics/
DCryptoObject.java57 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
58 mCrypto = cipher; in CryptoObject()
DBiometricPrompt.java1022 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
1023 super(cipher); in CryptoObject()
/frameworks/base/identity/java/android/security/identity/
DCredstoreIdentityCredential.java179 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in encryptMessageToReader() local
181 cipher.init(Cipher.ENCRYPT_MODE, mSecretKey, encryptionParameterSpec); in encryptMessageToReader()
182 messageCiphertextAndAuthTag = cipher.doFinal(messagePlaintext); in encryptMessageToReader()
204 final Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in decryptMessageFromReader() local
205 cipher.init(Cipher.DECRYPT_MODE, mReaderSecretKey, in decryptMessageFromReader()
207 plainText = cipher.doFinal(messageCiphertext); in decryptMessageFromReader()
/frameworks/opt/telephony/flags/
Diwlan.aconfig18 description: "Add multiple proposals of cipher suites in IKE SA and Child SA"
Dnetwork.aconfig47 description: "Guards APIs for enabling and disabling modem cipher transparency."
/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/
DPinStorage.java1157 final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION); in encrypt() local
1158 cipher.init(Cipher.ENCRYPT_MODE, secretKey); in encrypt()
1161 encryptedPin.iv = cipher.getIV(); in encrypt()
1162 encryptedPin.encryptedStoredPin = cipher.doFinal(input); in encrypt()
1183 final Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION); in decrypt() local
1186 cipher.init(Cipher.DECRYPT_MODE, secretKey, spec); in decrypt()
1187 return cipher.doFinal(encryptedPin.encryptedStoredPin); in decrypt()
/frameworks/proto_logging/stats/enums/system/security/keystore2/
Denums.proto39 // Block cipher algorithms
/frameworks/proto_logging/stats/enums/wifi/
Denums.proto324 * Wi-Fi Security modes defined by the combinations of cipher suite, AKM and PMF
/frameworks/base/core/java/android/hardware/fingerprint/
DFingerprintManager.java236 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
237 super(cipher); in CryptoObject()
/frameworks/proto_logging/stats/atoms/wifi/
Dwifi_extension_atoms.proto339 // Supported cipher suites
/frameworks/base/tools/aapt2/integration-tests/CommandTests/
Dandroid-33.jarAndroidManifest.xml META-INF/ META-INF/MANIFEST.MF NOTICES/ NOTICES/libcore ...
/frameworks/proto_logging/stats/
Datoms.proto17665 /** Block cipher algorithms */