Home
last modified time | relevance | path

Searched refs:keyInfo (Results 1 - 25 of 25) sorted by relevance

/base/security/huks/services/huks_standard/huks_service/main/hks_storage/src/
H A Dhks_storage_adapter.c25 bool HksIsKeyInfoLenInvalid(struct HksStoreKeyInfo *keyInfo) in HksIsKeyInfoLenInvalid() argument
27 return (keyInfo->aliasSize > HKS_MAX_KEY_ALIAS_LEN) || (keyInfo->aliasSize == 0) || in HksIsKeyInfoLenInvalid()
28 (keyInfo->keySize > HKS_MAX_KEY_MATERIAL_LEN) || (keyInfo->keySize == 0) || in HksIsKeyInfoLenInvalid()
29 (keyInfo->authIdSize > HKS_MAX_KEY_AUTH_ID_LEN) || in HksIsKeyInfoLenInvalid()
30 (keyInfo->keyInfoLen != (sizeof(*keyInfo) + keyInfo->aliasSize + keyInfo in HksIsKeyInfoLenInvalid()
33 AddStorageFixedParams(const struct HksStoreKeyInfo *keyInfo, struct HksParamSet *paramSet) AddStorageFixedParams() argument
80 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)keyInfoBlob->data; AddStorageParams() local
[all...]
H A Dhks_storage_lite.c365 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)tmpBuf; in GetKeyOffsetByKeyAlias() local
366 if (HksIsKeyInfoLenInvalid(keyInfo) || (keyInfo->keyInfoLen > (totalLen - offset))) { in GetKeyOffsetByKeyAlias()
371 if (keyInfo->aliasSize == keyAlias->size) { in GetKeyOffsetByKeyAlias()
372 if (HksMemCmp(keyAlias->data, tmpBuf + sizeof(*keyInfo), keyAlias->size) == 0) { in GetKeyOffsetByKeyAlias()
378 offset += keyInfo->keyInfoLen; in GetKeyOffsetByKeyAlias()
475 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)(g_storageImageBuffer.data + keyOffset); in DeleteKey() local
477 uint32_t keyInfoLen = keyInfo->keyInfoLen; in DeleteKey()
483 (void)memset_s(keyInfo, keyInfoLen, 0, keyInfoLen); in DeleteKey()
487 if (memmove_s(keyInfo, keyInfoHea in DeleteKey()
508 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)(g_storageImageBuffer.data + offset); StoreKeyBlob() local
642 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)(g_storageImageBuffer.data + offset); HksStoreDeleteKeyBlob() local
693 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)tmpBuf; HksStoreGetKeyBlob() local
752 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)keyInfoBlob->data; GetKeyInfoList() local
830 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)tmpBuf; HksStoreGetKeyInfoList() local
[all...]
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
H A Dhks_keyblob_lite.c105 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)cipherKey->data; in BuildKeyBlobUsageSpec() local
119 /* aad: from keyInfo->keySize to authId */ in BuildKeyBlobUsageSpec()
121 .size = sizeof(*keyInfo) - sizeof(keyInfo->keyInfoLen) + keyInfo->aliasSize + keyInfo->authIdSize, in BuildKeyBlobUsageSpec()
122 .data = cipherKey->data + sizeof(keyInfo->keyInfoLen) in BuildKeyBlobUsageSpec()
128 aeadParam->payloadLen = keyInfo->keySize - HKS_AE_TAG_LEN; in BuildKeyBlobUsageSpec()
133 aeadParam->tagDec.data = cipherKey->data + keyInfo->keyInfoLen - HKS_AE_TAG_LEN; /* the last 16 bytes */ in BuildKeyBlobUsageSpec()
141 struct HksStoreKeyInfo *keyInfo in EncryptAndDecryptKeyBlob() local
272 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)key->data; GetRawKeyMaterial() local
340 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)keyOut->data; FillBaseInfo() local
394 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)keyOut->data; FillStoreKeyInfo() local
[all...]
H A Dhks_keyblob.c279 static int32_t InitKeyBlobInfo(const struct HksBlob *key, struct HksBlob *keyInfo) in InitKeyBlobInfo() argument
281 keyInfo->size = key->size + sizeof(struct HksKeyBlobInfo); in InitKeyBlobInfo()
282 keyInfo->data = (uint8_t *)HksMalloc(keyInfo->size); in InitKeyBlobInfo()
283 HKS_IF_NULL_LOGE_RETURN(keyInfo->data, HKS_ERROR_MALLOC_FAIL, "malloc failed") in InitKeyBlobInfo()
287 struct HksKeyBlobInfo *keyBlobInfo = (struct HksKeyBlobInfo *)keyInfo->data; in InitKeyBlobInfo()
298 (void)memcpy_s(keyInfo->data + sizeof(*keyBlobInfo), keyInfo->size - sizeof(*keyBlobInfo), in InitKeyBlobInfo()
303 HKS_FREE(keyInfo->data); in InitKeyBlobInfo()
308 static int32_t AddCoreServiceParams(const struct HksBlob *keyInfo, enu argument
[all...]
/base/security/huks/services/huks_standard/huks_service/main/hks_storage/include/
H A Dhks_storage_adapter.h27 bool HksIsKeyInfoLenInvalid(struct HksStoreKeyInfo *keyInfo);
/base/security/huks/services/huks_standard/huks_engine/main/core/include/
H A Dhks_core_service_key_other.h42 int32_t HksCoreUpgradeKeyInfo(const struct HksBlob *keyAlias, const struct HksBlob *keyInfo, struct HksBlob *keyOut);
/base/security/access_token/services/el5filekeymanager/src/
H A Del5_filekey_manager_stub.cpp145 for (std::pair<int32_t, std::string> &keyInfo : keyInfos) { in MarshallingKeyInfos()
146 reply.WriteInt32(keyInfo.first); in MarshallingKeyInfos()
147 reply.WriteString(keyInfo.second); in MarshallingKeyInfos()
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v1_protocol/
H A Dpake_v1_protocol_common.c197 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_SPEKE_BASE_INFO, HcStrlen(HICHAIN_SPEKE_BASE_INFO) }; in GeneratePakeParams() local
199 res = params->loader->computeHkdf(&keyParams, &(params->salt), &keyInfo, &secret); in GeneratePakeParams()
232 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_SPEKE_SESSIONKEY_INFO, HcStrlen(HICHAIN_SPEKE_SESSIONKEY_INFO) }; in DeriveKeyFromSharedSecret() local
246 res = params->loader->computeHkdf(&keyParams, &(params->salt), &keyInfo, &unionKey); in DeriveKeyFromSharedSecret()
/base/security/huks/test/unittest/huks_standard_test/module_test/service_test/huks_service/core/src/
H A Dhks_client_check_test.cpp126 struct HksKeyInfo keyInfo; in HWTEST_F() local
129 int32_t ret = HksCheckGetKeyInfoListParams(&processName, &keyInfo, &cnt); in HWTEST_F()
158 struct HksKeyInfo keyInfo; in HWTEST_F() local
159 int32_t ret = HksCheckGetKeyInfoListParams(&processName, &keyInfo, nullptr); in HWTEST_F()
/base/security/huks/services/huks_standard/huks_service/main/core/include/
H A Dhuks_access.h64 int32_t HuksAccessUpgradeKeyInfo(const struct HksBlob *keyAlias, const struct HksBlob *keyInfo,
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/
H A Dpake_task_common.c67 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_RETURN_KEY, HcStrlen(HICHAIN_RETURN_KEY) }; in GenerateOutputKey() local
74 &keyInfo, &(params->returnKey)); in GenerateOutputKey()
/base/security/device_auth/services/protocol/src/pake_protocol/pake_v2_protocol/
H A Dpake_v2_protocol_common.c183 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_SPEKE_BASE_INFO, HcStrlen(HICHAIN_SPEKE_BASE_INFO) }; in GeneratePakeParams() local
185 res = params->loader->computeHkdf(&keyParams, &(params->salt), &keyInfo, &secret); in GeneratePakeParams()
568 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_SPEKE_SESSIONKEY_INFO, HcStrlen(HICHAIN_SPEKE_SESSIONKEY_INFO) }; in GenerateSessionKey() local
574 int res = params->loader->computeHkdf(&keyParams, &params->salt, &keyInfo, &params->sessionKey); in GenerateSessionKey()
/base/security/device_auth/deps_adapter/key_management_adapter/interfaces/
H A Dalg_defs.h91 typedef int32_t (*ComputeHkdfFunc)(const KeyParams *keyParams, const Uint8Buff *salt, const Uint8Buff *keyInfo,
/base/security/device_auth/services/identity_manager/src/
H A Didentity_p2p.c310 Uint8Buff keyInfo = { (uint8_t *)TMP_AUTH_KEY_FACTOR, HcStrlen(TMP_AUTH_KEY_FACTOR) }; in GetSharedSecretByUrl() local
312 ret = GetLoaderInstance()->computeHkdf(&keyAliasParams, &nonceBuff, &keyInfo, &pskBuff); in GetSharedSecretByUrl()
H A Didentity_group.c803 Uint8Buff keyInfo = { (uint8_t *)TMP_AUTH_KEY_FACTOR, HcStrlen(TMP_AUTH_KEY_FACTOR) }; in GetSharedSecretForP2pInPake() local
805 ret = GetLoaderInstance()->computeHkdf(&keyAliasParams, &nonceBuff, &keyInfo, &pskBuff); in GetSharedSecretForP2pInPake()
/base/security/device_auth/services/mk_agree/src/
H A Dkey_manager.c152 Uint8Buff keyInfo = { (uint8_t *)MK_DERIVE_INFO, HcStrlen(MK_DERIVE_INFO) }; in KeyDerivation() local
154 int32_t res = GetLoaderInstance()->computeHkdf(&keyAliasParams, salt, &keyInfo, returnKey); in KeyDerivation()
/base/security/device_auth/services/session_manager/src/session/v2/auth_sub_session/protocol_lib/
H A Ddl_speke_protocol.c258 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_SPEKE_BASE_INFO, HcStrlen(HICHAIN_SPEKE_BASE_INFO) }; in CalSecret() local
260 int32_t res = GetLoaderInstance()->computeHkdf(&keyParams, &(params->salt), &keyInfo, secret); in CalSecret()
655 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_SPEKE_SESSIONKEY_INFO, HcStrlen(HICHAIN_SPEKE_SESSIONKEY_INFO) }; in CalSessionKey() local
661 int32_t res = GetLoaderInstance()->computeHkdf(&keyParams, &impl->params.salt, &keyInfo, in CalSessionKey()
H A Dec_speke_protocol.c208 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_SPEKE_BASE_INFO, HcStrlen(HICHAIN_SPEKE_BASE_INFO) }; in CalSecret() local
210 int32_t res = GetLoaderInstance()->computeHkdf(&keyParams, &(params->salt), &keyInfo, secret); in CalSecret()
652 Uint8Buff keyInfo = { (uint8_t *)HICHAIN_SPEKE_SESSIONKEY_INFO, HcStrlen(HICHAIN_SPEKE_SESSIONKEY_INFO) }; in CalSessionKey() local
658 int32_t res = GetLoaderInstance()->computeHkdf(&keyParams, &impl->params.salt, &keyInfo, in CalSessionKey()
/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/
H A Dhuks_adapter.c620 const Uint8Buff *keyInfo, struct HksParamSet **paramSet) in ConstructHkdfParamSet()
624 if (keyInfo != NULL) { in ConstructHkdfParamSet()
625 keyInfoBlob.size = keyInfo->length; in ConstructHkdfParamSet()
626 keyInfoBlob.data = keyInfo->val; in ConstructHkdfParamSet()
667 static int32_t ComputeHkdf(const KeyParams *keyParams, const Uint8Buff *salt, const Uint8Buff *keyInfo, in ComputeHkdf() argument
679 res = ConstructHkdfParamSet(true, keyParams, salt, keyInfo, &deParamSet); in ComputeHkdf()
684 res = ConstructHkdfParamSet(false, keyParams, salt, keyInfo, &ceParamSet); in ComputeHkdf()
619 ConstructHkdfParamSet(bool isDeStorage, const KeyParams *keyParams, const Uint8Buff *salt, const Uint8Buff *keyInfo, struct HksParamSet **paramSet) ConstructHkdfParamSet() argument
/base/security/huks/test/unittest/huks_standard_test/module_test/interface_test/src/
H A Dhks_native_api_compatibility_test.cpp813 struct OH_Huks_KeyInfo keyInfo; in HWTEST_F() local
814 ASSERT_EQ(sizeof(keyInfo.alias) == sizeof(struct OH_Huks_Blob), true); in HWTEST_F()
815 ASSERT_EQ(sizeof(keyInfo.paramSet) == sizeof(struct OH_Huks_ParamSet *), true); in HWTEST_F()
/base/security/huks/interfaces/inner_api/huks_standard/main/include/
H A Dhuks_hdi.h457 * @param keyInfo key info
461 int32_t (*HuksHdiUpgradeKeyInfo)(const struct HksBlob *keyAlias, const struct HksBlob *keyInfo,
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/
H A Dpake_v1_protocol_task_common.c315 Uint8Buff keyInfo = { (uint8_t *)TMP_AUTH_KEY_FACTOR, HcStrlen(TMP_AUTH_KEY_FACTOR) }; in FillPskWithDerivedKeyHex() local
318 res = params->baseParams.loader->computeHkdf(&keyParams, &(params->nonce), &keyInfo, &pskByte); in FillPskWithDerivedKeyHex()
/base/notification/distributed_notification_service/frameworks/js/napi/src/reminder/
H A Dpublish.cpp536 napi_value keyInfo = nullptr; in ParseArray() local
537 napi_create_string_utf8(env, temp[INDEX_KEY].c_str(), NAPI_AUTO_LENGTH, &keyInfo); in ParseArray()
581 // write keyInfo and valueInfo in ParseArray()
582 napi_set_property(env, jsObject, keyInfo, valueInfo); in ParseArray()
/base/security/device_auth/frameworks/deviceauth_lite/test/unittest/
H A Dhuks_adapter_test.cpp909 char keyInfo; in HWTEST_F() local
916 int32_t result = compute_hkdf(&shared_secret, &salt, &keyInfo, hkdfLen, &out_hkdf); in HWTEST_F()
/base/security/huks/frameworks/huks_standard/main/common/src/
H A Dhks_base_check.c1073 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)key->data; in CheckAndGetKeySize() local
1074 uint32_t keyLen = keyInfo->keyLen; in CheckAndGetKeySize()

Completed in 42 milliseconds