/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
D | WrappedKeyTest.java | 68 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped() local 74 new GCMParameterSpec(GCM_TAG_LENGTH_BITS, wrappedKey.getNonce())); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped() 76 wrappedKey.getKeyMaterial(), KEY_ALGORITHM, Cipher.SECRET_KEY); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped() 86 WrappedKey wrappedKey = WrappedKey.fromSecretKey(wrappingKey, rawKey); in fromSecretKey_returnsAKeyWithTheGenerationIdOfTheWrappingKey() local 88 assertEquals(GENERATION_ID, wrappedKey.getPlatformKeyGenerationId()); in fromSecretKey_returnsAKeyWithTheGenerationIdOfTheWrappingKey() 96 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_decryptsWrappedKeys() local 99 keysByAlias.put(alias, wrappedKey); in decryptWrappedKeys_decryptsWrappedKeys() 114 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_doesNotDieIfSomeKeysAreUnwrappable() local 117 keysByAlias.put(alias, wrappedKey); in decryptWrappedKeys_doesNotDieIfSomeKeysAreUnwrappable() 129 WrappedKey wrappedKey = WrappedKey.fromSecretKey( in decryptWrappedKeys_throwsIfPlatformKeyGenerationIdDoesNotMatch() local [all …]
|
D | RecoverableKeyGeneratorTest.java | 96 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesWrappedKey() local 97 assertNotNull(wrappedKey); in generateAndStoreKey_storesWrappedKey() 113 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() local 116 new GCMParameterSpec(GCM_TAG_LENGTH_BITS, wrappedKey.getNonce())); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 117 byte[] unwrappedMaterial = cipher.doFinal(wrappedKey.getKeyMaterial()); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 127 WrappedKey wrappedKey = mRecoverableKeyStoreDb.getKey(KEYSTORE_UID_SELF, TEST_ALIAS); in importKey_storesTheWrappedVersionOfTheRawMaterial() local 130 new GCMParameterSpec(GCM_TAG_LENGTH_BITS, wrappedKey.getNonce())); in importKey_storesTheWrappedVersionOfTheRawMaterial() 131 byte[] unwrappedMaterial = cipher.doFinal(wrappedKey.getKeyMaterial()); in importKey_storesTheWrappedVersionOfTheRawMaterial()
|
D | RecoverableKeyStoreManagerTest.java | 1149 WrappedKey wrappedKey = new WrappedKey(NONCE, KEY_MATERIAL, GENERATION_ID, status); in setRecoveryStatus() local 1150 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in setRecoveryStatus()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
D | WrappedKey.java | 194 WrappedKey wrappedKey = wrappedKeys.get(alias); in unwrapKeys() local 195 if (wrappedKey.getPlatformKeyGenerationId() != platformKeyGenerationId) { in unwrapKeys() 201 wrappedKey.getPlatformKeyGenerationId(), in unwrapKeys() 208 new GCMParameterSpec(GCM_TAG_LENGTH_BITS, wrappedKey.getNonce())); in unwrapKeys() 212 wrappedKey.getKeyMaterial(), APPLICATION_KEY_ALGORITHM, Cipher.SECRET_KEY); in unwrapKeys()
|
D | RecoverableKeyGenerator.java | 100 WrappedKey wrappedKey = WrappedKey.fromSecretKey(platformKey, key); in generateAndStoreKey() local 101 long result = mDatabase.insertKey(userId, uid, alias, wrappedKey); in generateAndStoreKey() 142 WrappedKey wrappedKey = WrappedKey.fromSecretKey(platformKey, key); in importKey() local 143 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 | 159 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, generationId, 120); in getKey_returnsInsertedKey() local 160 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in getKey_returnsInsertedKey() 178 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, generationId); in getAllKeys_getsKeysWithUserIdAndGenerationId() local 179 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in getAllKeys_getsKeysWithUserIdAndGenerationId() 195 WrappedKey wrappedKey = new WrappedKey( in getAllKeys_doesNotReturnKeysWithBadGenerationId() local 200 userId, uid, /*alias=*/ "test", wrappedKey); in getAllKeys_doesNotReturnKeysWithBadGenerationId() 212 WrappedKey wrappedKey = new WrappedKey( in getAllKeys_doesNotReturnKeysWithBadUserId() local 215 /*userId=*/ 1, uid, /*alias=*/ "test", wrappedKey); in getAllKeys_doesNotReturnKeysWithBadUserId() 256 WrappedKey wrappedKey = new WrappedKey(nonce, keyMaterial, generationId, status); in setRecoveryStatus_withSingleKey() local 257 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in setRecoveryStatus_withSingleKey() [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 | IDrm.cpp | 273 Vector<uint8_t> &wrappedKey) { in provideProvisionResponse() 284 readVector(reply, wrappedKey); in provideProvisionResponse() 641 Vector<uint8_t> const &wrappedKey, in signRSA() 649 writeVector(data, wrappedKey); in signRSA() 867 Vector<uint8_t> wrappedKey; in onTransact() local 869 status_t result = provideProvisionResponse(response, certificate, wrappedKey); in onTransact() 871 writeVector(reply, wrappedKey); in onTransact() 1121 Vector<uint8_t> sessionId, message, wrappedKey, signature; in onTransact() local 1125 readVector(data, wrappedKey); in onTransact() 1126 uint32_t result = signRSA(sessionId, algorithm, message, wrappedKey, signature); in onTransact()
|
D | DrmHal.cpp | 853 Vector<uint8_t> &certificate, Vector<uint8_t> &wrappedKey) { in provideProvisionResponse() argument 864 wrappedKey = toVector(hWrappedKey); in provideProvisionResponse() 1304 Vector<uint8_t> const &wrappedKey, Vector<uint8_t> &signature) { in signRSA() argument 1317 toHidlString(algorithm), toHidlVec(message), toHidlVec(wrappedKey), in signRSA()
|
/frameworks/av/include/mediadrm/ |
D | IDrm.h | 76 Vector<uint8_t> &wrappedKey) = 0; 136 Vector<uint8_t> const &wrappedKey,
|
D | Drm.h | 78 Vector<uint8_t> &wrappedKey); 125 Vector<uint8_t> const &wrappedKey,
|
D | DrmHal.h | 99 Vector<uint8_t> &wrappedKey); 156 Vector<uint8_t> const &wrappedKey,
|
/frameworks/av/media/libmedia/include/media/ |
D | IDrm.h | 76 Vector<uint8_t> &wrappedKey) = 0; 136 Vector<uint8_t> const &wrappedKey,
|
D | Drm.h | 78 Vector<uint8_t> &wrappedKey); 125 Vector<uint8_t> const &wrappedKey,
|
D | DrmHal.h | 99 Vector<uint8_t> &wrappedKey); 156 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).string(), in signRSA() 726 mByteArrayProperties.add(String8("mock-wrappedkey"), wrappedKey); in signRSA()
|
/frameworks/base/keystore/java/android/security/keystore/ |
D | AndroidKeyStoreCipherSpiBase.java | 663 protected final Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, in engineUnwrap() argument 674 if (wrappedKey == null) { in engineUnwrap() 680 encoded = engineDoFinal(wrappedKey, 0, wrappedKey.length); in engineUnwrap()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/ |
D | RecoverableKeyStoreDb.java | 96 public long insertKey(int userId, int uid, String alias, WrappedKey wrappedKey) { in insertKey() argument 102 values.put(KeysEntry.COLUMN_NAME_NONCE, wrappedKey.getNonce()); in insertKey() 103 values.put(KeysEntry.COLUMN_NAME_WRAPPED_KEY, wrappedKey.getKeyMaterial()); in insertKey() 105 values.put(KeysEntry.COLUMN_NAME_GENERATION_ID, wrappedKey.getPlatformKeyGenerationId()); in insertKey() 106 values.put(KeysEntry.COLUMN_NAME_RECOVERY_STATUS, wrappedKey.getRecoveryStatus()); in insertKey()
|
/frameworks/av/drm/mediadrm/plugins/clearkey/hidl/include/ |
D | DrmPlugin.h | 238 const hidl_vec<uint8_t>& wrappedKey, in signRSA() 241 message.size() == 0 || wrappedKey.size() == 0) { in signRSA()
|
/frameworks/base/media/java/android/media/ |
D | MediaDrm.java | 1576 @NonNull String algorithm, @NonNull byte[] wrappedKey, @NonNull byte[] message); in signRSANative() argument 1592 @NonNull byte[] wrappedKey, @NonNull byte[] message) { in signRSA() argument 1593 return signRSANative(this, sessionId, algorithm, wrappedKey, message); in signRSA()
|
/frameworks/base/media/jni/ |
D | android_media_MediaDrm.cpp | 1189 Vector<uint8_t> certificate, wrappedKey; in android_media_MediaDrm_provideProvisionResponseNative() local 1191 status_t err = drm->provideProvisionResponse(response, certificate, wrappedKey); in android_media_MediaDrm_provideProvisionResponseNative() 1198 if (clazz && certificate.size() && wrappedKey.size()) { in android_media_MediaDrm_provideProvisionResponseNative() 1203 jbyteArray jwrappedKey = VectorToJByteArray(env, wrappedKey); in android_media_MediaDrm_provideProvisionResponseNative() 1756 Vector<uint8_t> wrappedKey(JByteArrayToVector(env, jwrappedKey)); in android_media_MediaDrm_signRSANative() local 1760 status_t err = drm->signRSA(sessionId, algorithm, message, wrappedKey, signature); in android_media_MediaDrm_signRSANative()
|
/frameworks/base/keystore/java/android/security/ |
D | KeyStore.java | 516 public int importWrappedKey(String wrappedKeyAlias, byte[] wrappedKey, in importWrappedKey() argument 521 return mBinder.importWrappedKey(wrappedKeyAlias, wrappedKey, wrappingKeyAlias, in importWrappedKey()
|