/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/hks_storage/src/ |
H A D | hks_storage_lite.c | 390 ((keyBlob->size > BUF_SIZE_ADDEND_PER_TIME) ? keyBlob->size : BUF_SIZE_ADDEND_PER_TIME); in AdjustImageBuffer() 404 keyBlob->data, keyBlob->size) != EOK) { in AdjustImageBuffer() 444 keyBlob->data, keyBlob->size) != EOK) { in AppendNewKey() 453 return AdjustImageBuffer(totalLenAdded, keyBlob); in AppendNewKey() 462 uint32_t newTotalLen = totalLen + keyBlob->size; in GetLenAfterAddKey() 535 ret = AppendNewKey(keyBlob); in StoreKeyBlob() 601 return StoreRootMaterial(keyAlias, keyBlob); in HksStoreKeyBlob() 680 return GetRootMaterial(keyAlias, keyBlob); in HksStoreGetKeyBlob() 694 keyBlob->size = keyInfo->keyInfoLen; in HksStoreGetKeyBlob() 696 if (memcpy_s(keyBlob->data, keyBlob->size, tmpBuf, keyInfo->keyInfoLen) != EOK) { in HksStoreGetKeyBlob() [all …]
|
H A D | hks_storage.c | 189 static int32_t GetKeyBlobFromFile(const char *path, const char *fileName, struct HksBlob *keyBlob) in GetKeyBlobFromFile() argument 196 if (keyBlob->size < size) { in GetKeyBlobFromFile() 200 int32_t ret = HksStorageReadFile(path, fileName, 0, keyBlob, &size); in GetKeyBlobFromFile() 209 keyBlob->size = size; in GetKeyBlobFromFile() 238 static int32_t GetKeyBlob(const struct HksStoreInfo *fileInfoPath, struct HksBlob *keyBlob) in GetKeyBlob() argument 243 int32_t ret = GetKeyBlobFromFile(fileInfoPath->path, fileInfoPath->fileName, keyBlob); in GetKeyBlob() 279 int32_t HksStoreKeyBlob(const struct HksStoreFileInfo *fileInfo, const struct HksBlob *keyBlob) in HksStoreKeyBlob() argument 287 keyBlob->data, keyBlob->size); in HksStoreKeyBlob() 292 keyBlob->data, keyBlob->size) != HKS_SUCCESS) { in HksStoreKeyBlob() 325 int32_t HksStoreGetKeyBlob(const struct HksStoreInfo *fileInfoPath, struct HksBlob *keyBlob) in HksStoreGetKeyBlob() argument [all …]
|
H A D | hks_storage_manager.c | 289 const struct HksBlob *keyAlias, const struct HksBlob *keyBlob, uint32_t storageType) in HksManageStoreKeyBlob() argument 302 ret = HksStoreKeyBlob(NULL, keyAlias, storageType, keyBlob); in HksManageStoreKeyBlob() 310 ret = HksStoreKeyBlob(&fileInfo, keyBlob); in HksManageStoreKeyBlob() 385 const struct HksBlob *keyAlias, struct HksBlob *keyBlob, uint32_t storageType) in HksManageStoreGetKeyBlob() argument 398 ret = HksStoreGetKeyBlob(NULL, keyAlias, storageType, keyBlob); in HksManageStoreGetKeyBlob() 407 ret = HksStoreGetKeyBlob(&fileInfo.mainPath, keyBlob); in HksManageStoreGetKeyBlob() 411 ret = HksStoreGetKeyBlob(&fileInfo.bakPath, keyBlob); in HksManageStoreGetKeyBlob() 415 keyBlob->data, keyBlob->size) != HKS_SUCCESS) { in HksManageStoreGetKeyBlob()
|
/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/os_dependency/ca/ |
H A D | hks_teec.h | 28 int32_t HksTeeGenerateKey(const struct HksBlob *keyBlob, const struct HksParamSet *paramSetIn, 37 int32_t HksTeeSign(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet, 40 int32_t HksTeeVerify(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet, 43 int32_t HksTeeEncrypt(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet, 46 int32_t HksTeeDecrypt(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet, 62 int32_t HksTeeMac(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet,
|
H A D | hks_teec.c | 322 InitializeBlob(¶ms[0].blob, keyBlob->size, keyBlob->data); in HksTeeGenerateKey() 469 InitializeBlob(¶ms[0].blob, keyBlob->size, keyBlob->data); in ProcessInit() 531 InitializeBlob(¶ms[0].blob, keyBlob->size, keyBlob->data); in ProcessOnce() 560 int32_t HksTeeSign(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet, in HksTeeSign() argument 563 return ProcessOnce(HKS_CMD_ID_SIGN, keyBlob, paramSet, srcData, signature); in HksTeeSign() 566 int32_t HksTeeVerify(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet, in HksTeeVerify() argument 572 int32_t HksTeeMac(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet, in HksTeeMac() argument 575 return ProcessOnce(HKS_CMD_ID_MAC, keyBlob, paramSet, srcData, mac); in HksTeeMac() 578 int32_t HksTeeEncrypt(const struct HksBlob *keyBlob, const struct HksParamSet *paramSet, in HksTeeEncrypt() argument 581 return ProcessOnce(HKS_CMD_ID_ENCRYPT, keyBlob, paramSet, plainText, cipherText); in HksTeeEncrypt() [all …]
|
H A D | hks_ca_access.c | 34 int32_t HksAccessGenerateKey(const struct HksBlob *keyBlob, const struct HksParamSet *paramSetIn, in HksAccessGenerateKey() argument 38 return HksTeeGenerateKey(keyBlob, paramSetIn, keyOut); in HksAccessGenerateKey()
|
/ohos5.0/base/security/huks/test/unittest/huks_lite_test/common/ |
H A D | hks_test_aes.c | 27 struct HksBlob keyBlob; in TestAes256ByLocal() local 33 keyBlob.data = (uint8_t *)testKey; in TestAes256ByLocal() 34 keyBlob.size = sizeof(testKey); in TestAes256ByLocal() 56 HKS_TEST_ASSERT(HksEncryptForDe(&keyBlob, paramSet, &plainText1, &cipherText1) == 0); in TestAes256ByLocal() 76 ret = HksDecryptForDe(&keyBlob, paramSet, &cipherText, &plainText); in TestAes256ByLocal()
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/framework_test/os_dependency_test/src/ |
H A D | hks_ipc_check_test.cpp | 94 struct HksBlob keyBlob = { .size = strlen(keyData), .data = (uint8_t *)keyData }; variable 95 ret = HksCheckIpcImportKey(&keyAliasBlob, paramSet, &keyBlob); 115 struct HksBlob keyBlob = { .size = MAX_PROCESS_SIZE / 2 + 1, .data = (uint8_t *)keyData }; variable 116 ret = HksCheckIpcImportKey(&keyAliasBlob, paramSet, &keyBlob); 138 struct HksBlob keyBlob = { .size = MAX_PROCESS_SIZE / 2 + 1, .data = (uint8_t *)keyData }; variable 139 ret = HksCheckIpcImportWrappedKey(&keyAliasBlob, &wrappedKeyAliasBlob, paramSet, &keyBlob); 162 struct HksBlob keyBlob = { .size = MAX_PROCESS_SIZE + 1, .data = (uint8_t *)keyData }; variable 179 struct HksBlob keyBlob = { .size = MAX_PROCESS_SIZE + 1, .data = (uint8_t *)keyData }; variable 185 ret = HksCheckIpcExportPublicKey(&keyAliasBlob, paramSet, &keyBlob); 201 struct HksBlob keyBlob = { .size = MAX_PROCESS_SIZE / 2 + 1, .data = (uint8_t *)keyData }; variable [all …]
|
/ohos5.0/base/security/huks/test/fuzz_test/innerapi_fuzzer/hksstorage_fuzzer/ |
H A D | hksstorage_fuzzer.cpp | 85 HksBlob keyBlob = { in PrepareBlob() local 97 &keyBlob, HksStorageType::HKS_STORAGE_TYPE_KEY); in PrepareBlob() 111 HksBlob keyBlob = { in HksStorageTest001() local 127 &keyBlob, HksStorageType::HKS_STORAGE_TYPE_KEY); in HksStorageTest001() 148 HksBlob keyBlob = { in HksStorageTest002() local 160 &keyAlias, &keyBlob, HksStorageType::HKS_STORAGE_TYPE_KEY); in HksStorageTest002()
|
/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/hks_storage/include/ |
H A D | hks_storage.h | 28 uint32_t storageType, const struct HksBlob *keyBlob); 37 const struct HksBlob *keyAlias, uint32_t storageType, struct HksBlob *keyBlob); 45 int32_t HksStoreKeyBlob(const struct HksStoreFileInfo *fileInfo, const struct HksBlob *keyBlob); 51 int32_t HksStoreGetKeyBlob(const struct HksStoreInfo *fileInfoPath, struct HksBlob *keyBlob);
|
H A D | hks_storage_manager.h | 26 const struct HksBlob *keyAlias, const struct HksBlob *keyBlob, uint32_t storageType); 35 const struct HksBlob *keyAlias, struct HksBlob *keyBlob, uint32_t storageType);
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/storage_multithread_test/src/ |
H A D | hks_storage_test.cpp | 113 HksBlob keyBlob = { in PrepareBlob() local 126 &keyBlob, HksStorageType::HKS_STORAGE_TYPE_KEY); in PrepareBlob() 141 HksBlob keyBlob = { variable 158 &keyBlob, HksStorageType::HKS_STORAGE_TYPE_KEY); 180 HksBlob keyBlob = { variable 193 &keyAlias, &keyBlob, HksStorageType::HKS_STORAGE_TYPE_KEY);
|
/ohos5.0/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/ |
H A D | hks_openssl_sm2.c | 151 static int GetSm2Modules(const struct HksBlob *keyBlob, struct KeyMaterialEcc **out) in GetSm2Modules() argument 153 if (CheckBlob(keyBlob) != HKS_SUCCESS) { in GetSm2Modules() 157 if (keyBlob->size < sizeof(struct KeyMaterialEcc)) { in GetSm2Modules() 158 HKS_LOG_E("invalid keyBlob size %" LOG_PUBLIC "u", keyBlob->size); in GetSm2Modules() 161 struct KeyMaterialEcc *keyMaterial = (struct KeyMaterialEcc *)keyBlob->data; in GetSm2Modules() 171 keyBlob->size)) { in GetSm2Modules() 175 …if (keyBlob->size < sizeof(struct KeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize + keyM… in GetSm2Modules() 176 HKS_LOG_E("invalid keyBlob size %" LOG_PUBLIC "u", keyBlob->size); in GetSm2Modules() 273 static EVP_PKEY *Sm2InitKey(const struct HksBlob *keyBlob, enum HksKeyPurpose keyPurpose) in Sm2InitKey() argument 278 HKS_IF_NOT_SUCC_LOGE_RETURN(GetSm2Modules(keyBlob, &keyMaterial), in Sm2InitKey()
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/service_test/huks_engine/core/src/ |
H A D | hks_core_service_test.cpp | 515 …struct HksBlob keyBlob = { .size = KEY_BLOB_DEFAULT_SIZE, .data = (uint8_t *)HksMalloc(KEY_BLOB_DE… variable 516 ASSERT_NE(keyBlob.data, nullptr); 522 … ret = HksManageStoreGetKeyBlob(&processInfo, paramSet, &keyAlias, &keyBlob, HKS_STORAGE_TYPE_KEY); 531 ret = HksCoreExportPublicKeyForDe(&keyBlob, runtimeParamSet, &keyOutBlob); 536 HKS_FREE(keyBlob.data); 599 ret = HksCoreExportPublicKeyForDe(&keyBlob, runtimeParamSet, nullptr); 603 HKS_FREE(keyBlob.data); 658 ASSERT_NE(keyBlob.data, nullptr); 664 … ret = HksManageStoreGetKeyBlob(&processInfo, paramSet, &keyAlias, &keyBlob, HKS_STORAGE_TYPE_KEY); 673 ret = HksCoreExportPublicKeyForDe(&keyBlob, runtimeParamSet, &keyOutBlob); [all …]
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/hmac/src/ |
H A D | mac_openssl.c | 83 HcfBlob keyBlob = ((SymKeyImpl *)key)->keyMaterial; in OpensslEngineInitMac() local 84 if (!HcfIsBlobValid(&keyBlob)) { in OpensslEngineInitMac() 89 … int32_t ret = OpensslHmacInitEx(OpensslGetMacCtx(self), keyBlob.data, keyBlob.len, mdfunc, NULL); in OpensslEngineInitMac()
|
/ohos5.0/base/security/huks/test/unittest/modify_old_version_key_test_util/ |
H A D | hks_test_modify_old_key.c | 60 struct HksBlob keyBlob = { .size = KEY_MAX_SIZE, .data = keyData }; in HksTestGenerateOldKey() local 62 (void)HksCoreGenerateKey(keyAlias, newParamSet, NULL, &keyBlob); in HksTestGenerateOldKey() 64 (void)HksManageStoreKeyBlob(processInfo, newParamSet, keyAlias, &keyBlob, HKS_STORAGE_TYPE_KEY); in HksTestGenerateOldKey()
|
/ohos5.0/docs/zh-cn/application-dev/security/CryptoArchitectureKit/ |
H A D | crypto-convert-binary-data-to-sym-key.md | 103 let keyBlob: cryptoFramework.DataBlob = { 107 let key = await symKeyGenerator.convertKey(keyBlob); 121 let keyBlob: cryptoFramework.DataBlob = { 125 let key = symKeyGenerator.convertKeySync(keyBlob);
|
/ohos5.0/foundation/graphic/graphic_2d/frameworks/opengl_wrapper/src/EGL/ |
H A D | egl_blob_cache.cpp | 150 std::shared_ptr<Blob> keyBlob = std::make_shared<Blob>(key, (size_t)keySize); in SetBlob() local 151 auto it = mBlobMap_.find(keyBlob); in SetBlob() 176 mBlobMap_.emplace(keyBlob, valueBlob); in SetBlob() 177 MoveToFront(keyBlob); in SetBlob() 202 std::shared_ptr<Blob> keyBlob = std::make_shared<Blob>(key, (size_t)keySize); in GetBlob() local 203 auto it = mBlobMap_.find(keyBlob); in GetBlob()
|
/ohos5.0/base/security/huks/test/unittest/huks_lite_test/liteos_m_adapter/ |
H A D | hks_modify_key_test.c | 125 uint32_t storageType, const struct HksBlob *keyBlob); 127 uint32_t storageType, const struct HksBlob *keyBlob) in HksStoreKeyBlob() argument 132 (void)keyBlob; in HksStoreKeyBlob()
|
/ohos5.0/docs/zh-cn/application-dev/security/UniversalKeystoreKit/ |
H A D | huks-export-key-ndk.md | 38 struct OH_Huks_Blob keyBlob = { 256, pubKey }; 41 ohResult = OH_Huks_ExportPublicKeyItem(&aliasBlob, nullptr, &keyBlob);
|
/ohos5.0/base/security/huks/interfaces/inner_api/huks_standard/main/include/ |
H A D | hks_plugin_def.h | 53 const struct HksBlob *keyAlias, const struct HksBlob *keyBlob, uint32_t storageType); 59 const struct HksBlob *keyAlias, struct HksBlob *keyBlob, uint32_t storageType);
|
/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/core/src/ |
H A D | hks_keyblob.c | 378 uint8_t *keyBlob = (uint8_t *)HksMalloc(inData->size); in GetAadAndParamSet() local 379 HKS_IF_NULL_LOGE_RETURN(keyBlob, HKS_ERROR_MALLOC_FAIL, "malloc keyBlob failed") in GetAadAndParamSet() local 381 (void)memcpy_s(keyBlob, inData->size, inData->data, inData->size); in GetAadAndParamSet() 384 … int32_t ret = HksGetParamSet((const struct HksParamSet *)keyBlob, inData->size, &keyBlobParamSet); in GetAadAndParamSet() 386 HKS_FREE(keyBlob); in GetAadAndParamSet() 394 HKS_FREE(keyBlob); in GetAadAndParamSet() 401 HKS_FREE(keyBlob); in GetAadAndParamSet() 409 aad->data = keyBlob; in GetAadAndParamSet()
|
/ohos5.0/base/security/crypto_framework/test/unittest/src/native/ |
H A D | native_signature_test.cpp | 114 Crypto_DataBlob keyBlob = { variable 134 …ASSERT_EQ(OH_CryptoAsymKeyGenerator_Convert(keyCtx, CRYPTO_DER, &keyBlob, nullptr, &keyPair), CRYP…
|
/ohos5.0/docs/en/application-dev/security/CryptoArchitectureKit/ |
H A D | crypto-convert-binary-data-to-sym-key.md | 103 let keyBlob: cryptoFramework.DataBlob = { 107 let key = await symKeyGenerator.convertKey(keyBlob); 121 let keyBlob: cryptoFramework.DataBlob = { 125 let key = symKeyGenerator.convertKeySync(keyBlob);
|
/ohos5.0/docs/en/application-dev/security/UniversalKeystoreKit/ |
H A D | huks-export-key-ndk.md | 38 struct OH_Huks_Blob keyBlob = { 256, pubKey }; 41 ohResult = OH_Huks_ExportPublicKeyItem(&aliasBlob, nullptr, &keyBlob);
|