/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/ |
H A D | hks_openssl_dh.c | 213 BIGNUM *pub = BN_bin2bn(nativeKey->data + sizeof(struct KeyMaterialDh), pubKeyMaterial->pubKeySize, NULL); in HksOpensslDhCheckPubKey() local 218 if (one == NULL || r == NULL || pub == NULL) { in HksOpensslDhCheckPubKey() 222 if (BN_is_zero(pub) == HKS_OPENSSL_SUCCESS) { in HksOpensslDhCheckPubKey() 223 HKS_LOG_E("pub is not secure, pub equals 0"); in HksOpensslDhCheckPubKey() 226 if (BN_is_one(pub) == HKS_OPENSSL_SUCCESS) { in HksOpensslDhCheckPubKey() 227 HKS_LOG_E("pub is not secure, pub equals 1"); in HksOpensslDhCheckPubKey() 231 if (BN_cmp(pub, p) == 0) { in HksOpensslDhCheckPubKey() 232 HKS_LOG_E("pub i in HksOpensslDhCheckPubKey() 285 BIGNUM *pub = BN_bin2bn(pubKey->data + sizeof(struct KeyMaterialDh), pubKeyMaterial->pubKeySize, NULL); HksOpensslDhAgreeKey() local [all...] |
H A D | hks_openssl_ecc.c | 256 EC_POINT *pub = EC_POINT_new(ecGroup);
in EccInitPublicKey() local 261 if ((pubX == NULL) || (pubY == NULL) || (pub == NULL)) {
in EccInitPublicKey() 262 HKS_LOG_E("new big num x or y or pub failed");
in EccInitPublicKey() 266 if (EC_POINT_set_affine_coordinates_GFp(ecGroup, pub, pubX, pubY, NULL) <= 0) {
in EccInitPublicKey() 271 if (EC_KEY_set_public_key(eccKey, pub) <= 0) {
in EccInitPublicKey() 288 if (pub != NULL) {
in EccInitPublicKey() 289 EC_POINT_free(pub);
in EccInitPublicKey() 290 pub = NULL;
in EccInitPublicKey()
|
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/ |
H A D | hks_crypto_ed25519.c | 38 #define ED25519_PUBLIC_FROM_PRIVATE(pub, priv) ED25519_public_from_private((pub), (priv))
39 #define ED25519_SIGN(sig, msgData, msgSize, pub, priv) ED25519_sign((sig), (msgData), (msgSize), (pub), (priv))
40 #define ED25519_VERIFY(msgData, msgSize, sig, pub) ED25519_verify((msgData), (msgSize), (sig), (pub))
43 #define ED25519_PUBLIC_FROM_PRIVATE(pub, priv) ossl_ed25519_public_from_private(NULL, (pub), (priv), NULL)
44 #define ED25519_SIGN(sig, msgData, msgSize, pub, priv) \
45 ossl_ed25519_sign((sig), (msgData), (msgSize), (pub), (pri [all...] |
H A D | hks_mbedtls_ecc.c | 116 int32_t HksEccKeyMaterialToPub(const struct HksBlob *key, mbedtls_ecp_point *pub)
in HksEccKeyMaterialToPub() argument 121 int32_t ret = mbedtls_mpi_read_binary(&(pub->MBEDTLS_PRIVATE(X)), key->data + offset, keyMaterial->xSize);
in HksEccKeyMaterialToPub() 128 ret = mbedtls_mpi_read_binary(&(pub->MBEDTLS_PRIVATE(Y)), key->data + offset, keyMaterial->ySize);
in HksEccKeyMaterialToPub() 135 ret = mbedtls_mpi_lset(&(pub->MBEDTLS_PRIVATE(Z)), 1);
in HksEccKeyMaterialToPub()
|
H A D | hks_mbedtls_x25519.c | 170 static int32_t X25519SaveKeyMaterial(const mbedtls_ecp_point *pub,
in X25519SaveKeyMaterial() argument 187 int32_t ret = mbedtls_mpi_write_binary(&(pub->MBEDTLS_PRIVATE(X)), rawMaterial + offset, keyMaterial->pubKeySize);
in X25519SaveKeyMaterial() 221 mbedtls_ecp_point pub;
in HksMbedtlsX25519GenerateKey() local 232 mbedtls_ecp_point_init(&pub);
in HksMbedtlsX25519GenerateKey() 242 ret = mbedtls_ecdh_gen_public(&grp, &pri, &pub, mbedtls_ctr_drbg_random, &ctrDrbg);
in HksMbedtlsX25519GenerateKey() 248 ret = X25519SaveKeyMaterial(&pub, &pri, key);
in HksMbedtlsX25519GenerateKey() 252 mbedtls_ecp_point_free(&pub);
in HksMbedtlsX25519GenerateKey() 261 static int32_t X25519KeyMaterialToPub(const struct HksBlob *pubKey, mbedtls_ecp_point *pub)
in X25519KeyMaterialToPub() argument 279 ret = mbedtls_mpi_read_binary(&(pub->MBEDTLS_PRIVATE(X)), tmpPubKey, keyMaterial->pubKeySize);
in X25519KeyMaterialToPub() 286 ret = mbedtls_mpi_lset(&(pub in X25519KeyMaterialToPub() [all...] |
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/ |
H A D | openssl_dh_helper.c | 158 BIGNUM *pub = BN_bin2bn(pubKey->data + sizeof(struct KeyMaterialDh), pubKeyMaterial->pubKeySize, NULL); in DhAgreeKey() local 159 if (pub == NULL) { in DhAgreeKey() 166 BN_free(pub); in DhAgreeKey() 171 if (DH_compute_key_padded(computeKey, pub, dh) <= 0) { in DhAgreeKey() 173 BN_free(pub); in DhAgreeKey() 191 BN_free(pub); in DhAgreeKey()
|
H A D | openssl_ecc_helper.c | 179 EC_POINT *pub = EC_POINT_new(ecGroup); in EccInitPublicKey() local 184 if ((pubX == NULL) || (pubY == NULL) || (pub == NULL)) { in EccInitPublicKey() 188 if (EC_POINT_set_affine_coordinates_GFp(ecGroup, pub, pubX, pubY, NULL) <= 0) { in EccInitPublicKey() 192 if (EC_KEY_set_public_key(eccKey, pub) <= 0) { in EccInitPublicKey() 208 if (pub != NULL) { in EccInitPublicKey() 209 EC_POINT_free(pub); in EccInitPublicKey() 210 pub = NULL; in EccInitPublicKey()
|
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/java/ohos/global/i18n/ |
H A D | ResourceConfiguration.java | 77 String pub; field in ResourceConfiguration.ConfigItem 120 * get pub 122 * @return pub 125 return pub; in getPub()
|
H A D | Utils.java | 275 if ("true".equals(item.pub) && item.elements != null) { in generateAvailableDateTimeFormatPattern()
|
/base/security/certificate_framework/frameworks/adapter/v1.0/src/ |
H A D | certificate_openssl_common.c | 517 CfResult GetPubKeyDataFromX509(X509 *x509, CfBlob **pub)
in GetPubKeyDataFromX509() argument 524 *pub = (CfBlob *)CfMalloc(sizeof(CfBlob), 0);
in GetPubKeyDataFromX509() 525 if (*pub == NULL) {
in GetPubKeyDataFromX509() 526 LOGE("Failed to malloc pub key!");
in GetPubKeyDataFromX509() 530 int32_t size = i2d_PUBKEY(pkey, &((*pub)->data));
in GetPubKeyDataFromX509() 533 CfFree(*pub);
in GetPubKeyDataFromX509() 534 *pub = NULL;
in GetPubKeyDataFromX509() 537 (*pub)->size = (uint32_t)size;
in GetPubKeyDataFromX509() 554 LOGE("Failed to malloc pub key!");
in GetSubjectNameFromX509() 582 LOGE("Failed to malloc pub ke in GetNameConstraintsFromX509() [all...] |
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/include/ |
H A D | hks_mbedtls_ecc.h | 42 int32_t HksEccKeyMaterialToPub(const struct HksBlob *key, mbedtls_ecp_point *pub);
|
/base/security/certificate_framework/frameworks/adapter/v1.0/inc/ |
H A D | certificate_openssl_common.h | 59 CfResult GetPubKeyDataFromX509(X509 *x509, CfBlob **pub);
|
/base/security/huks/utils/crypto_adapter/ |
H A D | hks_client_service_adapter.c | 328 BIGNUM *pub = NULL;
in DhToX509PublicKey() local 335 pub = BN_bin2bn(pubKey->data, pubKey->size, NULL);
in DhToX509PublicKey() 336 HKS_IF_NULL_LOGE_BREAK(pub, "BN_bin2bn error %" LOG_PUBLIC "s", ERR_reason_error_string(ERR_get_error()))
in DhToX509PublicKey() 338 if (DH_set0_key(dh, pub, NULL) != 1) {
in DhToX509PublicKey() 342 pub = NULL;
in DhToX509PublicKey() 356 SELF_FREE_PTR(pub, BN_free)
in DhToX509PublicKey()
|
/base/security/crypto_framework/test/unittest/src/ |
H A D | openssl_adapter_mock.c | 225 int OpensslEcKeySetPublicKey(EC_KEY *key, const EC_POINT *pub) in OpensslEcKeySetPublicKey() argument 230 return EC_KEY_set_public_key(key, pub); in OpensslEcKeySetPublicKey() 655 EVP_PKEY *OpensslEvpPkeyNewRawPublicKey(int type, ENGINE *e, const unsigned char *pub, size_t len) in OpensslEvpPkeyNewRawPublicKey() argument 660 return EVP_PKEY_new_raw_public_key(type, e, pub, len); in OpensslEvpPkeyNewRawPublicKey() 663 EVP_PKEY *OpensslEvpPkeyNewRawPrivateKey(int type, ENGINE *e, const unsigned char *pub, size_t len) in OpensslEvpPkeyNewRawPrivateKey() argument 668 return EVP_PKEY_new_raw_private_key(type, e, pub, len); in OpensslEvpPkeyNewRawPrivateKey() 671 int OpensslEvpPkeyGetRawPublicKey(const EVP_PKEY *pkey, unsigned char *pub, size_t *len) in OpensslEvpPkeyGetRawPublicKey() argument 676 return EVP_PKEY_get_raw_public_key(pkey, pub, len); in OpensslEvpPkeyGetRawPublicKey()
|
/base/security/crypto_framework/plugin/openssl_plugin/common/inc/ |
H A D | openssl_adapter.h | 67 int OpensslEcKeySetPublicKey(EC_KEY *key, const EC_POINT *pub); 127 EVP_PKEY *OpensslEvpPkeyNewRawPublicKey(int type, ENGINE *e, const unsigned char *pub, size_t len); 128 EVP_PKEY *OpensslEvpPkeyNewRawPrivateKey(int type, ENGINE *e, const unsigned char *pub, size_t len); 129 int OpensslEvpPkeyGetRawPublicKey(const EVP_PKEY *pkey, unsigned char *pub, size_t *len);
|
/base/security/crypto_framework/frameworks/cj/src/ |
H A D | crypto_ffi.cpp | 1311 LOGE("new pub key failed"); in FFiOHOSAsyKeyGeneratorBySpecGeneratePubKey() 1646 auto pub = FFIData::Create<PubKeyImpl>(pubKey); in FFiOHOSKeyPairPubKey() local 1647 if (pub == nullptr) { in FFiOHOSKeyPairPubKey() 1649 LOGE("new pub key failed"); in FFiOHOSKeyPairPubKey() 1653 return pub->GetID(); in FFiOHOSKeyPairPubKey()
|
/base/hiviewdfx/hiview/plugins/faultlogger/test/common/unittest/ |
H A D | faultlogger_unittest.cpp | 386 {"buildId":"12345abcde", "file":"/system/lib/chipset-pub-sdk/libeventhandler.z.so", "offset":278, in GenCppCrashLogTestCommon()
|