Home
last modified time | relevance | path

Searched refs:pubKeyInfo (Results 1 – 10 of 10) sorted by relevance

/ohos5.0/base/security/huks/utils/crypto_adapter/
H A Dhks_client_service_adapter_lite.c316 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)keyBuffer; in X509PublicKeyToRsa() local
317 pubKeyInfo->keyAlg = HKS_ALG_RSA; in X509PublicKeyToRsa()
318 pubKeyInfo->keySize = rsaCtx->MBEDTLS_PRIVATE(len) * HKS_BITS_PER_BYTE; in X509PublicKeyToRsa()
319 pubKeyInfo->nOrXSize = nSize; in X509PublicKeyToRsa()
320 pubKeyInfo->eOrYSize = eSize; in X509PublicKeyToRsa()
321 pubKeyInfo->placeHolder = 0; in X509PublicKeyToRsa()
377 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)keyBuffer; in X509PublicKeyToEcc() local
378 pubKeyInfo->keyAlg = HKS_ALG_ECC; in X509PublicKeyToEcc()
380 pubKeyInfo->nOrXSize = xSize; in X509PublicKeyToEcc()
381 pubKeyInfo->eOrYSize = ySize; in X509PublicKeyToEcc()
[all …]
H A Dhks_client_service_adapter.c470 pubKeyInfo->keyAlg = HKS_ALG_RSA; in X509PublicKeyToRsa()
472 pubKeyInfo->nOrXSize = (uint32_t)nSize; in X509PublicKeyToRsa()
474 pubKeyInfo->placeHolder = 0; in X509PublicKeyToRsa()
522 pubKeyInfo->keyAlg = alg; in EcKeyToPublicKey()
523 pubKeyInfo->keySize = keyLen; in EcKeyToPublicKey()
524 pubKeyInfo->nOrXSize = xSize; in EcKeyToPublicKey()
525 pubKeyInfo->eOrYSize = ySize; in EcKeyToPublicKey()
526 pubKeyInfo->placeHolder = 0; in EcKeyToPublicKey()
578 pubKeyInfo->keySize = keyLen; in EvpPkeyToHksPubKeyInfo()
581 pubKeyInfo->placeHolder = 0; in EvpPkeyToHksPubKeyInfo()
[all …]
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/src/
H A Dhks_safe_cipher_key_test.cpp99 struct HksBlob pubKeyInfo = { pubKeyLen, pubKey }; variable
100 ret = HksExportPublicKeyForDe(&ed25519Alias, NULL, &pubKeyInfo);
106 ret = TestImportEd25519(newAliasOne, &pubKeyInfo);
110 ret = TestImportEd25519(newAliasTwo, &pubKeyInfo);
/ohos5.0/base/security/huks/test/unittest/huks_common_test/src/
H A Dhks_test_curve25519_func.cpp139 int32_t TestImportEd25519(struct HksBlob alias, struct HksBlob *pubKeyInfo) in TestImportEd25519() argument
179 ret = HksImportKeyForDe(&alias, paramSet, pubKeyInfo); in TestImportEd25519()
189 struct HksBlob pubKeyInfo = { pubKeyLen, pubKey }; in TestExportImportEd25519SignVerify() local
193 ret = HksExportPublicKeyForDe(&alias, NULL, &pubKeyInfo); in TestExportImportEd25519SignVerify()
203 ret = TestImportEd25519(newAlias, &pubKeyInfo); in TestExportImportEd25519SignVerify()
313 struct HksBlob pubKeyInfo = { g_pubKeyLen, g_pubKey }; in TestEd25519SignTeeVerifyLocal() local
318 ret = HksExportPublicKeyForDe(&ed25519Alias, NULL, &pubKeyInfo); in TestEd25519SignTeeVerifyLocal()
320 HKS_TEST_LOG_I("HksExportPublicKey puKey size is %u", pubKeyInfo.size); in TestEd25519SignTeeVerifyLocal()
330 ret = HksVerifyForDe(&pubKeyInfo, paramSetVerify, &msg, &signature); in TestEd25519SignTeeVerifyLocal()
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
H A Dopenssl_rsa_helper.c149 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)publicKey->data; in X509ToRsaPublicKey() local
150 pubKeyInfo->keyAlg = HKS_ALG_RSA; in X509ToRsaPublicKey()
151 pubKeyInfo->keySize = (uint32_t)RSA_size(rsa) * BIT_NUM_OF_UINT8; in X509ToRsaPublicKey()
152 pubKeyInfo->nOrXSize = nSize; in X509ToRsaPublicKey()
153 pubKeyInfo->eOrYSize = eSize; in X509ToRsaPublicKey()
H A Dopenssl_ecc_helper.c482 struct HksPubKeyInfo *pubKeyInfo = (struct HksPubKeyInfo *)keyBuffer; in EcKeyToPublicKey() local
483 pubKeyInfo->keyAlg = HKS_ALG_ECC; in EcKeyToPublicKey()
484 pubKeyInfo->keySize = keyLen; in EcKeyToPublicKey()
485 pubKeyInfo->nOrXSize = xSize; in EcKeyToPublicKey()
486 pubKeyInfo->eOrYSize = ySize; in EcKeyToPublicKey()
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/include/
H A Dhks_test_curve25519.h28 int32_t TestImportEd25519(struct HksBlob alias, struct HksBlob *pubKeyInfo);
/ohos5.0/base/security/huks/test/unittest/huks_lite_test/common/include/
H A Dhks_test_curve25519.h26 int32_t TestImportEd25519(struct HksBlob alias, struct HksBlob *pubKeyInfo);
/ohos5.0/base/security/huks/test/unittest/huks_common_test/include/
H A Dhks_test_curve25519_c.h38 int32_t TestImportEd25519(struct HksBlob alias, struct HksBlob *pubKeyInfo);
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/interface_test/src/
H A Dhks_native_api_compatibility_test.cpp829 struct OH_Huks_PubKeyInfo pubKeyInfo; variable
830 ASSERT_EQ(sizeof(pubKeyInfo.keyAlg) == sizeof(OH_Huks_KeyAlg), true);
831 ASSERT_EQ(sizeof(pubKeyInfo.keySize) == sizeof(uint32_t), true);
832 ASSERT_EQ(sizeof(pubKeyInfo.nOrXSize) == sizeof(uint32_t), true);
833 ASSERT_EQ(sizeof(pubKeyInfo.eOrYSize) == sizeof(uint32_t), true);
834 ASSERT_EQ(sizeof(pubKeyInfo.placeHolder) == sizeof(uint32_t), true);