Home
last modified time | relevance | path

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

12

/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DWrappedKeyTest.java74 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 …]
DRecoverableKeyGeneratorTest.java101 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/
DWrappedKey.java210 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()
DRecoverableKeyGenerator.java104 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/
DRecoverableKeyStoreDbTest.java89 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/
DMediaDrmSigner.java134 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/
DDrmPlugin.h101 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/
DDrmHal.cpp117 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()
DDrmMetricsLogger.cpp274 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()
DDrmHalAidl.cpp703 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()
DDrmHalHidl.cpp904 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/
DKeyStoreSecurityLevel.java192 @NonNull byte[] wrappedKey, byte[] maskingKey, in importWrappedKey() argument
199 keyDescriptor.blob = wrappedKey; in importWrappedKey()
/frameworks/av/drm/libmediadrm/include/mediadrm/
DDrmHal.h58 Vector<uint8_t> &wrappedKey);
109 Vector<uint8_t> const &wrappedKey,
DIDrm.h96 Vector<uint8_t> &wrappedKey) = 0;
161 Vector<uint8_t> const &wrappedKey,
DDrmHalAidl.h68 Vector<uint8_t>& wrappedKey);
104 Vector<uint8_t> const& message, Vector<uint8_t> const& wrappedKey,
DDrmMetricsLogger.h137 Vector<uint8_t>& wrappedKey);
186 Vector<uint8_t> const& message, Vector<uint8_t> const& wrappedKey,
DDrmHalHidl.h109 Vector<uint8_t> &wrappedKey);
171 Vector<uint8_t> const &wrappedKey,
/frameworks/av/drm/mediadrm/plugins/mock/
DMockDrmCryptoPlugin.h88 Vector<uint8_t> &wrappedKey);
136 Vector<uint8_t> const &wrappedKey,
DMockDrmCryptoPlugin.cpp707 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/
DAndroidKeyStoreCipherSpiBase.java791 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()
DAndroidKeyStoreSpi.java979 KeyDescriptor wrappedKey = makeKeyDescriptor(alias); in setWrappedKeyEntry() local
1031 wrappedKey, wrappingkey, in setWrappedKeyEntry()
/frameworks/av/drm/libmediadrm/fuzzer/
Dmediadrm_fuzzer.cpp230 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/
DRecoverableKeyStoreDb.java97 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/
DMediaDrm.java2575 @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/
Dandroid_media_MediaDrm.cpp1426 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()

12