/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
D | WrappedKeyTest.java | 74 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NULL_METADATA); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() local 80 new GCMParameterSpec(GCM_TAG_LENGTH_BITS, wrappedKey.getNonce())); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() 82 wrappedKey.getKeyMaterial(), KEY_ALGORITHM, Cipher.SECRET_KEY); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() 93 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NON_NULL_METADATA); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() local 99 new GCMParameterSpec(GCM_TAG_LENGTH_BITS, wrappedKey.getNonce())); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() 101 wrappedKey.getKeyMaterial(), KEY_ALGORITHM, Cipher.SECRET_KEY); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() 111 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey, NULL_METADATA); in fromSecretKey_returnsAKeyWithTheGenerationIdOfTheWrappingKey() local 113 assertEquals(GENERATION_ID, wrappedKey.getPlatformKeyGenerationId()); in fromSecretKey_returnsAKeyWithTheGenerationIdOfTheWrappingKey() 121 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata() local 124 keysByAlias.put(alias, wrappedKey); in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata() [all …]
|
D | RecoverableKeyGeneratorTest.java | 101 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey_nullMetadata() local 102 assertNotNull(wrappedKey); in generateAndStoreKey_storesWrappedKey_nullMetadata() 103 assertNull(wrappedKey.getKeyMetadata()); in generateAndStoreKey_storesWrappedKey_nullMetadata() 111 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey_nonNullMetadata() local 112 assertNotNull(wrappedKey); in generateAndStoreKey_storesWrappedKey_nonNullMetadata() 113 assertArrayEquals(NON_NULL_METADATA, wrappedKey.getKeyMetadata()); in generateAndStoreKey_storesWrappedKey_nonNullMetadata() 129 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() local 132 new GCMParameterSpec(GCM_TAG_LENGTH_BITS, wrappedKey.getNonce())); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 133 byte[] unwrappedMaterial = cipher.doFinal(wrappedKey.getKeyMaterial()); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 163 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in importKey_storesTheWrappedVersionOfTheRawMaterial() local [all …]
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
D | WrappedKey.java | 210 WrappedKey wrappedKey = wrappedKeys.get(alias); in unwrapKeys() local 211 if (wrappedKey.getPlatformKeyGenerationId() != platformKeyGenerationId) { in unwrapKeys() 217 wrappedKey.getPlatformKeyGenerationId(), in unwrapKeys() 224 new GCMParameterSpec(GCM_TAG_LENGTH_BITS, wrappedKey.getNonce())); in unwrapKeys() 228 wrappedKey.getKeyMaterial(), APPLICATION_KEY_ALGORITHM, Cipher.SECRET_KEY); in unwrapKeys() 238 unwrappedKeys.put(alias, Pair.create(key, wrappedKey.getKeyMetadata())); in unwrapKeys()
|
D | RecoverableKeyGenerator.java | 104 WrappedKey wrappedKey = WrappedKey.fromSecretKey(platformKey, key, metadata); in generateAndStoreKey() local 105 long result = mDatabase.insertKey(userId, uid, alias, wrappedKey); in generateAndStoreKey() 148 WrappedKey wrappedKey = WrappedKey.fromSecretKey(platformKey, key, metadata); in importKey() local 149 long result = mDatabase.insertKey(userId, uid, alias, wrappedKey); in importKey()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/ |
D | RecoverableKeyStoreDbTest.java | 89 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey() local 90 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in insertKey_replacesOldKey() 102 wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId); in insertKey_replacesOldKey() 103 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in insertKey_replacesOldKey() 174 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, keyMetadata, generationId, 120); in getKey_returnsInsertedKey() local 175 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in getKey_returnsInsertedKey() 228 WrappedKey wrappedKey = new WrappedKey( in getAllKeys_doesNotReturnKeysWithBadGenerationId() local 234 userId, uid, /*alias=*/ "test", wrappedKey); in getAllKeys_doesNotReturnKeysWithBadGenerationId() 246 WrappedKey wrappedKey = new WrappedKey( in getAllKeys_doesNotReturnKeysWithBadUserId() local 250 /*userId=*/ 1, uid, /*alias=*/ "test", wrappedKey); in getAllKeys_doesNotReturnKeysWithBadUserId() [all …]
|
/frameworks/base/media/lib/signer/java/com/android/mediadrm/signer/ |
D | MediaDrmSigner.java | 134 String algorithm, byte[] wrappedKey, byte[] message) { in signRSA() argument 135 return drm.signRSA(sessionId, algorithm, wrappedKey, message); in signRSA()
|
/frameworks/av/drm/mediadrm/plugins/clearkey/default/include/ |
D | DrmPlugin.h | 101 Vector<uint8_t>& wrappedKey) { in provideProvisionResponse() argument 103 UNUSED(wrappedKey); in provideProvisionResponse() 251 const Vector<uint8_t>& wrappedKey, in signRSA() argument 254 message.size() == 0 || wrappedKey.size() == 0) { in signRSA()
|
/frameworks/av/drm/libmediadrm/ |
D | DrmHal.cpp | 117 Vector<uint8_t>& wrappedKey) { in provideProvisionResponse() argument 119 return mDrmHalAidl->provideProvisionResponse(response, certificate, wrappedKey); in provideProvisionResponse() 120 return mDrmHalHidl->provideProvisionResponse(response, certificate, wrappedKey); in provideProvisionResponse() 256 Vector<uint8_t> const& message, Vector<uint8_t> const& wrappedKey, in signRSA() argument 259 return mDrmHalAidl->signRSA(sessionId, algorithm, message, wrappedKey, signature); in signRSA() 260 return mDrmHalHidl->signRSA(sessionId, algorithm, message, wrappedKey, signature); in signRSA()
|
D | DrmMetricsLogger.cpp | 274 Vector<uint8_t>& wrappedKey) { in provideProvisionResponse() argument 275 DrmStatus status = mImpl->provideProvisionResponse(response, certificate, wrappedKey); in provideProvisionResponse() 484 Vector<uint8_t> const& wrappedKey, Vector<uint8_t>& signature) { in signRSA() argument 485 DrmStatus status = mImpl->signRSA(sessionId, algorithm, message, wrappedKey, signature); in signRSA()
|
D | DrmHalAidl.cpp | 703 Vector<uint8_t>& wrappedKey) { in provideProvisionResponse() argument 712 wrappedKey = toVector(result.wrappedKey); in provideProvisionResponse() 1072 Vector<uint8_t> const& message, Vector<uint8_t> const& wrappedKey, in signRSA() argument 1082 toStdVec(wrappedKey), &result); in signRSA()
|
D | DrmHalHidl.cpp | 904 Vector<uint8_t>& wrappedKey) { in provideProvisionResponse() argument 915 wrappedKey = toVector(hWrappedKey); in provideProvisionResponse() 1405 Vector<uint8_t> const& message, Vector<uint8_t> const& wrappedKey, in signRSA() argument 1416 toHidlVec(wrappedKey), [&](Status status, const hidl_vec<uint8_t>& hSignature) { in signRSA()
|
/frameworks/base/keystore/java/android/security/ |
D | KeyStoreSecurityLevel.java | 192 @NonNull byte[] wrappedKey, byte[] maskingKey, in importWrappedKey() argument 199 keyDescriptor.blob = wrappedKey; in importWrappedKey()
|
/frameworks/av/drm/libmediadrm/include/mediadrm/ |
D | DrmHal.h | 58 Vector<uint8_t> &wrappedKey); 109 Vector<uint8_t> const &wrappedKey,
|
D | IDrm.h | 96 Vector<uint8_t> &wrappedKey) = 0; 161 Vector<uint8_t> const &wrappedKey,
|
D | DrmHalAidl.h | 68 Vector<uint8_t>& wrappedKey); 104 Vector<uint8_t> const& message, Vector<uint8_t> const& wrappedKey,
|
D | DrmMetricsLogger.h | 137 Vector<uint8_t>& wrappedKey); 186 Vector<uint8_t> const& message, Vector<uint8_t> const& wrappedKey,
|
D | DrmHalHidl.h | 109 Vector<uint8_t> &wrappedKey); 171 Vector<uint8_t> const &wrappedKey,
|
/frameworks/av/drm/mediadrm/plugins/mock/ |
D | MockDrmCryptoPlugin.h | 88 Vector<uint8_t> &wrappedKey); 136 Vector<uint8_t> const &wrappedKey,
|
D | MockDrmCryptoPlugin.cpp | 707 Vector<uint8_t> const &wrappedKey, in signRSA() argument 716 vectorToString(wrappedKey).c_str(), in signRSA() 726 mByteArrayProperties.add(String8("mock-wrappedkey"), wrappedKey); in signRSA()
|
/frameworks/base/keystore/java/android/security/keystore2/ |
D | AndroidKeyStoreCipherSpiBase.java | 791 protected final Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, in engineUnwrap() argument 794 return mCipher.unwrap(wrappedKey, wrappedKeyAlgorithm, wrappedKeyType); in engineUnwrap() 806 if (wrappedKey == null) { in engineUnwrap() 812 encoded = engineDoFinal(wrappedKey, 0, wrappedKey.length); in engineUnwrap()
|
D | AndroidKeyStoreSpi.java | 979 KeyDescriptor wrappedKey = makeKeyDescriptor(alias); in setWrappedKeyEntry() local 1031 wrappedKey, wrappingkey, in setWrappedKeyEntry()
|
/frameworks/av/drm/libmediadrm/fuzzer/ |
D | mediadrm_fuzzer.cpp | 230 Vector<uint8_t> wrappedKey = {}; in invokeDrmDecryptEncryptAPI() local 231 mDrm->provideProvisionResponse(provisionResponse, certificate, wrappedKey); in invokeDrmDecryptEncryptAPI() 291 wrappedKey, signature); in invokeDrmDecryptEncryptAPI()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/ |
D | RecoverableKeyStoreDb.java | 97 public long insertKey(int userId, int uid, String alias, WrappedKey wrappedKey) { in insertKey() argument 103 values.put(KeysEntry.COLUMN_NAME_NONCE, wrappedKey.getNonce()); in insertKey() 104 values.put(KeysEntry.COLUMN_NAME_WRAPPED_KEY, wrappedKey.getKeyMaterial()); in insertKey() 106 values.put(KeysEntry.COLUMN_NAME_GENERATION_ID, wrappedKey.getPlatformKeyGenerationId()); in insertKey() 107 values.put(KeysEntry.COLUMN_NAME_RECOVERY_STATUS, wrappedKey.getRecoveryStatus()); in insertKey() 108 byte[] keyMetadata = wrappedKey.getKeyMetadata(); in insertKey()
|
/frameworks/base/media/java/android/media/ |
D | MediaDrm.java | 2575 @NonNull String algorithm, @NonNull byte[] wrappedKey, @NonNull byte[] message); 2592 @NonNull byte[] wrappedKey, @NonNull byte[] message) { 2593 return signRSANative(this, sessionId, algorithm, wrappedKey, message);
|
/frameworks/base/media/jni/ |
D | android_media_MediaDrm.cpp | 1426 Vector<uint8_t> certificate, wrappedKey; in android_media_MediaDrm_provideProvisionResponseNative() local 1428 DrmStatus err = drm->provideProvisionResponse(response, certificate, wrappedKey); in android_media_MediaDrm_provideProvisionResponseNative() 1435 if (clazz && certificate.size() && wrappedKey.size()) { in android_media_MediaDrm_provideProvisionResponseNative() 1440 jbyteArray jwrappedKey = VectorToJByteArray(env, wrappedKey); in android_media_MediaDrm_provideProvisionResponseNative() 2050 Vector<uint8_t> wrappedKey(JByteArrayToVector(env, jwrappedKey)); in android_media_MediaDrm_signRSANative() local 2054 DrmStatus err = drm->signRSA(sessionId, algorithm, message, wrappedKey, signature); in android_media_MediaDrm_signRSANative()
|