Home
last modified time | relevance | path

Searched refs:EncryptionKey (Results 1 – 25 of 79) sorted by relevance

1234

/aosp_15_r20/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/encryptionkey/
DEncryptionKeyDaoTest.java30 import com.android.adservices.service.encryptionkey.EncryptionKey;
58 public static final EncryptionKey ENCRYPTION_KEY1 =
59 new EncryptionKey.Builder()
61 .setKeyType(EncryptionKey.KeyType.ENCRYPTION)
65 .setProtocolType(EncryptionKey.ProtocolType.HPKE)
72 private static final EncryptionKey DUPLICATE_ENCRYPTION_KEY1 =
73 new EncryptionKey.Builder()
75 .setKeyType(EncryptionKey.KeyType.ENCRYPTION)
79 .setProtocolType(EncryptionKey.ProtocolType.HPKE)
86 public static final EncryptionKey SIGNING_KEY1 =
[all …]
/aosp_15_r20/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/encryptionkey/
DEncryptionKeyJobHandlerTest.java68 private static final EncryptionKey ENCRYPTION_KEY =
69 new EncryptionKey.Builder()
71 .setKeyType(EncryptionKey.KeyType.ENCRYPTION)
75 .setProtocolType(EncryptionKey.ProtocolType.HPKE)
81 private static final EncryptionKey SIGNING_KEY =
82 new EncryptionKey.Builder()
84 .setKeyType(EncryptionKey.KeyType.SIGNING)
88 .setProtocolType(EncryptionKey.ProtocolType.ECDSA)
94 private static final EncryptionKey ENCRYPTION_KEY_NO_ENROLLMENT_WITH_IT =
95 new EncryptionKey.Builder()
[all …]
DEncryptionKeyTest.java41 private static EncryptionKey createKeyCommitment(String enrollmentId) { in createKeyCommitment()
42 return new EncryptionKey.Builder() in createKeyCommitment()
44 .setKeyType(EncryptionKey.KeyType.ENCRYPTION) in createKeyCommitment()
48 .setProtocolType(EncryptionKey.ProtocolType.HPKE) in createKeyCommitment()
59 EncryptionKey result = createKeyCommitment(ENROLLMENT_ID1); in testCreation()
63 expect.that(result.getKeyType()).isEqualTo(EncryptionKey.KeyType.ENCRYPTION); in testCreation()
67 expect.that(result.getProtocolType()).isEqualTo(EncryptionKey.ProtocolType.HPKE); in testCreation()
77 EncryptionKey result = new EncryptionKey.Builder().build(); in testDefaults()
81 expect.that(result.getKeyType()).isEqualTo(EncryptionKey.KeyType.ENCRYPTION); in testDefaults()
85 expect.that(result.getProtocolType()).isEqualTo(EncryptionKey.ProtocolType.HPKE); in testDefaults()
[all …]
DEncryptionKeyFetcherTest.java136 private static EncryptionKey constructEncryptionKey() { in constructEncryptionKey()
137 return new EncryptionKey.Builder() in constructEncryptionKey()
139 .setKeyType(EncryptionKey.KeyType.ENCRYPTION) in constructEncryptionKey()
143 .setProtocolType(EncryptionKey.ProtocolType.HPKE) in constructEncryptionKey()
179 Optional<List<EncryptionKey>> encryptionKeyList = in testFirstTimeFetchEncryptionKeysSucceed()
203 Optional<List<EncryptionKey>> encryptionKeyList = in testFirstTimeFetchEncryptionKeysNullEncryptionKeyUrl()
226 Optional<List<EncryptionKey>> encryptionKeyList = in testFirstTimeFetchEncryptionKeysEmptyEncryptionKeyUrl()
249 Optional<List<EncryptionKey>> encryptionKeyList = in testFirstTimeFetchEncryptionKeysSingleWhiteSpaceEncryptionKeyUrl()
271 Optional<List<EncryptionKey>> encryptionKeyList = in testFirstTimeFetchEncryptionKeysBadConnection()
294 Optional<List<EncryptionKey>> encryptionKeyList = in testFirstTimeFetchEncryptionKeysServerTimeOut()
[all …]
/aosp_15_r20/external/google-cloud-java/java-gke-backup/proto-google-cloud-gke-backup-v1/src/main/java/com/google/cloud/gkebackup/v1/
H A DEncryptionKey.java31 public final class EncryptionKey extends com.google.protobuf.GeneratedMessageV3 class
37 private EncryptionKey(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { in EncryptionKey() method in EncryptionKey
41 private EncryptionKey() { in EncryptionKey() method in EncryptionKey
48 return new EncryptionKey(); in newInstance()
67 com.google.cloud.gkebackup.v1.EncryptionKey.class, in internalGetFieldAccessorTable()
68 com.google.cloud.gkebackup.v1.EncryptionKey.Builder.class); in internalGetFieldAccessorTable()
163 if (!(obj instanceof com.google.cloud.gkebackup.v1.EncryptionKey)) { in equals()
166 com.google.cloud.gkebackup.v1.EncryptionKey other = in equals()
167 (com.google.cloud.gkebackup.v1.EncryptionKey) obj; in equals()
188 public static com.google.cloud.gkebackup.v1.EncryptionKey parseFrom(java.nio.ByteBuffer data) in parseFrom()
[all …]
/aosp_15_r20/packages/modules/AdServices/adservices/tests/unittest/service-core/topics/src/com/android/adservices/service/topics/
DEncryptionManagerTest.java47 import com.android.adservices.service.encryptionkey.EncryptionKey;
79 private static final EncryptionKey LATEST_HPKE_ENCRYPTION_KEY =
80 new EncryptionKey.Builder()
82 .setKeyType(EncryptionKey.KeyType.ENCRYPTION)
86 .setProtocolType(EncryptionKey.ProtocolType.HPKE)
92 private static final EncryptionKey OLDER_INCOMPATIBLE_ENCRYPTION_KEY =
93 new EncryptionKey.Builder()
95 .setKeyType(EncryptionKey.KeyType.ENCRYPTION)
99 .setProtocolType(EncryptionKey.ProtocolType.HPKE)
126 ENROLLMENT_ID, EncryptionKey.KeyType.ENCRYPTION)) in testEncryption_success()
[all …]
/aosp_15_r20/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/download/
DEncryptionKeyConverterUtilTest.java35 import com.android.adservices.service.encryptionkey.EncryptionKey;
64 Optional<EncryptionKey> keyOptional = in createEncryptionKeyFromJson_signing_successVersion3()
68 EncryptionKey encryptionKey = keyOptional.get(); in createEncryptionKeyFromJson_signing_successVersion3()
69 expect.that(encryptionKey.getKeyType()).isEqualTo(EncryptionKey.KeyType.SIGNING); in createEncryptionKeyFromJson_signing_successVersion3()
75 expect.that(encryptionKey.getProtocolType()).isEqualTo(EncryptionKey.ProtocolType.ECDSA); in createEncryptionKeyFromJson_signing_successVersion3()
87 Optional<EncryptionKey> keyOptional = createEncryptionKeyFromJson(jsonObject); in createEncryptionKeyFromJson_encryption_successVersion3()
90 EncryptionKey encryptionKey = keyOptional.get(); in createEncryptionKeyFromJson_encryption_successVersion3()
91 expect.that(encryptionKey.getKeyType()).isEqualTo(EncryptionKey.KeyType.ENCRYPTION); in createEncryptionKeyFromJson_encryption_successVersion3()
97 expect.that(encryptionKey.getProtocolType()).isEqualTo(EncryptionKey.ProtocolType.HPKE); in createEncryptionKeyFromJson_encryption_successVersion3()
112 Optional<EncryptionKey> keyOptional = createEncryptionKeyFromJson(jsonObject); in createEncryptionKeyFromJson_incorrectVersion()
[all …]
DEnrollmentDataDownloadManagerTest.java43 import com.android.adservices.service.encryptionkey.EncryptionKey;
149 List<EncryptionKey> existingEncryptionKeys = new ArrayList<>(); in testReadFileAndInsertIntoDatabaseSuccess()
154 List<EncryptionKey> encryptionKeyList = in testReadFileAndInsertIntoDatabaseSuccess()
157 Optional<List<EncryptionKey>> fetchResult = Optional.of(encryptionKeyList); in testReadFileAndInsertIntoDatabaseSuccess()
164 ArgumentCaptor<EncryptionKey> encryptionKeyCaptor = in testReadFileAndInsertIntoDatabaseSuccess()
165 ArgumentCaptor.forClass(EncryptionKey.class); in testReadFileAndInsertIntoDatabaseSuccess()
171 verify(mMockEncryptionKeyDao, times(10)).insert((EncryptionKey) any()); in testReadFileAndInsertIntoDatabaseSuccess()
317 List<EncryptionKey> existingEncryptionKeys = new ArrayList<>(); in testEnrollmentMddRecordDeletionCallsOverwrite()
322 List<EncryptionKey> encryptionKeyList = in testEnrollmentMddRecordDeletionCallsOverwrite()
325 Optional<List<EncryptionKey>> fetchResult = Optional.of(encryptionKeyList); in testEnrollmentMddRecordDeletionCallsOverwrite()
[all …]
DEncryptionDataDownloadManagerTest.java42 import com.android.adservices.service.encryptionkey.EncryptionKey;
132 List<EncryptionKey> databaseKeys = mEncryptionKeyDao.getAllEncryptionKeys(); in testReadFileAndInsertIntoDatabaseSuccess()
166 List<EncryptionKey> databaseKeys = mEncryptionKeyDao.getAllEncryptionKeys(); in testReadFileAndInsertIntoDatabaseSuccess_keysUpdated()
169 EncryptionKey encryptionKey = in testReadFileAndInsertIntoDatabaseSuccess_keysUpdated()
214 List<EncryptionKey> databaseKeys = mEncryptionKeyDao.getAllEncryptionKeys(); in testReadFileAndInsertIntoDatabaseSuccess_deleteExpiredKeys()
/aosp_15_r20/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/encryptionkey/
DIEncryptionKeyDao.java21 import com.android.adservices.service.encryptionkey.EncryptionKey;
35 List<EncryptionKey> getEncryptionKeyFromEnrollmentId(String enrollmentId); in getEncryptionKeyFromEnrollmentId()
45 List<EncryptionKey> getEncryptionKeyFromEnrollmentIdAndKeyType( in getEncryptionKeyFromEnrollmentIdAndKeyType()
46 String enrollmentId, EncryptionKey.KeyType keyType); in getEncryptionKeyFromEnrollmentIdAndKeyType()
56 EncryptionKey getEncryptionKeyFromEnrollmentIdAndKeyCommitmentId( in getEncryptionKeyFromEnrollmentIdAndKeyCommitmentId()
66 List<EncryptionKey> getEncryptionKeyFromReportingOrigin( in getEncryptionKeyFromReportingOrigin()
67 Uri reportingOrigin, EncryptionKey.KeyType keyType); in getEncryptionKeyFromReportingOrigin()
74 List<EncryptionKey> getAllEncryptionKeys(); in getAllEncryptionKeys()
82 boolean insert(EncryptionKey encryptionKey); in insert()
90 boolean insert(List<EncryptionKey> encryptionKeys); in insert()
DEncryptionKeyDao.java30 import com.android.adservices.service.encryptionkey.EncryptionKey;
76 public List<EncryptionKey> getEncryptionKeyFromEnrollmentId(String enrollmentId) in getEncryptionKeyFromEnrollmentId()
78 List<EncryptionKey> encryptionKeyList = new ArrayList<>(); in getEncryptionKeyFromEnrollmentId()
116 public List<EncryptionKey> getEncryptionKeyFromEnrollmentIdAndKeyType( in getEncryptionKeyFromEnrollmentIdAndKeyType()
117 String enrollmentId, EncryptionKey.KeyType keyType) throws SQLException { in getEncryptionKeyFromEnrollmentIdAndKeyType()
118 List<EncryptionKey> encryptionKeyList = new ArrayList<>(); in getEncryptionKeyFromEnrollmentIdAndKeyType()
162 public EncryptionKey getEncryptionKeyFromEnrollmentIdAndKeyCommitmentId( in getEncryptionKeyFromEnrollmentIdAndKeyCommitmentId()
204 public List<EncryptionKey> getEncryptionKeyFromReportingOrigin( in getEncryptionKeyFromReportingOrigin()
205 Uri reportingOrigin, EncryptionKey.KeyType keyType) { in getEncryptionKeyFromReportingOrigin()
206 List<EncryptionKey> encryptionKeyList = new ArrayList<>(); in getEncryptionKeyFromReportingOrigin()
[all …]
DSqliteObjectMapper.java22 import com.android.adservices.service.encryptionkey.EncryptionKey;
30 public static EncryptionKey constructEncryptionKeyFromCursor(Cursor cursor) { in constructEncryptionKeyFromCursor()
31 EncryptionKey.Builder builder = new EncryptionKey.Builder(); in constructEncryptionKeyFromCursor()
36 (enumValue) -> builder.setKeyType(EncryptionKey.KeyType.valueOf(enumValue))); in constructEncryptionKeyFromCursor()
53 builder.setProtocolType(EncryptionKey.ProtocolType.valueOf(enumValue))); in constructEncryptionKeyFromCursor()
/aosp_15_r20/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/encryptionkey/
DEncryptionKey.java26 public class EncryptionKey { class
39 public EncryptionKey() { in EncryptionKey() method in EncryptionKey
54 if (!(obj instanceof EncryptionKey)) { in equals()
57 EncryptionKey encryptionKey = (EncryptionKey) obj; in equals()
139 public EncryptionKey.Builder cloneToBuilder() { in cloneToBuilder()
140 return new EncryptionKey.Builder() in cloneToBuilder()
155 private final EncryptionKey mBuilding;
158 mBuilding = new EncryptionKey(); in Builder()
222 public EncryptionKey build() { in build()
DEncryptionKeyFetcher.java106 public Optional<List<EncryptionKey>> fetchEncryptionKeys( in fetchEncryptionKeys()
107 @Nullable EncryptionKey encryptionKey, in fetchEncryptionKeys()
236 private Optional<List<EncryptionKey>> parseEncryptionKeyJSONResponse( in parseEncryptionKeyJSONResponse()
241 List<EncryptionKey> encryptionKeys = new ArrayList<>(); in parseEncryptionKeyJSONResponse()
249 EncryptionKey.KeyType.ENCRYPTION)); in parseEncryptionKeyJSONResponse()
256 enrollmentData, signingObject, EncryptionKey.KeyType.SIGNING)); in parseEncryptionKeyJSONResponse()
268 private List<EncryptionKey> buildEncryptionKeys( in buildEncryptionKeys()
269 EnrollmentData enrollmentData, JSONObject jsonObject, EncryptionKey.KeyType keyType) { in buildEncryptionKeys()
270 List<EncryptionKey> encryptionKeyList = new ArrayList<>(); in buildEncryptionKeys()
278 EncryptionKey.ProtocolType protocolType; in buildEncryptionKeys()
[all …]
DEncryptionKeyJobHandler.java53 List<EncryptionKey> existingKeys = in fetchAndUpdateEncryptionKeys()
64 Optional<List<EncryptionKey>> newEncryptionKeys = in fetchAndUpdateEncryptionKeys()
70 for (EncryptionKey encryptionKey : newEncryptionKeys.get()) { in fetchAndUpdateEncryptionKeys()
80 List<EncryptionKey> encryptionKeyList = mEncryptionKeyDao.getAllEncryptionKeys(); in fetchAndUpdateEncryptionKeys()
81 for (EncryptionKey encryptionKey : encryptionKeyList) { in fetchAndUpdateEncryptionKeys()
104 Optional<List<EncryptionKey>> updateEncryptionKeys = in fetchAndUpdateEncryptionKeys()
113 for (EncryptionKey newKey : updateEncryptionKeys.get()) { in fetchAndUpdateEncryptionKeys()
/aosp_15_r20/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/download/
DEncryptionKeyConverterUtil.java28 import com.android.adservices.service.encryptionkey.EncryptionKey;
57 static Optional<EncryptionKey> createEncryptionKeyFromJson(JSONObject jsonObject) { in createEncryptionKeyFromJson()
81 private static Optional<EncryptionKey> convertVersion3Key(JSONObject jsonObject) { in convertVersion3Key()
93 EncryptionKey.Builder builder = new EncryptionKey.Builder(); in convertVersion3Key()
97 EncryptionKey.KeyType.valueOf( in convertVersion3Key()
105 EncryptionKey.ProtocolType.valueOf( in convertVersion3Key()
113 EncryptionKey encryptionKey = builder.build(); in convertVersion3Key()
DEncryptionDataDownloadManager.java36 import com.android.adservices.service.encryptionkey.EncryptionKey;
125 Optional<List<EncryptionKey>> encryptionKeys = processDownloadedFile(clientFile); in readAndInsertEncryptionDataFromMdd()
168 private Optional<List<EncryptionKey>> processDownloadedFile( in processDownloadedFile()
181 List<EncryptionKey> encryptionKeys = new ArrayList<>(); in processDownloadedFile()
184 Optional<EncryptionKey> keyOptional = createEncryptionKeyFromJson(jsonKeyObject); in processDownloadedFile()
208 List<EncryptionKey> allEncryptionKeys = mEncryptionKeyDao.getAllEncryptionKeys(); in deleteExpiredKeys()
214 List<EncryptionKey> expiredKeys = in deleteExpiredKeys()
220 for (EncryptionKey expiredKey : expiredKeys) { in deleteExpiredKeys()
DEnrollmentDataDownloadManager.java42 import com.android.adservices.service.encryptionkey.EncryptionKey;
218 List<EncryptionKey> existingKeys = in fetchEncryptionKeysForNewEnrollment()
223 Optional<List<EncryptionKey>> currentEncryptionKeys = in fetchEncryptionKeysForNewEnrollment()
228 for (EncryptionKey encryptionKey : currentEncryptionKeys.get()) { in fetchEncryptionKeysForNewEnrollment()
/aosp_15_r20/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/adselection/signature/
DProtectedAudienceSignatureManagerTest.java37 import com.android.adservices.service.encryptionkey.EncryptionKey;
195 EncryptionKey encKey1 = in testFetchKeys_validAdTechMultipleKeys_returnedInAscendingOrderByExpiration()
196 new EncryptionKey.Builder().setBody(publicKey1).setExpiration(expiration1).build(); in testFetchKeys_validAdTechMultipleKeys_returnedInAscendingOrderByExpiration()
197 EncryptionKey encKey2 = in testFetchKeys_validAdTechMultipleKeys_returnedInAscendingOrderByExpiration()
198 new EncryptionKey.Builder().setBody(publicKey2).setExpiration(expiration2).build(); in testFetchKeys_validAdTechMultipleKeys_returnedInAscendingOrderByExpiration()
199 List<EncryptionKey> encKeysToPersistInReverseOrder = List.of(encKey2, encKey1); in testFetchKeys_validAdTechMultipleKeys_returnedInAscendingOrderByExpiration()
207 enrollmentId, EncryptionKey.KeyType.SIGNING); in testFetchKeys_validAdTechMultipleKeys_returnedInAscendingOrderByExpiration()
365 List<EncryptionKey> encryptionKeys = in mockKeyStorage()
367 .map(key -> new EncryptionKey.Builder().setBody(key).build()) in mockKeyStorage()
378 BUYER_ENROLLMENT_ID, EncryptionKey.KeyType.SIGNING); in mockKeyStorage()
/aosp_15_r20/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/
DEncryptionManager.java36 import com.android.adservices.service.encryptionkey.EncryptionKey;
125 List<EncryptionKey> encryptionKeys = in fetchPublicKeyFor()
127 enrollmentData.getEnrollmentId(), EncryptionKey.KeyType.ENCRYPTION); in fetchPublicKeyFor()
128 Optional<EncryptionKey> latestKey = in fetchPublicKeyFor()
130 .max(Comparator.comparingLong(EncryptionKey::getExpiration)); in fetchPublicKeyFor()
/aosp_15_r20/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/signature/
DProtectedAudienceSignatureManager.java26 import com.android.adservices.service.encryptionkey.EncryptionKey;
172 List<EncryptionKey> encryptionKeys = in fetchPublicKeyForAdTech()
174 enrollmentData.getEnrollmentId(), EncryptionKey.KeyType.SIGNING); in fetchPublicKeyForAdTech()
179 .sorted(Comparator.comparingLong(EncryptionKey::getExpiration)) in fetchPublicKeyForAdTech()
/aosp_15_r20/hardware/interfaces/security/keymint/support/
H A Dauthorization_set.cpp161 return EncryptionKey(); in RsaEncryptionKey()
171 return EncryptionKey(); in AesEncryptionKey()
176 return EncryptionKey(); in TripleDesEncryptionKey()
184 AuthorizationSetBuilder& AuthorizationSetBuilder::EncryptionKey() { in EncryptionKey() function in aidl::android::hardware::security::keymint::AuthorizationSetBuilder
/aosp_15_r20/external/open-dice/dpe-rs/src/
H A Dcrypto.rs24 byte_array_wrapper!(EncryptionKey, ENCRYPTION_KEY_SIZE, "encryption key");
279 key: &EncryptionKey, in seal() argument
291 key: &EncryptionKey, in unseal() argument
/aosp_15_r20/hardware/interfaces/keymaster/3.0/vts/functional/
H A Dauthorization_set.h286 AuthorizationSetBuilder& EncryptionKey();
359 return EncryptionKey(); in RsaEncryptionKey()
374 return EncryptionKey(); in AesEncryptionKey()
382 inline AuthorizationSetBuilder& AuthorizationSetBuilder::EncryptionKey() { in EncryptionKey() function
/aosp_15_r20/system/keymaster/include/keymaster/
H A Dauthorization_set.h528 AuthorizationSetBuilder& EncryptionKey();
599 return EncryptionKey(); in RsaEncryptionKey()
609 return EncryptionKey(); in AesEncryptionKey()
614 return EncryptionKey(); in TripleDesEncryptionKey()
622 inline AuthorizationSetBuilder& AuthorizationSetBuilder::EncryptionKey() { in EncryptionKey() function

1234