Home
last modified time | relevance | path

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

/base/security/huks/frameworks/huks_standard/main/common/src/
Dhks_crypto_adapter.c265 …tic int32_t FormatKeyInner(uint32_t publicKeySize, uint8_t *publicKey, const struct HksBlob *keyIn, in FormatKeyInner() argument
275 .blob = { keyIn->size, keyIn->data }, in FormatKeyInner()
283 static int32_t SetCurve25519KeyMaterial(bool isPubKey, const struct HksBlob *keyIn, struct HksBlob … in SetCurve25519KeyMaterial() argument
291 curve25519Km.pubKeySize = keyIn->size; in SetCurve25519KeyMaterial()
295 curve25519Km.priKeySize = keyIn->size; in SetCurve25519KeyMaterial()
304 (void)memcpy_s(keyOut->data + offset, keyOut->size - offset, keyIn->data, keyIn->size); in SetCurve25519KeyMaterial()
309 static int32_t CheckCurve25519KeySize(const struct HksBlob *keyIn) in CheckCurve25519KeySize() argument
311 if (keyIn->size < sizeof(struct KeyMaterial25519)) { in CheckCurve25519KeySize()
316 struct KeyMaterial25519 *keyMaterial = (struct KeyMaterial25519 *)keyIn->data; in CheckCurve25519KeySize()
319 …if (keyIn->size < (sizeof(struct KeyMaterial25519) + keyMaterial->pubKeySize + keyMaterial->priKey… in CheckCurve25519KeySize()
[all …]
Dhks_check_paramset.c453 const struct HksBlob *keyIn, const struct HksBlob *keyOut, uint32_t keyFlag) in HksCoreCheckGenKeyParams() argument
456 (void)keyIn; in HksCoreCheckGenKeyParams()
/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/crypto_engine/openssl/src/
Dhks_openssl_ed25519tox25519.c292 static int32_t BnOperationOfPubKeyConversion(const struct HksBlob *keyIn, struct HksBlob *keyOut, in BnOperationOfPubKeyConversion() argument
297 int32_t ret = Curve25519Initialize(&curve25519, keyIn->data, keyIn->size, true); in BnOperationOfPubKeyConversion()
301 … HKS_IF_NOT_SUCC_BREAK(CheckEd25519Pubkey(&curve25519, var, keyIn->data[keyIn->size - 1], ctx)) in BnOperationOfPubKeyConversion()
337 int32_t ConvertPubkeyX25519FromED25519(const struct HksBlob *keyIn, struct HksBlob *keyOut) in ConvertPubkeyX25519FromED25519() argument
361 ret = BnOperationOfPubKeyConversion(keyIn, &outPubKey, &var, numberOne, ctx); 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()
385 uint8_t *input = keyIn->data + tmpSize; in ConvertPrivX25519FromED25519()
Dhks_openssl_engine.c191 int32_t HksCryptoHalGetPubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut) in HksCryptoHalGetPubKey() argument
193 if (CheckBlob(keyIn) != HKS_SUCCESS || CheckBlob(keyOut) != HKS_SUCCESS) { in HksCryptoHalGetPubKey()
199 if (keyIn->size < sizeof(struct KeyMaterialRsa)) { in HksCryptoHalGetPubKey()
204 struct KeyMaterialRsa *key = (struct KeyMaterialRsa *)(keyIn->data); in HksCryptoHalGetPubKey()
208 return func(keyIn, keyOut); in HksCryptoHalGetPubKey()
/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
251 int32_t ret = EccKeyCheck(keyIn); in GetEccPubKeyCheckParams()
255 const struct KeyMaterialEcc *keyMaterial = (struct KeyMaterialEcc *)(keyIn->data); 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()
275 const struct KeyMaterialEcc *keyMaterial = (struct KeyMaterialEcc *)(keyIn->data); in HksMbedtlsGetEccPubKey()
Dhks_mbedtls_engine.c178 int32_t HksCryptoHalGetPubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut) in HksCryptoHalGetPubKey() argument
180 if (CheckBlob(keyIn) != HKS_SUCCESS || CheckBlob(keyOut) != HKS_SUCCESS) { in HksCryptoHalGetPubKey()
186 if (keyIn->size < sizeof(struct KeyMaterialRsa)) { in HksCryptoHalGetPubKey()
187 … HKS_LOG_E("Crypt Hal getPubKey keyIn size is more smaller. size[%" LOG_PUBLIC "d]", keyIn->size); in HksCryptoHalGetPubKey()
191 struct KeyMaterialRsa *key = (struct KeyMaterialRsa *)(keyIn->data); in HksCryptoHalGetPubKey()
194 return func(keyIn, keyOut); in HksCryptoHalGetPubKey()
Dhks_mbedtls_rsa.c416 static int32_t GetRsaPubKeyCheckParams(const struct HksBlob *keyIn, const struct HksBlob *keyOut) in GetRsaPubKeyCheckParams() argument
418 int32_t ret = RsaKeyCheck(keyIn); in GetRsaPubKeyCheckParams()
422 const struct KeyMaterialRsa *keyMaterial = (struct KeyMaterialRsa *)(keyIn->data); 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()
437 const struct KeyMaterialRsa *keyMaterial = (struct KeyMaterialRsa *)(keyIn->data); in HksMbedtlsGetRsaPubKey()
Dhks_mbedtls_x25519.c370 static int32_t GetX25519PubKeyCheckParams(const struct HksBlob *keyIn, const struct HksBlob *keyOut) in GetX25519PubKeyCheckParams() argument
372 const struct KeyMaterial25519 *keyMaterial = (struct KeyMaterial25519 *)(keyIn->data); in GetX25519PubKeyCheckParams()
376 ret = X25519CheckKeySize(keyIn, keyMaterial, false); in GetX25519PubKeyCheckParams()
388 int32_t HksMbedtlsGetX25519PubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut) in HksMbedtlsGetX25519PubKey() argument
390 int32_t ret = GetX25519PubKeyCheckParams(keyIn, keyOut); in HksMbedtlsGetX25519PubKey()
393 const struct KeyMaterial25519 *keyMaterial = (struct KeyMaterial25519 *)(keyIn->data); in HksMbedtlsGetX25519PubKey()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/include/
Dhks_mbedtls_x25519.h42 int32_t HksMbedtlsGetX25519PubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut);
Dhks_mbedtls_ecc.h52 int32_t HksMbedtlsGetEccPubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut);
Dhks_mbedtls_rsa.h53 int32_t HksMbedtlsGetRsaPubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut);
/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
37 (void)keyIn; in HksAccessGenerateKey()
Dhks_teec.c319 const struct HksBlob *keyIn = &keyInBlob; in HksTeeGenerateKey() local
325 InitializeBlob(&params[2].blob, keyIn->size, keyIn->data); /* 2 is array index */ in HksTeeGenerateKey()
/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()
/base/security/huks/frameworks/huks_standard/main/common/include/
Dhks_check_paramset.h29 const struct HksBlob *keyIn, const struct HksBlob *keyOut, uint32_t keyFlag);
Dhks_crypto_hal.h180 int32_t HksCryptoHalGetPubKey(const struct HksBlob *keyIn, struct HksBlob *keyOut);
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_core_service.c156 …int32_t GetAgreeBaseKey(const bool isPubKey, const bool isPlainPubKey, const struct HksBlob *keyIn, in GetAgreeBaseKey() argument
159 struct Hks25519KeyPair *keyPair = (struct Hks25519KeyPair *)(keyIn->data); in GetAgreeBaseKey()
164 uint8_t *tmp = isPubKey ? (keyIn->data + sizeof(*keyPair)) : in GetAgreeBaseKey()
165 (keyIn->data + sizeof(*keyPair) + keyPair->publicBufferSize); in GetAgreeBaseKey()
201 static int32_t GetAgreePriKey(const struct HksBlob *keyIn, struct HksBlob *keyOut) in GetAgreePriKey() argument
203 return GetAgreeBaseKey(false, false, keyIn, keyOut); in GetAgreePriKey()
206 static int32_t GetAgreePubKey(const struct HksBlob *keyIn, const struct HksParamSet *paramSet, stru… in GetAgreePubKey() argument
211 return GetAgreeBaseKey(true, true, keyIn, keyOut); in GetAgreePubKey()
214 return GetAgreeBaseKey(true, false, keyIn, keyOut); in GetAgreePubKey()
246 static int32_t GenKeyByAgree(const struct HksBlob *keyIn, const struct HksParamSet *paramSet, in GenKeyByAgree() argument
[all …]
Dhks_core_interfaces.c44 const struct HksBlob *keyIn, struct HksBlob *keyOut) in HuksHdiGenerateKey() argument
46 return HksCoreGenerateKey(keyAlias, paramSet, keyIn, keyOut); in HuksHdiGenerateKey()
/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 …return 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()
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()
/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
58 HDI_CONVERTER_PARAM_IN_BLOB(keyIn, keyInCore) \
62 HDI_ADAPTER_PARAM(keyIn, &keyInCore), \
347 const struct HksBlob *keyIn, struct HksBlob *keyOut);
/base/security/huks/services/huks_standard/huks_service/main/core/include/
Dhuks_access.h33 const struct HksBlob *keyIn, struct HksBlob *keyOut);
/base/security/huks/services/huks_standard/huks_engine/main/core/include/
Dhks_core_service.h32 const struct HksBlob *keyIn, struct HksBlob *keyOut);
/base/security/huks/services/huks_standard/huks_service/main/core/src/
Dhks_client_service.c743 struct HksBlob keyIn = { 0, NULL }; in HksServiceGenerateKey() local
760 ret = GetKeyIn(processInfo, newParamSet, &keyIn); in HksServiceGenerateKey()
763 ret = HuksAccessGenerateKey(keyAlias, newParamSet, &keyIn, &output); in HksServiceGenerateKey()
771 if (keyIn.data != NULL) { in HksServiceGenerateKey()
772 (void)memset_s(keyIn.data, keyIn.size, 0, keyIn.size); in HksServiceGenerateKey()
774 HKS_FREE_PTR(keyIn.data); in HksServiceGenerateKey()