/system/security/keystore/ |
D | keystore.cpp | 212 ResponseCode KeyStore::get(const char* filename, Blob* keyBlob, const BlobType type, uid_t userId) { in get() argument 215 keyBlob->readBlob(filename, userState->getDecryptionKey(), userState->getState()); in get() 220 const uint8_t version = keyBlob->getVersion(); in get() 226 if (upgradeBlob(filename, keyBlob, version, type, userId)) { in get() 227 if ((rc = this->put(filename, keyBlob, userId)) != NO_ERROR || in get() 228 (rc = keyBlob->readBlob(filename, userState->getDecryptionKey(), in get() 241 keyBlob->isFallback()) { in get() 243 importKey(keyBlob->getValue(), keyBlob->getLength(), filename, userId, in get() 244 keyBlob->isEncrypted() ? KEYSTORE_FLAG_ENCRYPTED : KEYSTORE_FLAG_NONE); in get() 249 rc = get(filename, keyBlob, TYPE_KEY_PAIR, userId); in get() [all …]
|
D | key_store_service.cpp | 74 Blob keyBlob; in get() local 76 ResponseCode responseCode = mKeyStore->getKeyForName(&keyBlob, name8, targetUid, TYPE_GENERIC); in get() 83 *item = (uint8_t*)malloc(keyBlob.getLength()); in get() 84 memcpy(*item, keyBlob.getValue(), keyBlob.getLength()); in get() 85 *itemLength = keyBlob.getLength(); in get() 102 Blob keyBlob(item, itemLength, NULL, 0, ::TYPE_GENERIC); in insert() local 103 keyBlob.setEncrypted(flags & KEYSTORE_FLAG_ENCRYPTED); in insert() 105 return mKeyStore->put(filename.string(), &keyBlob, get_user_id(targetUid)); in insert() 538 Blob keyBlob; in duplicate() local 540 mKeyStore->get(sourceFile.string(), &keyBlob, TYPE_ANY, get_user_id(srcUid)); in duplicate() [all …]
|
D | keystore.h | 70 ResponseCode get(const char* filename, Blob* keyBlob, const BlobType type, uid_t userId); 71 ResponseCode put(const char* filename, Blob* keyBlob, uid_t userId); 87 ResponseCode getKeyForName(Blob* keyBlob, const android::String8& keyName, const uid_t uid,
|
/system/vold/ |
D | Keymaster.cpp | 199 keymaster_key_blob_t keyBlob; in generateKey() local 200 auto error = mDevice->generate_key(&inParams, &keyBlob); in generateKey() 205 key->assign(reinterpret_cast<const char*>(keyBlob.key_material), keyBlob.key_material_size); in generateKey() 206 free(const_cast<uint8_t*>(keyBlob.key_material)); in generateKey() 211 keymaster_key_blob_t keyBlob{reinterpret_cast<const uint8_t*>(key.data()), key.size()}; in deleteKey() local 212 auto error = mDevice->delete_key(&keyBlob); in deleteKey() 223 keymaster_key_blob_t keyBlob{reinterpret_cast<const uint8_t*>(key.data()), key.size()}; in begin() local 226 auto error = mDevice->begin(purpose, &keyBlob, &inParams, &outParams_set, &mOpHandle); in begin() 239 keymaster_key_blob_t keyBlob{reinterpret_cast<const uint8_t*>(key.data()), key.size()}; in begin() local 241 auto error = mDevice->begin(purpose, &keyBlob, &inParams, nullptr, &mOpHandle); in begin()
|
/system/security/softkeymaster/include/keymaster/ |
D | softkeymaster.h | 23 const void* key_params, uint8_t** keyBlob, size_t* keyBlobLength); 32 int openssl_sign_data(const keymaster0_device_t* dev, const void* params, const uint8_t* keyBlob, 36 int openssl_verify_data(const keymaster0_device_t* dev, const void* params, const uint8_t* keyBlob,
|
/system/core/libutils/ |
D | BlobCache.cpp | 90 sp<Blob> keyBlob(new Blob(key, keySize, true)); in set() local 106 mCacheEntries.add(CacheEntry(keyBlob, valueBlob)); in set() 173 sp<Blob> keyBlob = e.getKey(); in getFlattenedSize() local 175 size += align4(sizeof(EntryHeader) + keyBlob->getSize() + in getFlattenedSize() 201 sp<Blob> keyBlob = e.getKey(); in flatten() local 203 size_t keySize = keyBlob->getSize(); in flatten() 218 memcpy(eheader->mData, keyBlob->getData(), keySize); in flatten()
|
/system/security/softkeymaster/ |
D | keymaster_openssl.cpp | 109 static int wrap_key(EVP_PKEY* pkey, int type, uint8_t** keyBlob, size_t* keyBlobLength) { in wrap_key() argument 157 *keyBlob = derData.release(); in wrap_key() 162 static EVP_PKEY* unwrap_key(const uint8_t* keyBlob, const size_t keyBlobLength) { in unwrap_key() argument 165 const uint8_t* p = keyBlob; in unwrap_key() 166 const uint8_t* const end = keyBlob + keyBlobLength; in unwrap_key() 168 if (keyBlob == NULL) { in unwrap_key() 367 uint8_t** keyBlob, size_t* keyBlobLength) { in openssl_generate_keypair() argument 394 if (wrap_key(pkey.get(), EVP_PKEY_type(pkey->type), keyBlob, keyBlobLength)) { in openssl_generate_keypair() 573 const keymaster0_device_t*, const void* params, const uint8_t* keyBlob, in openssl_sign_data() argument 584 Unique_EVP_PKEY pkey(unwrap_key(keyBlob, keyBlobLength)); in openssl_sign_data() [all …]
|