Home
last modified time | relevance | path

Searched refs:keyOut (Results 1 – 25 of 51) sorted by relevance

123

/base/security/huks/services/huks_standard/huks_service/main/os_dependency/ca/
Dhks_ca_access.c35 const struct HksBlob *keyIn, struct HksBlob *keyOut) in HksAccessGenerateKey() argument
38 return HksTeeGenerateKey(keyBlob, paramSetIn, keyOut); in HksAccessGenerateKey()
71 const struct HksParamSet *paramSet, struct HksBlob *keyOut) in HksAccessImportKey() argument
74 return HksTeeImportKey(key, paramSet, keyOut); in HksAccessImportKey()
78 struct HksBlob *keyOut) in HksAccessExportPublicKey() argument
80 return HksTeeExportPublicKey(key, paramSet, keyOut); in HksAccessExportPublicKey()
Dhks_teec.h29 struct HksBlob *keyOut);
53 …eeImportKey(const struct HksBlob *key, const struct HksParamSet *paramSet, struct HksBlob *keyOut);
55 …rtPublicKey(const struct HksBlob *key, const struct HksParamSet *paramSet, struct HksBlob *keyOut);
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_ed25519tox25519.c292 static int32_t BnOperationOfPubKeyConversion(const struct HksBlob *keyIn, struct HksBlob *keyOut, in BnOperationOfPubKeyConversion() argument
326 if (memcpy_s(keyOut->data, keyOut->size, tmpKey, tmpSize) != EOK) { in BnOperationOfPubKeyConversion()
329 keyOut->size = tmpSize; in BnOperationOfPubKeyConversion()
337 int32_t ConvertPubkeyX25519FromED25519(const struct HksBlob *keyIn, struct HksBlob *keyOut) in ConvertPubkeyX25519FromED25519() argument
340 if (keyOut->size < tmpSize) { in ConvertPubkeyX25519FromED25519()
343 struct KeyMaterial25519 *keyMaterialOut = (struct KeyMaterial25519 *)keyOut->data; in ConvertPubkeyX25519FromED25519()
349 … struct HksBlob outPubKey = { CURVE25519_KEY_LEN, keyOut->data + sizeof(struct KeyMaterial25519) }; in ConvertPubkeyX25519FromED25519()
369 int32_t ConvertPrivX25519FromED25519(const struct HksBlob *keyIn, struct HksBlob *keyOut) in ConvertPrivX25519FromED25519() argument
373 if (keyIn->size < totalSize || keyOut->size < tmpSize) { in ConvertPrivX25519FromED25519()
374 HKS_LOG_E("Invalid keyInSize=%u or keyOutSize=%u", keyIn->size, keyOut->size); in ConvertPrivX25519FromED25519()
[all …]
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_mbedtls_ecc.c249 static int32_t GetEccPubKeyCheckParams(const struct HksBlob *keyIn, const struct HksBlob *keyOut) in GetEccPubKeyCheckParams() argument
261 if (keyOut->size < (sizeof(struct KeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize)) { in GetEccPubKeyCheckParams()
262 … HKS_LOG_E("Ecc public keyOut size too small! keyOut size = 0x%" LOG_PUBLIC "X", keyOut->size); in GetEccPubKeyCheckParams()
269 int32_t HksMbedtlsGetEccPubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut) in HksMbedtlsGetEccPubKey() argument
271 int32_t ret = GetEccPubKeyCheckParams(keyIn, keyOut); in HksMbedtlsGetEccPubKey()
277 if (memcpy_s(keyOut->data, keyOut->size, (void *)keyMaterial, outLen) != EOK) { in HksMbedtlsGetEccPubKey()
279 (void)memset_s(keyOut->data, keyOut->size, 0, keyOut->size); in HksMbedtlsGetEccPubKey()
282 ((struct KeyMaterialEcc *)(keyOut->data))->zSize = 0; in HksMbedtlsGetEccPubKey()
283 keyOut->size = outLen; in HksMbedtlsGetEccPubKey()
Dhks_crypto_ed25519.c55 struct HksBlob *keyOut) in SaveEd25519KeyMaterial() argument
84 keyOut->data = buffer; in SaveEd25519KeyMaterial()
85 keyOut->size = totalSize; in SaveEd25519KeyMaterial()
99 int32_t HksEd25519GenerateKey(const struct HksKeySpec *spec, struct HksBlob *keyOut) in HksEd25519GenerateKey() argument
116 ret = SaveEd25519KeyMaterial(&pubKeyBlob, &priKeyBlob, keyOut); in HksEd25519GenerateKey()
144 static int32_t GetEd25519PubKeyCheck(const struct HksBlob *key, const struct HksBlob *keyOut) in GetEd25519PubKeyCheck() argument
152 (keyOut->size < (sizeof(struct KeyMaterial25519) + km->pubKeySize))) { in GetEd25519PubKeyCheck()
153 … HKS_LOG_E("Ecc public keyOut size too small! keyOut size = 0x%" LOG_PUBLIC "X", keyOut->size); in GetEd25519PubKeyCheck()
Dhks_mbedtls_rsa.c416 static int32_t GetRsaPubKeyCheckParams(const struct HksBlob *keyIn, const struct HksBlob *keyOut) in GetRsaPubKeyCheckParams() argument
423 if (keyOut->size < (sizeof(struct HksPubKeyInfo) + keyMaterial->nSize + keyMaterial->eSize)) { in GetRsaPubKeyCheckParams()
424 … HKS_LOG_E("Rsa public keyOut size too small! keyOut size = 0x%" LOG_PUBLIC "X", keyOut->size); in GetRsaPubKeyCheckParams()
431 int32_t HksMbedtlsGetRsaPubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut) in HksMbedtlsGetRsaPubKey() argument
433 int32_t ret = GetRsaPubKeyCheckParams(keyIn, keyOut); in HksMbedtlsGetRsaPubKey()
439 if (memcpy_s(keyOut->data, keyOut->size, (void *)keyMaterial, outLen) != EOK) { in HksMbedtlsGetRsaPubKey()
441 (void)memset_s(keyOut->data, keyOut->size, 0, keyOut->size); in HksMbedtlsGetRsaPubKey()
444 ((struct KeyMaterialRsa *)(keyOut->data))->dSize = 0; in HksMbedtlsGetRsaPubKey()
445 keyOut->size = outLen; in HksMbedtlsGetRsaPubKey()
/base/security/huks/test/unittest/huks_standard_test/module_test/mock/idl/src/
Dhuks_access_mock.c48 const struct HksBlob *keyIn, struct HksBlob *keyOut)) in ENABLE_CFI() argument
50 return HksCoreGenerateKey(keyAlias, paramSetIn, keyIn, keyOut); in ENABLE_CFI()
54 const struct HksParamSet *paramSet, struct HksBlob *keyOut)) in ENABLE_CFI() argument
56 return HksCoreImportKey(keyAlias, key, paramSet, keyOut); in ENABLE_CFI()
60 … const struct HksBlob *wrappedKeyData, const struct HksParamSet *paramSet, struct HksBlob *keyOut)) in ENABLE_CFI() argument
62 return HksCoreImportWrappedKey(wrappingKeyAlias, key, wrappedKeyData, paramSet, keyOut); in ENABLE_CFI()
66 struct HksBlob *keyOut)) in ENABLE_CFI() argument
68 return HksCoreExportPublicKey(key, paramSet, keyOut); in ENABLE_CFI()
/base/security/huks/interfaces/inner_api/huks_standard/main/include/
Dhuks_hdi.h51 #define HDI_CONVERTER_FUNC_GENERATEKEY(keyAlias, paramSet, keyIn, keyOut, ret, func) \ argument
59 HDI_CONVERTER_PARAM_IN_BLOB(keyOut, keyOutCore) \
63 HDI_ADAPTER_PARAM(keyOut, &keyOutCore)); \
64 HDI_CONVERTER_PARAM_OUT_BLOB(keyOutCore, keyOut)
66 #define HDI_CONVERTER_FUNC_IMPORTKEY(keyAlias, key, paramSet, keyOut, ret, func) \ argument
74 HDI_CONVERTER_PARAM_IN_BLOB(keyOut, keyOutCore) \
78 HDI_ADAPTER_PARAM(keyOut, &keyOutCore)); \
79 HDI_CONVERTER_PARAM_OUT_BLOB(keyOutCore, keyOut)
81 #define HDI_CONVERTER_FUNC_IMPORTWRAPPEDKEY(wrappedKeyAlias, key, wrappedKeyData, paramSet, keyOut,… argument
91 HDI_CONVERTER_PARAM_IN_BLOB(keyOut, keyOutCore) \
[all …]
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_core_interfaces.c44 const struct HksBlob *keyIn, struct HksBlob *keyOut) in HuksHdiGenerateKey() argument
46 return HksCoreGenerateKey(keyAlias, paramSet, keyIn, keyOut); in HuksHdiGenerateKey()
50 const struct HksParamSet *paramSet, struct HksBlob *keyOut) in HuksHdiImportKey() argument
52 return HksCoreImportKey(keyAlias, key, paramSet, keyOut); in HuksHdiImportKey()
56 … const struct HksBlob *wrappedKeyData, const struct HksParamSet *paramSet, struct HksBlob *keyOut) in HuksHdiImportWrappedKey() argument
58 return HksCoreImportWrappedKey(keyAlias, key, wrappedKeyData, paramSet, keyOut); in HuksHdiImportWrappedKey()
61 …ortPublicKey(const struct HksBlob *key, const struct HksParamSet *paramSet, struct HksBlob *keyOut) in HuksHdiExportPublicKey() argument
63 return HksCoreExportPublicKey(key, paramSet, keyOut); in HuksHdiExportPublicKey()
Dhks_keyblob_lite.c338 static int32_t FillBaseInfo(const struct HksParamSet *paramSet, struct HksBlob *keyOut) in FillBaseInfo() argument
340 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)keyOut->data; in FillBaseInfo()
372 … if (memcpy_s(keyOut->data + sizeof(*keyInfo) + keyInfo->aliasSize, HKS_MAX_KEY_AUTH_ID_LEN, in FillBaseInfo()
387 const struct HksParamSet *paramSet, struct HksBlob *keyOut) in FillStoreKeyInfo() argument
394 struct HksStoreKeyInfo *keyInfo = (struct HksStoreKeyInfo *)keyOut->data; in FillStoreKeyInfo()
399 …if (memcpy_s(keyOut->data + sizeof(*keyInfo), HKS_MAX_KEY_ALIAS_LEN, keyAlias->data, keyAlias->siz… in FillStoreKeyInfo()
406 int32_t ret = FillBaseInfo(paramSet, keyOut); in FillStoreKeyInfo()
412 ret = EncryptKeyBlob(key, keyOut); in FillStoreKeyInfo()
415 keyOut->size = keyInfo->keyInfoLen; in FillStoreKeyInfo()
456 const struct HksParamSet *paramSet, struct HksBlob *keyOut) in HksBuildKeyBlob() argument
[all …]
/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/
Dhks_crypto_hal_dsa_key.cpp123 HksBlob keyOut = { .size = keyOutLen, .data = (uint8_t *)HksMalloc(keyOutLen) }; variable
124 ASSERT_NE(keyOut.data, nullptr);
126 ret = HksCryptoHalGetPubKey(&key, &keyOut);
134 HKS_FREE_BLOB(keyOut);
Dhks_crypto_hal_api_mbedtls.cpp349 HksBlob keyOut = { .size = sizeof(KeyMaterialRsa), .data = (uint8_t *)HksMalloc(keyOutLen) }; variable
350 ASSERT_NE(keyOut.data, nullptr);
353 ret = HksCryptoHalGetPubKey(&key, &keyOut);
357 ret = HksCryptoHalGetPubKey(&key, &keyOut);
359 HKS_FREE_BLOB(keyOut);
404 HksBlob keyOut = { .size = sizeof(KeyMaterialEcc), .data = (uint8_t *)HksMalloc(keyOutLen) }; variable
405 ASSERT_NE(keyOut.data, nullptr);
407 ret = HksCryptoHalGetPubKey(&key, &keyOut);
411 ret = HksCryptoHalGetPubKey(&key, &keyOut);
416 ret = HksCryptoHalGetPubKey(&key, &keyOut);
[all …]
Dhks_crypto_hal_ecc_key.cpp196 HksBlob keyOut = { .size = keyOutLen, .data = (uint8_t *)HksMalloc(keyOutLen) }; variable
197 ASSERT_NE(keyOut.data, nullptr);
199 ret = HksCryptoHalGetPubKey(&key, &keyOut);
202 HKS_FREE_BLOB(keyOut);
Dhks_crypto_hal_rsa_key.cpp242 HksBlob keyOut = { .size = keyOutLen, .data = (uint8_t *)HksMalloc(keyOutLen) }; variable
243 ASSERT_NE(keyOut.data, nullptr);
245 ret = HksCryptoHalGetPubKey(&key, &keyOut);
248 HKS_FREE_BLOB(keyOut);
/base/security/huks/services/huks_standard/huks_service/main/core/include/
Dhuks_access.h33 const struct HksBlob *keyIn, struct HksBlob *keyOut);
36 const struct HksParamSet *paramSet, struct HksBlob *keyOut);
39 … const struct HksBlob *wrappedKeyData, const struct HksParamSet *paramSet, struct HksBlob *keyOut);
42 struct HksBlob *keyOut);
65 struct HksBlob *keyOut);
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/passthrough/
Dhuks_hdi_access.c73 const struct HuksBlob* keyIn, struct HuksBlob* keyOut) in HdiProxyGenerateKey() argument
80 …eturn g_hksHdiProxyInstance->GenerateKey(g_hksHdiProxyInstance, keyAlias, paramSet, keyIn, keyOut); in HdiProxyGenerateKey()
84 const struct HksBlob *keyIn, struct HksBlob *keyOut)) in ENABLE_CFI() argument
87 HDI_CONVERTER_FUNC_GENERATEKEY(keyAlias, paramSetIn, keyIn, keyOut, ret, HdiProxyGenerateKey) in ENABLE_CFI()
92 const struct HuksParamSet *paramSet, struct HuksBlob *keyOut) in HdiProxyImportKey() argument
98 return g_hksHdiProxyInstance->ImportKey(g_hksHdiProxyInstance, keyAlias, key, paramSet, keyOut); in HdiProxyImportKey()
102 const struct HksParamSet *paramSet, struct HksBlob *keyOut)) in ENABLE_CFI() argument
105 HDI_CONVERTER_FUNC_IMPORTKEY(keyAlias, key, paramSet, keyOut, ret, HdiProxyImportKey) in ENABLE_CFI()
110 …onst struct HuksBlob *wrappedKeyData, const struct HuksParamSet *paramSet, struct HuksBlob *keyOut) in HdiProxyImportWrappedKey() argument
117 paramSet, keyOut); in HdiProxyImportWrappedKey()
[all …]
Dhuks_access.c65 const struct HksBlob *keyIn, struct HksBlob *keyOut)) in ENABLE_CFI() argument
72 return g_hksHalDevicePtr->HuksHdiGenerateKey(keyAlias, paramSetIn, keyIn, keyOut); in ENABLE_CFI()
76 const struct HksParamSet *paramSet, struct HksBlob *keyOut)) in ENABLE_CFI() argument
83 return g_hksHalDevicePtr->HuksHdiImportKey(keyAlias, key, paramSet, keyOut); in ENABLE_CFI()
87 … const struct HksBlob *wrappedKeyData, const struct HksParamSet *paramSet, struct HksBlob *keyOut)) in ENABLE_CFI() argument
94 …_hksHalDevicePtr->HuksHdiImportWrappedKey(wrappingKeyAlias, key, wrappedKeyData, paramSet, keyOut); in ENABLE_CFI()
98 struct HksBlob *keyOut)) in ENABLE_CFI() argument
105 return g_hksHalDevicePtr->HuksHdiExportPublicKey(key, paramSet, keyOut); in ENABLE_CFI()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/include/
Dhks_openssl_ed25519tox25519.h42 int32_t ConvertPubkeyX25519FromED25519(const struct HksBlob *keyIn, struct HksBlob *keyOut);
44 int32_t ConvertPrivX25519FromED25519(const struct HksBlob *keyIn, struct HksBlob *keyOut);
/base/security/huks/frameworks/huks_standard/main/common/include/
Dhks_check_paramset.h29 const struct HksBlob *keyIn, const struct HksBlob *keyOut, uint32_t keyFlag);
32 const struct HksParamSet *paramSet, const struct HksBlob *keyOut);
35 const struct HksParamSet *paramSet, struct HksBlob *keyOut, uint32_t *outUnwrapSuite);
/base/security/huks/services/huks_standard/huks_engine/main/core/include/
Dhks_core_service.h32 const struct HksBlob *keyIn, struct HksBlob *keyOut);
49 const struct HksParamSet *paramSet, struct HksBlob *keyOut);
51 …rtPublicKey(const struct HksBlob *key, const struct HksParamSet *paramSet, struct HksBlob *keyOut);
63 …radeKeyInfo(const struct HksBlob *keyAlias, const struct HksBlob *keyInfo, struct HksBlob *keyOut);
75 … const struct HksBlob *wrappedKeyData, const struct HksParamSet *paramSet, struct HksBlob *keyOut);
Dhks_keyblob.h60 const struct HksParamSet *paramSet, struct HksBlob *keyOut);
63 …32_t HksBuildKeyBlobWithOutAddKeyParam(const struct HksParamSet *paramSet, struct HksBlob *keyOut);
/base/security/certificate_framework/test/fuzztest/v1.0/x509certificate_fuzzer/
Dx509certificate_fuzzer.cpp68 HcfPubKey *keyOut = nullptr; in TestVerify() local
69 CfResult res = x509CertObj->base.getPublicKey(&(x509CertObj->base), &keyOut); in TestVerify()
73 (void)x509CertObj->base.verify(&(x509CertObj->base), keyOut); in TestVerify()
74 CfObjDestroy(keyOut); in TestVerify()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_app_cert_process.c98 …tic int32_t SaveKeyMaterialEcc(const EC_KEY *eccKey, const uint32_t keySize, struct CmBlob *keyOut) in SaveKeyMaterialEcc() argument
129 keyOut->data = rawMaterial.data; in SaveKeyMaterialEcc()
130 keyOut->size = rawMaterial.size; in SaveKeyMaterialEcc()
134 static int32_t SaveKeyMaterialRsa(const RSA *rsa, const uint32_t keySize, struct CmBlob *keyOut) in SaveKeyMaterialRsa() argument
172 keyOut->data = rawMaterial; in SaveKeyMaterialRsa()
173keyOut->size = sizeof(struct HksKeyMaterialRsa) + keyMaterial->nSize + keyMaterial->eSize + keyMat… in SaveKeyMaterialRsa()
186 …ic int32_t SaveKeyMaterialCurve25519(uint32_t algType, const EVP_PKEY *pKey, struct CmBlob *keyOut) in SaveKeyMaterialCurve25519() argument
223 keyOut->data = buffer; in SaveKeyMaterialCurve25519()
224 keyOut->size = totalSize; in SaveKeyMaterialCurve25519()
/base/security/huks/frameworks/huks_standard/main/common/src/
Dhks_crypto_adapter.c283 …nt32_t SetCurve25519KeyMaterial(bool isPubKey, const struct HksBlob *keyIn, struct HksBlob *keyOut) in SetCurve25519KeyMaterial() argument
298keyOut->size = sizeof(struct KeyMaterial25519) + curve25519Km.pubKeySize + curve25519Km.priKeySize; in SetCurve25519KeyMaterial()
299 keyOut->data = (uint8_t *)HksMalloc(keyOut->size); in SetCurve25519KeyMaterial()
300 HKS_IF_NULL_RETURN(keyOut->data, HKS_ERROR_MALLOC_FAIL) in SetCurve25519KeyMaterial() local
302 (void)memcpy_s(keyOut->data, keyOut->size, &curve25519Km, sizeof(struct KeyMaterial25519)); in SetCurve25519KeyMaterial()
304 (void)memcpy_s(keyOut->data + offset, keyOut->size - offset, keyIn->data, keyIn->size); in SetCurve25519KeyMaterial()
368 struct HksBlob *keyOut) in GetCurve25519FromKeyMaterial() argument
388 keyOut->data = buffer; in GetCurve25519FromKeyMaterial()
389 keyOut->size = size; in GetCurve25519FromKeyMaterial()
/base/security/certificate_framework/interfaces/innerkits/certificate/
Dcertificate.h36 CfResult (*getPublicKey)(HcfCertificate *self, HcfPubKey **keyOut);

123