Home
last modified time | relevance | path

Searched refs:pk (Results 1 – 15 of 15) sorted by relevance

/base/security/huks/frameworks/crypto_lite/cipher/src/
Dcipher_rsa.c127 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/appverify/interfaces/innerkits/appverify_lite/src/
Dapp_verify.c549 static unsigned char *GetRsaPk(const mbedtls_pk_context *pk, int *len) in GetRsaPk() argument
563 int pkLen = mbedtls_pk_write_pubkey(&c, buf, pk); in GetRsaPk()
592 static unsigned char *GetEcPk(const mbedtls_pk_context *pk, int *len) in GetEcPk() argument
594 mbedtls_ecp_keypair *ecCtx = mbedtls_pk_ec(*pk); in GetEcPk()
642 static unsigned char *GetPkBuf(const mbedtls_pk_context *pk, int *len) in GetPkBuf() argument
645 …if (mbedtls_pk_get_type(pk) == MBEDTLS_PK_RSA || mbedtls_pk_get_type(pk) == MBEDTLS_PK_RSASSA_PSS)… in GetPkBuf()
646 bufA = GetRsaPk(pk, len); in GetPkBuf()
647 …} else if (mbedtls_pk_get_type(pk) == MBEDTLS_PK_ECDSA || mbedtls_pk_get_type(pk) == MBEDTLS_PK_EC… in GetPkBuf()
648 bufA = GetEcPk(pk, len); in GetPkBuf()
653 static int ParseCertGetPk(const char *certEncoded, AppSignPk *pk) in ParseCertGetPk() argument
[all …]
Dmbedtls_pkcs7.c851 static int 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/appverify/interfaces/innerkits/appverify_lite/include/
Dapp_verify_pub.h113 char *pk; member
118 typedef int (*GetSignPk)(struct VfyRst *verifyRst, AppSignPk *pk);
119 typedef void (*FreeSignPK)(AppSignPk *pk);
/base/security/crypto_framework/plugin/openssl_plugin/common/inc/
Dopenssl_class.h38 EC_POINT *pk; member
61 RSA *pk; member
/base/update/packaging_tools/
DREADME_zh.md77 -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…
DREADME.md65 -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/plugin/openssl_plugin/key/asy_key_generator/src/
Decc_asy_key_generator_openssl.c126 EC_POINT_free(impl->pk); in DestroyEccPubKey()
127 impl->pk = NULL; in DestroyEccPubKey()
230 if (impl->pk == NULL) { in GetEccPubKeyEncoded()
240 if (EC_KEY_set_public_key(ecKey, impl->pk) <= 0) { in GetEccPubKeyEncoded()
330 returnPubKey->pk = pubKey; in CreateEccPubKey()
Drsa_asy_key_generator_openssl.c124 RSA_free(impl->pk); in DestroyPubKey()
125 impl->pk = NULL; in DestroyPubKey()
288 return EncodePubKeyToX509(impl->pk, returnBlob); in GetPubKeyEncoded()
379 (*retPubKey)->pk = rsaPubKey; in PackPubKey()
/base/useriam/user_auth_framework/common/executors/src/framework/
Dframework_executor_callback.cpp50 auto pk(publicKey); in OnBeginExecute() local
52 return OnBeginExecuteInner(scheduleId, pk, commandAttrs); in OnBeginExecute()
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/key_agreement/src/
Decdh_openssl.c41 if (EC_KEY_set_public_key(ecKey, (publicKey->pk)) != HCF_OPENSSL_SUCCESS) { in NewPKeyByEccPubKey()
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/rsa/src/
Dcipher_rsa_openssl.c67 ret = DuplicateRsa(((HcfOpensslRsaPubKey *)key)->pk, false, dupRsa); in DuplicateRsaFromKey()
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/signature/src/
Decdsa_openssl.c260 … if (EC_KEY_set_public_key(ecKey, ((HcfOpensslEccPubKey *)publicKey)->pk) != HCF_OPENSSL_SUCCESS) { in EngineVerifyInit()
Dsignature_rsa_openssl.c121 …if (DuplicateRsa(signing ? ((HcfOpensslRsaPriKey *)key)->sk : ((HcfOpensslRsaPubKey *)key)->pk, si… in InitRsaEvpKey()
/base/security/crypto_framework/plugin/openssl_plugin/certificate/src/
Dx509_crl_openssl.c165 RSA *rsaPubkey = ((HcfOpensslRsaPubKey *)key)->pk; in Verify()