/base/security/crypto_framework/frameworks/key/ |
D | asy_key_generator.c | 117 if ((paramsSpec->pk.data == NULL) || (paramsSpec->pk.len == 0)) { in IsDsaPubKeySpecValid() 129 if ((paramsSpec->pk.data == NULL) || (paramsSpec->pk.len == 0)) { in IsDsaKeyPairSpecValid() 212 if ((paramsSpec->pk.x.data == NULL) || (paramsSpec->pk.x.len == 0) || in IsEccPubKeySpecValid() 213 (paramsSpec->pk.y.data == NULL) || (paramsSpec->pk.y.len == 0)) { in IsEccPubKeySpecValid() 225 if ((paramsSpec->pk.x.data == NULL) || (paramsSpec->pk.x.len == 0) || in IsEccKeyPairSpecValid() 226 (paramsSpec->pk.y.data == NULL) || (paramsSpec->pk.y.len == 0)) { in IsEccKeyPairSpecValid() 274 if ((paramsSpec->pk.data == NULL) || (paramsSpec->pk.len == 0)) { in IsRsaPubKeySpecValid() 286 if ((paramsSpec->pk.data == NULL) || (paramsSpec->pk.len == 0)) { in IsRsaKeyPairSpecValid() 480 spec->pk.data = (unsigned char *)HcfMalloc(srcSpec->pk.len, 0); in CreateDsaPubKeySpecImpl() 481 if (spec->pk.data == NULL) { in CreateDsaPubKeySpecImpl() [all …]
|
/base/security/huks/frameworks/crypto_lite/cipher/src/ |
D | cipher_rsa.c | 127 static int32_t RsaLoadPrivateKey(mbedtls_pk_context *pk, const unsigned char *key, size_t keyLen) in RsaLoadPrivateKey() argument 143 ret = mbedtls_pk_parse_key(pk, (const unsigned char *)finalKey, finalKeyLen, NULL, 0, in RsaLoadPrivateKey() 150 rsa = mbedtls_pk_rsa(*pk); in RsaLoadPrivateKey() 175 static int32_t RsaLoadPublicKey(mbedtls_pk_context *pk, const unsigned char *key, size_t keyLen) in RsaLoadPublicKey() argument 187 ret = mbedtls_pk_parse_public_key(pk, (const unsigned char *)finalKey, finalKeyLen); in RsaLoadPublicKey() 193 rsa = mbedtls_pk_rsa(*pk); in RsaLoadPublicKey() 326 mbedtls_pk_context pk; in RsaEncrypt() local 327 mbedtls_pk_init(&pk); in RsaEncrypt() 328 if (RsaLoadPublicKey(&pk, (const unsigned char *)key->key, key->keyLen) != 0) { in RsaEncrypt() 329 mbedtls_pk_free(&pk); in RsaEncrypt() [all …]
|
/base/security/crypto_framework/test/unittest/src/ |
D | crypto_dsa_asy_key_generator_by_spec_test.cpp | 254 .pk = pk_BN 263 .pk = pk_BN, 395 HcfPubKey *pk = nullptr; variable 396 ret = generator->generatePubKey(generator, &pk); 399 ASSERT_NE(pk, nullptr); 401 HcfObjDestroy(pk); 412 HcfPubKey *pk = nullptr; variable 413 ret = generator->generatePubKey(generator, &pk); 416 ASSERT_NE(pk, nullptr); 418 HcfObjDestroy(pk); [all …]
|
D | crypto_asy_key_generator_cov_test.cpp | 314 .pk = g_dsaCorrectPkBn 323 .pk = g_dsaNullPkBn 332 .pk = g_dsaNoLenPkBn 342 .pk = g_dsaCorrectPkBn, 352 .pk = g_dsaCorrectPkBn, 362 .pk = g_dsaNullPkBn, 372 .pk = g_dsaNoLenPkBn, 382 .pk = g_dsaCorrectPkBn, 392 .pk = g_dsaCorrectPkBn, 487 returnPubSpec->pk.data = dataE; in GenerateRsa2048CorrectPubKeySpec() [all …]
|
D | crypto_ecc_key_agreement_by_spec_test.cpp | 92 eccKeyPairSpec->pk.x.data = (IS_BIG_ENDIAN ? g_ecc224CorrectBigPkX : g_ecc224CorrectLittlePkX); in ConstructEcc224KeyPairParamsSpec() 93 eccKeyPairSpec->pk.x.len = NID_secp224r1_len; in ConstructEcc224KeyPairParamsSpec() 94 eccKeyPairSpec->pk.y.data = (IS_BIG_ENDIAN ? g_ecc224CorrectBigPkY : g_ecc224CorrectLittlePkY); in ConstructEcc224KeyPairParamsSpec() 95 eccKeyPairSpec->pk.y.len = NID_secp224r1_len; in ConstructEcc224KeyPairParamsSpec() 126 eccKeyPairSpec->pk.x.data = (IS_BIG_ENDIAN ? g_ecc256CorrectBigPkX : g_ecc256CorrectLittlePkX); in ConstructEcc256KeyPairParamsSpec() 127 eccKeyPairSpec->pk.x.len = NID_X9_62_prime256v1_len; in ConstructEcc256KeyPairParamsSpec() 128 eccKeyPairSpec->pk.y.data = (IS_BIG_ENDIAN ? g_ecc256CorrectBigPkY : g_ecc256CorrectLittlePkY); in ConstructEcc256KeyPairParamsSpec() 129 eccKeyPairSpec->pk.y.len = NID_X9_62_prime256v1_len; in ConstructEcc256KeyPairParamsSpec() 160 eccKeyPairSpec->pk.x.data = (IS_BIG_ENDIAN ? g_ecc384CorrectBigPkX : g_ecc384CorrectLittlePkX); in ConstructEcc384KeyPairParamsSpec() 161 eccKeyPairSpec->pk.x.len = NID_secp384r1_len; in ConstructEcc384KeyPairParamsSpec() [all …]
|
D | crypto_signature_exception_test.cpp | 65 HcfPubKey pk; variable 66 HcfResult ret = EngineVerifyInit((HcfVerifySpi *)&g_obj, nullptr, &pk); 69 ret = EngineVerifyInit((HcfVerifySpi *)&g_obj, nullptr, &pk);
|
D | crypto_dsa_exception_test.cpp | 352 HcfPubKey *pk = nullptr; variable 353 ret = EngineGenerateDsaPubKeyBySpec((const HcfAsyKeyGeneratorSpi *)&g_obj, &asySpecPk, &pk); 409 HcfPubKey *pk = nullptr; variable 410 ret = IsVerifyInitInputValid((HcfVerifySpi *)&g_obj, pk);
|
D | crypto_dsa_asy_key_generator_test.cpp | 450 HcfBigInteger pk = { .data = nullptr, .len = 0 }; variable 451 …lt ret = dsa2048KeyPair_->pubKey->getAsyKeySpecBigInteger(dsa2048KeyPair_->pubKey, DSA_PK_BN, &pk); 454 ASSERT_NE(pk.data, nullptr); 455 ASSERT_NE(pk.len, 0); 456 HcfFree(pk.data); 919 HcfBigInteger pk = { .data = nullptr, .len = 0 }; variable 920 ret = convertKeyPair->pubKey->getAsyKeySpecBigInteger(convertKeyPair->pubKey, DSA_PK_BN, &pk); 925 ASSERT_NE(pk.data, nullptr); 926 ASSERT_NE(pk.len, 0); 927 HcfFree(pk.data);
|
/base/security/crypto_framework/common/src/ |
D | asy_key_params.c | 60 HcfFree(spec->pk.data); in DestroyDsaPubKeySpec() 61 spec->pk.data = NULL; in DestroyDsaPubKeySpec() 71 HcfFree(spec->pk.data); in DestroyDsaKeyPairSpec() 72 spec->pk.data = NULL; in DestroyDsaKeyPairSpec() 127 FreeEcPointMem(&(spec->pk)); in DestroyEccPubKeySpec() 149 FreeEcPointMem(&(spec->pk)); in DestroyEccKeyPairSpec() 179 HcfFree(spec->pk.data); in DestroyRsaPubKeySpec() 180 spec->pk.data = NULL; in DestroyRsaPubKeySpec() 190 HcfFree(spec->pk.data); in DestroyRsaKeyPairSpec() 191 spec->pk.data = NULL; in DestroyRsaKeyPairSpec()
|
/base/security/appverify/interfaces/innerkits/appverify_lite/src/ |
D | app_verify.c | 550 static unsigned char *GetRsaPk(const mbedtls_pk_context *pk, int32_t *len) in GetRsaPk() argument 564 int32_t pkLen = mbedtls_pk_write_pubkey(&c, buf, pk); in GetRsaPk() 593 static unsigned char *GetEcPk(const mbedtls_pk_context *pk, int32_t *len) in GetEcPk() argument 595 mbedtls_ecp_keypair *ecCtx = mbedtls_pk_ec(*pk); in GetEcPk() 643 static unsigned char *GetPkBuf(const mbedtls_pk_context *pk, int32_t *len) in GetPkBuf() argument 646 …if (mbedtls_pk_get_type(pk) == MBEDTLS_PK_RSA || mbedtls_pk_get_type(pk) == MBEDTLS_PK_RSASSA_PSS)… in GetPkBuf() 647 bufA = GetRsaPk(pk, len); in GetPkBuf() 648 …} else if (mbedtls_pk_get_type(pk) == MBEDTLS_PK_ECDSA || mbedtls_pk_get_type(pk) == MBEDTLS_PK_EC… in GetPkBuf() 649 bufA = GetEcPk(pk, len); in GetPkBuf() 654 static int32_t ParseCertGetPk(const char *certEncoded, AppSignPk *pk) in ParseCertGetPk() argument [all …]
|
D | mbedtls_pkcs7.c | 851 static int32_t GetSignerPubKeyOfSignature(const SignerInfo *signer, mbedtls_pk_context **pk) in GetSignerPubKeyOfSignature() argument 854 if (signer == NULL || pk == NULL) { in GetSignerPubKeyOfSignature() 858 *pk = &signer->certPath.crt->pk; in GetSignerPubKeyOfSignature() 880 mbedtls_pk_context *pk = NULL; in PKCS7_VerifySignerSignature() local 881 rc = GetSignerPubKeyOfSignature(signer, &pk); in PKCS7_VerifySignerSignature() 900 … mbedtls_rsa_set_padding(pk->MBEDTLS_PRIVATE(pk_ctx), MBEDTLS_RSA_PKCS_V21, (mbedtls_md_type_t)0); in PKCS7_VerifySignerSignature() 902 rc = mbedtls_pk_verify(pk, digAlg, hash, hashLen, sig, sigLen); in PKCS7_VerifySignerSignature()
|
/base/security/crypto_framework/interfaces/innerkits/algorithm_parameter/ |
D | detailed_rsa_key_params.h | 33 HcfBigInteger pk; member 40 HcfBigInteger pk; member
|
D | detailed_dsa_key_params.h | 35 HcfBigInteger pk; member 42 HcfBigInteger pk; member
|
D | detailed_ecc_key_params.h | 52 HcfPoint pk; member 63 HcfPoint pk; member
|
/base/security/crypto_framework/plugin/openssl_plugin/key/asy_key_generator/src/ |
D | dsa_asy_key_generator_openssl.c | 107 Openssl_DSA_free(impl->pk); in DestroyDsaPubKey() 108 impl->pk = NULL; in DestroyDsaPubKey() 177 int len = Openssl_i2d_DSA_PUBKEY(impl->pk, &returnData); in GetDsaPubKeyEncoded() 247 DSA *dsaPk = impl->pk; in GetBigIntegerSpecFromDsaPubKey() 400 static void FillOpensslDsaPubKeyFunc(HcfOpensslDsaPubKey *pk) in FillOpensslDsaPubKeyFunc() argument 402 pk->base.base.base.destroy = DestroyDsaPubKey; in FillOpensslDsaPubKeyFunc() 403 pk->base.base.base.getClass = GetDsaPubKeyClass; in FillOpensslDsaPubKeyFunc() 404 pk->base.base.getAlgorithm = GetDsaPubKeyAlgorithm; in FillOpensslDsaPubKeyFunc() 405 pk->base.base.getEncoded = GetDsaPubKeyEncoded; in FillOpensslDsaPubKeyFunc() 406 pk->base.base.getFormat = GetDsaPubKeyFormat; in FillOpensslDsaPubKeyFunc() [all …]
|
D | rsa_asy_key_generator_openssl.c | 213 const BIGNUM *n = Openssl_RSA_get0_n(impl->pk); in GetRsaPubKeySpecBigInteger() 224 const BIGNUM *e = Openssl_RSA_get0_e(impl->pk); in GetRsaPubKeySpecBigInteger() 252 Openssl_RSA_free(impl->pk); in DestroyPubKey() 253 impl->pk = NULL; in DestroyPubKey() 416 return EncodePubKeyToX509(impl->pk, returnBlob); in GetPubKeyEncoded() 515 (*retPubKey)->pk = rsaPubKey; in PackPubKey() 804 if (BigIntegerToBigNum(&((HcfRsaKeyPairParamsSpec *)paramsSpec)->pk, e) != HCF_SUCCESS) { in ParseRsaBnFromBin() 820 if (BigIntegerToBigNum(&((HcfRsaPubKeyParamsSpec *)paramsSpec)->pk, e) != HCF_SUCCESS) { in ParseRsaBnFromBin()
|
/base/security/appverify/interfaces/innerkits/appverify_lite/include/ |
D | app_verify_pub.h | 114 char *pk; member 119 typedef int32_t (*GetSignPk)(struct VfyRst *verifyRst, AppSignPk *pk); 120 typedef void (*FreeSignPK)(AppSignPk *pk);
|
/base/security/crypto_framework/plugin/openssl_plugin/common/inc/ |
D | openssl_class.h | 61 RSA *pk; member 82 DSA *pk; member
|
/base/security/crypto_framework/test/fuzztest/key/asykeygenerator_fuzzer/ |
D | asykeygenerator_fuzzer.cpp | 269 .pk = pk_BN 278 .pk = pk_BN, 380 returnPubSpec->pk.data = dataE; in GenerateRsa2048CorrectPubKeySpec() 381 returnPubSpec->pk.len = RSA_2048_E_BYTE_SIZE; in GenerateRsa2048CorrectPubKeySpec() 398 returnPairSpec->pk.data = dataE; in GenerateRsa2048CorrectKeyPairSpec() 399 returnPairSpec->pk.len = RSA_2048_E_BYTE_SIZE; in GenerateRsa2048CorrectKeyPairSpec() 457 … eccPubKeySpec->pk.x.data = (IsBigEndian() ? g_ecc224CorrectBigPkX : g_ecc224CorrectLittlePkX); in ConstructEcc224PubKeyParamsSpec() 458 eccPubKeySpec->pk.x.len = NID_secp224r1_len; in ConstructEcc224PubKeyParamsSpec() 459 … eccPubKeySpec->pk.y.data = (IsBigEndian() ? g_ecc224CorrectBigPkY : g_ecc224CorrectLittlePkY); in ConstructEcc224PubKeyParamsSpec() 460 eccPubKeySpec->pk.y.len = NID_secp224r1_len; in ConstructEcc224PubKeyParamsSpec() [all …]
|
/base/update/packaging_tools/ |
D | README_zh.md | 77 -pk PRIVATE_KEY, --private_key PRIVATE_KEY Private key file path. 83 python build_update.py ./target/ ./target/package -pk ./target/updater_config/rsa_private_key2048.p… 89 python build_update.py -s source.zip ./target/ ./target/package -pk./target/updater_config/rsa_priv…
|
D | README.md | 65 -pk PRIVATE_KEY, --private_key PRIVATE_KEY Private key file path. 71 python build_update.py ./target/ ./target/package -pk ./target/updater_config/rsa_private_key2048.p… 77 python build_update.py -s source.zip ./target/ ./target/package -pk./target/updater_config/rsa_priv…
|
/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
D | napi_utils.cpp | 583 napi_value pk = GetDetailAsyKeySpecValue(env, arg, "pk"); in GetDsaPubKeySpec() local 584 bool ret = GetBigIntFromNapiValue(env, pk, &spec->pk); in GetDsaPubKeySpec() 615 napi_value pk = GetDetailAsyKeySpecValue(env, arg, "pk"); in GetDsaKeyPairAsyKeySpec() local 616 bool ret = GetBigIntFromNapiValue(env, pk, &spec->pk); in GetDsaKeyPairAsyKeySpec() 626 HcfFree(spec->pk.data); in GetDsaKeyPairAsyKeySpec() 868 napi_value pk = GetDetailAsyKeySpecValue(env, arg, "pk"); in GetEccPubKeySpec() local 869 bool ret = GetPointFromNapiValue(env, pk, &spec->pk); in GetEccPubKeySpec() 901 napi_value pk = GetDetailAsyKeySpecValue(env, arg, "pk"); in GetEccKeyPairAsyKeySpec() local 902 bool ret = GetPointFromNapiValue(env, pk, &spec->pk); in GetEccKeyPairAsyKeySpec() 912 HcfFree(spec->pk.x.data); in GetEccKeyPairAsyKeySpec() [all …]
|
/base/security/certificate_framework/frameworks/adapter/v1.0/inc/ |
D | certificate_openssl_class.h | 37 RSA *pk; member
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
D | hks_chipset_platform_encrypt_test.cpp | 625 HksBlob pk = { .size = static_cast<uint32_t>(pubKey.size()), .data = pubKey.data() }; variable 626 …t ret = HksExportChipsetPlatformPublicKey(&salt, HKS_CHIPSET_PLATFORM_DECRYPT_SCENE_TA_TO_TA, &pk); 657 HksBlob pk = { .size = static_cast<uint32_t>(pubKey.size()), .data = pubKey.data() }; variable 658 …t ret = HksExportChipsetPlatformPublicKey(&salt, HKS_CHIPSET_PLATFORM_DECRYPT_SCENE_TA_TO_TA, &pk); 674 HksBlob pk = { .size = static_cast<uint32_t>(pubKey.size()), .data = pubKey.data() }; variable 675 …t ret = HksExportChipsetPlatformPublicKey(&salt, HKS_CHIPSET_PLATFORM_DECRYPT_SCENE_TA_TO_TA, &pk);
|
/base/useriam/user_auth_framework/frameworks/native/executors/src/framework/ |
D | framework_executor_callback.cpp | 50 auto pk(publicKey); in OnBeginExecute() local 52 return OnBeginExecuteInner(scheduleId, pk, commandAttrs); in OnBeginExecute()
|