Home
last modified time | relevance | path

Searched refs:HksPubKeyInfo (Results 1 – 14 of 14) sorted by relevance

/ohos5.0/base/security/huks/utils/crypto_adapter/
H A Dhks_client_service_adapter_lite.c243 if (publicKey->size < sizeof(struct HksPubKeyInfo)) { in TranslateToX509PublicKey()
248 struct HksPubKeyInfo *publicKeyInfo = (struct HksPubKeyInfo *)publicKey->data; in TranslateToX509PublicKey()
249 uint32_t offset = sizeof(struct HksPubKeyInfo); in TranslateToX509PublicKey()
311 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + nSize + eSize; in X509PublicKeyToRsa()
316 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)keyBuffer; in X509PublicKeyToRsa()
323 …tls_mpi_write_binary(&rsaCtx->MBEDTLS_PRIVATE(N), keyBuffer + sizeof(struct HksPubKeyInfo), nSize); in X509PublicKeyToRsa()
331 keyBuffer + sizeof(struct HksPubKeyInfo) + nSize, eSize); in X509PublicKeyToRsa()
366 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + xSize + ySize; in X509PublicKeyToEcc()
377 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)keyBuffer; in X509PublicKeyToEcc()
385 keyBuffer + sizeof(struct HksPubKeyInfo), xSize); in X509PublicKeyToEcc()
[all …]
H A Dhks_client_service_adapter.c425 if (publicKey->size < sizeof(struct HksPubKeyInfo)) { in TranslateToX509PublicKey()
430 struct HksPubKeyInfo *publicKeyInfo = (struct HksPubKeyInfo *)publicKey->data; in TranslateToX509PublicKey()
431 uint32_t offset = sizeof(struct HksPubKeyInfo); in TranslateToX509PublicKey()
465 uint32_t totalSize = (uint32_t)nSize + (uint32_t)eSize + sizeof(struct HksPubKeyInfo); in X509PublicKeyToRsa()
469 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)keyBuffer; in X509PublicKeyToRsa()
475 if (BN_bn2bin(RSA_get0_n(rsa), keyBuffer + sizeof(struct HksPubKeyInfo)) == 0 || in X509PublicKeyToRsa()
517 uint32_t totalSize = xSize + ySize + sizeof(struct HksPubKeyInfo); in EcKeyToPublicKey()
521 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)keyBuffer; in EcKeyToPublicKey()
527 if (BN_bn2binpad(x, keyBuffer + sizeof(struct HksPubKeyInfo), xSize) == 0 || in EcKeyToPublicKey()
576 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)rawInfo; in EvpPkeyToHksPubKeyInfo()
[all …]
H A Dhks_client_service_adapter_common.c59 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + key->size; in TranslateToInnerCurve25519Format()
64 struct HksPubKeyInfo *curve25519Key = (struct HksPubKeyInfo *)buffer; in TranslateToInnerCurve25519Format()
69 uint32_t offset = sizeof(struct HksPubKeyInfo); in TranslateToInnerCurve25519Format()
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/utils_test/src/
H A Dhks_attest_utils_test.cpp101 struct HksPubKeyInfo info = { HKS_ALG_RSA, 0, 0, 0, 0};
119 struct HksPubKeyInfo info = { HKS_ALG_AES, 0, 0, 0, 0};
135 struct HksPubKeyInfo info = { HKS_ALG_X25519, 0, 0, 0, 0};
151 struct HksPubKeyInfo info = { HKS_ALG_RSA, 0, 0, 0, 0};
167 struct HksPubKeyInfo info = { HKS_ALG_ECC, 0, 0, 0, 0};
184 …struct HksPubKeyInfo info = { HKS_ALG_ECC, HKS_ECC_KEY_SIZE_384, HKS_ECC_KEY_SIZE_521, HKS_ECC_KEY…
201 …struct HksPubKeyInfo info = { HKS_ALG_ECC, HKS_ECC_KEY_SIZE_521, HKS_ECC_KEY_SIZE_521, HKS_ECC_KE…
/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/device_cert_manager/src/
H A Ddcm_attest_utils.c88 static int32_t GetEcPublicKey(struct HksBlob *key, const struct HksPubKeyInfo *info) in GetEcPublicKey()
133 static int32_t ConstructKeySeq(struct HksBlob *out, const struct HksPubKeyInfo *info) in ConstructKeySeq()
166 static int32_t GetRsaPublicKey(struct HksBlob *key, const struct HksPubKeyInfo *info, in GetRsaPublicKey()
198 static int32_t GetX25519PublicKey(struct HksBlob *key, const struct HksPubKeyInfo *info) in GetX25519PublicKey()
223 static int32_t GetSm2PublicKey(struct HksBlob *key, const struct HksPubKeyInfo *info) in GetSm2PublicKey()
232 int32_t DcmGetPublicKey(struct HksBlob *key, const struct HksPubKeyInfo *info, const struct HksUsag… in DcmGetPublicKey()
H A Ddcm_attest.c764 … ret = DcmGetPublicKey(&spkiBlob, (struct HksPubKeyInfo *)pubKeyBlob.data, &attestSpec->usageSpec); in CreateTbs()
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
H A Dopenssl_ecc_helper.c476 uint32_t totalSize = xSize + ySize + sizeof(struct HksPubKeyInfo); in EcKeyToPublicKey()
482 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)keyBuffer; in EcKeyToPublicKey()
487 if (BN_bn2binpad(x, keyBuffer + sizeof(struct HksPubKeyInfo), xSize) == 0 || in EcKeyToPublicKey()
488 BN_bn2binpad(y, keyBuffer + sizeof(struct HksPubKeyInfo) + xSize, ySize) == 0) { in EcKeyToPublicKey()
H A Dopenssl_rsa_helper.c149 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)publicKey->data; in X509ToRsaPublicKey()
154 if ((BN_bn2bin(RSA_get0_n(rsa), publicKey->data + sizeof(struct HksPubKeyInfo)) == 0) || in X509ToRsaPublicKey()
155 (BN_bn2bin(RSA_get0_e(rsa), publicKey->data + sizeof(struct HksPubKeyInfo) + nSize) == 0)) { in X509ToRsaPublicKey()
/ohos5.0/base/security/huks/interfaces/inner_api/huks_standard/main/include/
H A Dhks_type.h141 struct HksPubKeyInfo { struct
292 #define HKS_MAX_KEY_MATERIAL_LEN (sizeof(struct HksPubKeyInfo) + HKS_MAX_KEY_LEN + HKS_AE_TAG_LEN)
/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/device_cert_manager/include/
H A Ddcm_attest_utils.h70 int32_t DcmGetPublicKey(struct HksBlob *key, const struct HksPubKeyInfo *info, const struct HksUsag…
/ohos5.0/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
H A Dhks_mbedtls_rsa.c423 if (keyOut->size < (sizeof(struct HksPubKeyInfo) + keyMaterial->nSize + keyMaterial->eSize)) { in GetRsaPubKeyCheckParams()
438 const uint32_t outLen = sizeof(struct HksPubKeyInfo) + keyMaterial->nSize + keyMaterial->eSize; in HksMbedtlsGetRsaPubKey()
/ohos5.0/base/security/huks/frameworks/huks_standard/main/common/src/
H A Dhks_check_paramset.c394 if (key->size < sizeof(struct HksPubKeyInfo)) { in CheckImportKeySize()
398 struct HksPubKeyInfo *keyMaterial = (struct HksPubKeyInfo *)(key->data); in CheckImportKeySize()
/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/core/src/
H A Dhks_client_service.c756 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + key->size; in TranslateToInnerCurve25519Format()
762 struct HksPubKeyInfo *curve25519Key = (struct HksPubKeyInfo *)buffer; in TranslateToInnerCurve25519Format()
767 uint32_t offset = sizeof(struct HksPubKeyInfo); in TranslateToInnerCurve25519Format()
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/interface_test/src/
H A Dhks_native_api_compatibility_test.cpp828 ASSERT_EQ(sizeof(struct OH_Huks_PubKeyInfo) == sizeof(struct HksPubKeyInfo), true);
835 struct HksPubKeyInfo hksPubKeyInfo;