/base/security/huks/services/huks_standard/huks_service/main/hks_storage/src/ |
H A D | hks_storage_adapter.c | 25 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 D | hks_storage_lite.c | 365 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 D | hks_keyblob_lite.c | 105 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 D | hks_keyblob.c | 279 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 D | hks_storage_adapter.h | 27 bool HksIsKeyInfoLenInvalid(struct HksStoreKeyInfo *keyInfo);
|
/base/security/huks/services/huks_standard/huks_engine/main/core/include/ |
H A D | hks_core_service_key_other.h | 42 int32_t HksCoreUpgradeKeyInfo(const struct HksBlob *keyAlias, const struct HksBlob *keyInfo, struct HksBlob *keyOut);
|
/base/security/access_token/services/el5filekeymanager/src/ |
H A D | el5_filekey_manager_stub.cpp | 145 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 D | pake_v1_protocol_common.c | 197 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 D | hks_client_check_test.cpp | 126 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 D | huks_access.h | 64 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 D | pake_task_common.c | 67 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 D | pake_v2_protocol_common.c | 183 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, ¶ms->salt, &keyInfo, ¶ms->sessionKey);
in GenerateSessionKey()
|
/base/security/device_auth/deps_adapter/key_management_adapter/interfaces/ |
H A D | alg_defs.h | 91 typedef int32_t (*ComputeHkdfFunc)(const KeyParams *keyParams, const Uint8Buff *salt, const Uint8Buff *keyInfo,
|
/base/security/device_auth/services/identity_manager/src/ |
H A D | identity_p2p.c | 310 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 D | identity_group.c | 803 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 D | key_manager.c | 152 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 D | dl_speke_protocol.c | 258 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 D | ec_speke_protocol.c | 208 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 D | huks_adapter.c | 620 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 D | hks_native_api_compatibility_test.cpp | 813 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 D | huks_hdi.h | 457 * @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 D | pake_v1_protocol_task_common.c | 315 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 D | publish.cpp | 536 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 D | huks_adapter_test.cpp | 909 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 D | hks_base_check.c | 1073 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)key->data;
in CheckAndGetKeySize() local 1074 uint32_t keyLen = keyInfo->keyLen;
in CheckAndGetKeySize()
|