Home
last modified time | relevance | path

Searched refs:encryptionKey (Results 1 – 25 of 28) sorted by relevance

12

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/download/
DEncryptionKeyConverterUtilTest.java72 EncryptionKey encryptionKey = keyOptional.get(); in createEncryptionKeyFromJson_signing_successVersion3() local
73 expect.that(encryptionKey.getKeyType()).isEqualTo(EncryptionKey.KeyType.SIGNING); in createEncryptionKeyFromJson_signing_successVersion3()
74 expect.that(encryptionKey.getEnrollmentId()).isEqualTo("TEST0"); in createEncryptionKeyFromJson_signing_successVersion3()
75 expect.that(encryptionKey.getReportingOrigin()) in createEncryptionKeyFromJson_signing_successVersion3()
77 expect.that(encryptionKey.getEncryptionKeyUrl()) in createEncryptionKeyFromJson_signing_successVersion3()
79 expect.that(encryptionKey.getProtocolType()).isEqualTo(EncryptionKey.ProtocolType.ECDSA); in createEncryptionKeyFromJson_signing_successVersion3()
80 expect.that(encryptionKey.getKeyCommitmentId()).isEqualTo(98765); in createEncryptionKeyFromJson_signing_successVersion3()
81 expect.that(encryptionKey.getBody()).isEqualTo("MIIBCgKCAQEAwVG1qA=="); in createEncryptionKeyFromJson_signing_successVersion3()
82 expect.that(encryptionKey.getExpiration()).isEqualTo(1682516522000L); in createEncryptionKeyFromJson_signing_successVersion3()
94 EncryptionKey encryptionKey = keyOptional.get(); in createEncryptionKeyFromJson_encryption_successVersion3() local
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/encryptionkey/
DEncryptionKeyDao.java289 public boolean insert(EncryptionKey encryptionKey) { in insert() argument
294 if (!isEncryptionKeyValid(encryptionKey)) { in insert()
304 encryptionKey.getEnrollmentId(), encryptionKey.getKeyCommitmentId()); in insert()
309 insertToDb(encryptionKey, db); in insert()
331 for (EncryptionKey encryptionKey : encryptionKeys) { in insert()
332 if (!isEncryptionKeyValid(encryptionKey)) { in insert()
342 encryptionKey.getEnrollmentId(), encryptionKey.getKeyCommitmentId()); in insert()
349 insertToDb(encryptionKey, db); in insert()
366 private static boolean isEncryptionKeyValid(EncryptionKey encryptionKey) { in isEncryptionKeyValid() argument
367 return encryptionKey.getEnrollmentId() != null in isEncryptionKeyValid()
[all …]
DIEncryptionKeyDao.java82 boolean insert(EncryptionKey encryptionKey); in insert() argument
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/encryptionkey/
DEncryptionKeyDaoTest.java196 EncryptionKey encryptionKey = in testInsertExistingEncryptionKey() local
200 assertNotNull(encryptionKey); in testInsertExistingEncryptionKey()
201 assertEquals("1111", encryptionKey.getId()); in testInsertExistingEncryptionKey()
325 EncryptionKey encryptionKey = encryptionKeyList.get(0); in testGetEncryptionKeyFromEnrollmentIdAndKeyType() local
326 assertEquals("1", encryptionKey.getId()); in testGetEncryptionKeyFromEnrollmentIdAndKeyType()
327 assertEquals(EncryptionKey.ProtocolType.HPKE, encryptionKey.getProtocolType()); in testGetEncryptionKeyFromEnrollmentIdAndKeyType()
328 assertEquals(11, encryptionKey.getKeyCommitmentId()); in testGetEncryptionKeyFromEnrollmentIdAndKeyType()
329 assertEquals("AVZBTFVF", encryptionKey.getBody()); in testGetEncryptionKeyFromEnrollmentIdAndKeyType()
330 assertEquals(100001L, encryptionKey.getExpiration()); in testGetEncryptionKeyFromEnrollmentIdAndKeyType()
331 assertEquals(100001L, encryptionKey.getLastFetchTime()); in testGetEncryptionKeyFromEnrollmentIdAndKeyType()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/encryptionkey/
DEncryptionKeyJobHandler.java70 for (EncryptionKey encryptionKey : newEncryptionKeys.get()) { in fetchAndUpdateEncryptionKeys()
71 newlyFetchKeyIdSet.add(encryptionKey.getId()); in fetchAndUpdateEncryptionKeys()
72 mEncryptionKeyDao.insert(encryptionKey); in fetchAndUpdateEncryptionKeys()
81 for (EncryptionKey encryptionKey : encryptionKeyList) { in fetchAndUpdateEncryptionKeys()
83 if (newlyFetchKeyIdSet.contains(encryptionKey.getId())) { in fetchAndUpdateEncryptionKeys()
95 mEnrollmentDao.getEnrollmentData(encryptionKey.getEnrollmentId()); in fetchAndUpdateEncryptionKeys()
99 mEncryptionKeyDao.delete(encryptionKey.getId()); in fetchAndUpdateEncryptionKeys()
106 /* encryptionKey */ encryptionKey, in fetchAndUpdateEncryptionKeys()
112 mEncryptionKeyDao.delete(encryptionKey.getId()); in fetchAndUpdateEncryptionKeys()
DEncryptionKey.java57 EncryptionKey encryptionKey = (EncryptionKey) obj; in equals() local
58 return Objects.equals(mId, encryptionKey.mId) in equals()
59 && Objects.equals(mKeyType, encryptionKey.mKeyType) in equals()
60 && Objects.equals(mEnrollmentId, encryptionKey.mEnrollmentId) in equals()
61 && Objects.equals(mReportingOrigin, encryptionKey.mReportingOrigin) in equals()
62 && Objects.equals(mEncryptionKeyUrl, encryptionKey.mEncryptionKeyUrl) in equals()
63 && Objects.equals(mProtocolType, encryptionKey.mProtocolType) in equals()
64 && (mKeyCommitmentId == encryptionKey.mKeyCommitmentId) in equals()
65 && Objects.equals(mBody, encryptionKey.mBody) in equals()
66 && (mExpiration == encryptionKey.mExpiration) in equals()
[all …]
DEncryptionKeyFetcher.java107 @Nullable EncryptionKey encryptionKey, in fetchEncryptionKeys()
144 && encryptionKey != null in fetchEncryptionKeys()
145 && encryptionKey.getLastFetchTime() != 0L) { in fetchEncryptionKeys()
150 constructHttpDate(encryptionKey.getLastFetchTime())); in fetchEncryptionKeys()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/crypto/
DIkeCombinedModeCipherTest.java168 byte[] encryptionKey = TestUtils.hexStringToByteArray(KEY + "00"); in testEncryptWithWrongKeyLen()
172 mUnencryptedPaddedData, mAdditionalAuthData, encryptionKey, mIv); in testEncryptWithWrongKeyLen()
181 byte[] encryptionKey = new byte[mAesGcmKey.length]; in testDecrypWithWrongKey()
182 new Random().nextBytes(encryptionKey); in testDecrypWithWrongKey()
186 mEncryptedPaddedDataWithChecksum, mAdditionalAuthData, encryptionKey, mIv); in testDecrypWithWrongKey()
206 byte[] encryptionKey = TestUtils.hexStringToByteArray(KEY + "00"); in buildIpSecAlgorithmWithInvalidKey()
209 mAesGcm16Cipher.buildIpSecAlgorithmWithKey(encryptionKey); in buildIpSecAlgorithmWithInvalidKey()
DIkeNormalModeCipherTest.java154 byte[] encryptionKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP + "00"); in testEncryptWithWrongKey()
157 mAesCbcCipher.encrypt(mEncryptedPaddedData, encryptionKey, mIv); in testEncryptWithWrongKey()
189 byte[] encryptionKey = TestUtils.hexStringToByteArray(ENCR_KEY_FROM_INIT_TO_RESP + "00"); in testBuildIpSecAlgorithmWithInvalidKey()
192 mAesCbcCipher.buildIpSecAlgorithmWithKey(encryptionKey); in testBuildIpSecAlgorithmWithInvalidKey()
DIkeMacIntegrityTest.java170 byte[] encryptionKey = TestUtils.hexStringToByteArray(INTEGRITY_KEY_HEX_STRING + "00"); in buildIpSecAlgorithmWithInvalidKey()
173 mHmacSha1IntegrityMac.buildIpSecAlgorithmWithKey(encryptionKey); in buildIpSecAlgorithmWithInvalidKey()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/
DIkeEncryptedPayloadBody.java132 byte[] encryptionKey) { in IkeEncryptedPayloadBody() argument
141 encryptionKey, in IkeEncryptedPayloadBody()
156 byte[] encryptionKey, in IkeEncryptedPayloadBody() argument
170 encryptionKey, in IkeEncryptedPayloadBody()
187 encryptionKey, in IkeEncryptedPayloadBody()
265 byte[] encryptionKey, in normalModeEncrypt() argument
271 return encryptCipher.encrypt(paddedData, encryptionKey, iv); in normalModeEncrypt()
295 byte[] encryptionKey, in combinedModeEncrypt() argument
317 paddedData, authenticatedSectionBuffer.array(), encryptionKey, iv); in combinedModeEncrypt()
DIkeSkPayload.java127 byte[] encryptionKey) { in IkeSkPayload() argument
137 encryptionKey); in IkeSkPayload()
150 byte[] encryptionKey) { in IkeSkPayload() argument
164 encryptionKey); in IkeSkPayload()
DIkeSkfPayload.java110 byte[] encryptionKey, in IkeSkfPayload() argument
121 encryptionKey); in IkeSkfPayload()
DIkeMessage.java593 byte[] encryptionKey, in encryptAndEncode() argument
605 encryptionKey); in encryptAndEncode()
659 encryptionKey, in encryptAndEncode()
/packages/apps/Settings/src/com/android/settings/password/
DRemoteLockscreenValidationFragment.java122 LockscreenCredential guess, byte[] encryptionKey, boolean shouldCacheGuess) { in validateLockscreenGuess() argument
128 encryptDeviceCredentialGuess(guess.getCredential(), encryptionKey), in validateLockscreenGuess() local
145 private byte[] encryptDeviceCredentialGuess(byte[] guess, byte[] encryptionKey) { in encryptDeviceCredentialGuess() argument
147 PublicKey publicKey = SecureBox.decodePublicKey(encryptionKey); in encryptDeviceCredentialGuess()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/download/
DEncryptionKeyConverterUtil.java113 EncryptionKey encryptionKey = builder.build(); in convertVersion3Key() local
116 encryptionKey.getBody(), encryptionKey.getEnrollmentId()); in convertVersion3Key()
117 return Optional.of(encryptionKey); in convertVersion3Key()
DEncryptionDataDownloadManager.java216 .filter(encryptionKey -> encryptionKey.getExpiration() < currentTimeMillis) in deleteExpiredKeys()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/encryption/
DAdSelectionEncryptionKeyManager.java115 encryptionKey -> in getLatestActiveOhttpKeyConfigOfType()
116 encryptionKey == null in getLatestActiveOhttpKeyConfigOfType()
122 : immediateFuture(encryptionKey), in getLatestActiveOhttpKeyConfigOfType()
195 encryptionKey ->
196 encryptionKey == null
202 : immediateFuture(encryptionKey),
DProtectedServersEncryptionConfigManagerBase.java152 protected ObliviousHttpKeyConfig getOhttpKeyConfigForKey(AdSelectionEncryptionKey encryptionKey) in getOhttpKeyConfigForKey() argument
154 Objects.requireNonNull(encryptionKey); in getOhttpKeyConfigForKey()
155 switch (encryptionKey.keyType()) { in getOhttpKeyConfigForKey()
157 return mAuctionEncryptionKeyParser.getObliviousHttpKeyConfig(encryptionKey); in getOhttpKeyConfigForKey()
159 return mJoinEncryptionKeyParser.getObliviousHttpKeyConfig(encryptionKey); in getOhttpKeyConfigForKey()
DProtectedServersEncryptionConfigManager.java148 encryptionKey -> in getLatestOhttpKeyConfigOfType()
149 encryptionKey == null in getLatestOhttpKeyConfigOfType()
156 : immediateFuture(encryptionKey), in getLatestOhttpKeyConfigOfType()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/adselection/
DDBEncryptionKeyTest.java107 DBEncryptionKey encryptionKey = in testBuildEncryptionKey_expiryInstantSetCorrectly() local
115 encryptionKey in testBuildEncryptionKey_expiryInstantSetCorrectly()
119 .isEqualTo(encryptionKey.getExpiryInstant().truncatedTo(ChronoUnit.MILLIS)); in testBuildEncryptionKey_expiryInstantSetCorrectly()
DDBProtectedServersEncryptionConfigTest.java142 DBProtectedServersEncryptionConfig encryptionKey = in testBuildEncryptionKey_expiryInstantSetCorrectly() local
151 encryptionKey in testBuildEncryptionKey_expiryInstantSetCorrectly()
155 .isEqualTo(encryptionKey.getExpiryInstant().truncatedTo(ChronoUnit.MILLIS)); in testBuildEncryptionKey_expiryInstantSetCorrectly()
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/http/
DHttpFederatedProtocol.java167 FederatedComputeEncryptionKey encryptionKey,
173 && encryptionKey != null) {
203 encryptionKey,
434 FederatedComputeEncryptionKey encryptionKey,
446 computationResult.getOutputCheckpointFile(), encryptionKey);
481 String filePath, FederatedComputeEncryptionKey encryptionKey) throws Exception {
489 byte[] publicKey = Base64.decode(encryptionKey.getPublicKey(), Base64.NO_WRAP);
498 body.put(FederatedComputePayloadDataContract.KEY_ID, encryptionKey.getKeyIdentifier());
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/
DSaRecord.java504 byte[] encryptionKey, in makeIpSecTransform() argument
511 encryptionAlgo.buildIpSecAlgorithmWithKey(encryptionKey)); in makeIpSecTransform()
513 builder.setEncryption(encryptionAlgo.buildIpSecAlgorithmWithKey(encryptionKey)); in makeIpSecTransform()
1197 byte[] encryptionKey, in makeIpSecTransform() argument
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/training/
DFederatedComputeWorker.java482 FederatedComputeEncryptionKey encryptionKey =
486 if (encryptionKey == null) {
552 encryptionKey,
1084 FederatedComputeEncryptionKey encryptionKey,
1092 computationResult, encryptionKey, authContext))
1101 encryptionKey,

12