/base/security/crypto_framework/common/src/ |
D | asy_key_params.c | 73 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyDsaKeyPairSpec() 74 HcfFree(spec->sk.data); in DestroyDsaKeyPairSpec() 75 spec->sk.data = NULL; in DestroyDsaKeyPairSpec() 137 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyEccPriKeySpec() 138 HcfFree(spec->sk.data); in DestroyEccPriKeySpec() 139 spec->sk.data = NULL; in DestroyEccPriKeySpec() 150 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyEccKeyPairSpec() 151 HcfFree(spec->sk.data); in DestroyEccKeyPairSpec() 152 spec->sk.data = NULL; in DestroyEccKeyPairSpec() 192 (void)memset_s(spec->sk.data, spec->sk.len, 0, spec->sk.len); in DestroyRsaKeyPairSpec() [all …]
|
/base/security/crypto_framework/frameworks/key/ |
D | asy_key_generator.c | 133 if ((paramsSpec->sk.data == NULL) || (paramsSpec->sk.len == 0)) { in IsDsaKeyPairSpecValid() 200 if ((paramsSpec->sk.data == NULL) || (paramsSpec->sk.len == 0)) { in IsEccPriKeySpecValid() 230 if ((paramsSpec->sk.data == NULL) || (paramsSpec->sk.len == 0)) { in IsEccKeyPairSpecValid() 290 if ((paramsSpec->sk.data == NULL) || (paramsSpec->sk.len == 0)) { in IsRsaKeyPairSpecValid() 512 spec->sk.data = (unsigned char *)HcfMalloc(srcSpec->sk.len, 0); in CreateDsaKeyPairSpecImpl() 513 if (spec->sk.data == NULL) { in CreateDsaKeyPairSpecImpl() 521 (void)memcpy_s(spec->sk.data, srcSpec->sk.len, srcSpec->sk.data, srcSpec->sk.len); in CreateDsaKeyPairSpecImpl() 523 spec->sk.len = srcSpec->sk.len; in CreateDsaKeyPairSpecImpl() 702 tmpSpec->sk.data = (unsigned char *)HcfMalloc(srcSpec->sk.len, 0); in CreateEccPriKeySpecImpl() 703 if (tmpSpec->sk.data == NULL) { in CreateEccPriKeySpecImpl() [all …]
|
/base/security/crypto_framework/test/unittest/src/ |
D | crypto_dsa_asy_key_generator_by_spec_test.cpp | 264 .sk = sk_BN 443 HcfPriKey *sk = nullptr; variable 444 ret = generator->generatePriKey(generator, &sk); 447 ASSERT_NE(sk, nullptr); 449 sk->clearMem(sk); 450 HcfObjDestroy(sk); 843 HcfBigInteger sk = { .data = nullptr, .len = 0 }; variable 844 ret = keyPair->priKey->getAsyKeySpecBigInteger(keyPair->priKey, DSA_SK_BN, &sk); 847 ASSERT_NE(sk.data, nullptr); 848 ASSERT_NE(sk.len, 0); [all …]
|
D | crypto_asy_key_generator_cov_test.cpp | 343 .sk = g_dsaCorrectSkBn 353 .sk = g_dsaCorrectSkBn 363 .sk = g_dsaCorrectSkBn 373 .sk = g_dsaCorrectSkBn 383 .sk = g_dsaNullSkBn 393 .sk = g_dsaNoLenSkBn 507 returnPairSpec->sk.data = dataD; in GenerateRsa2048CorrectKeyPairSpec() 508 returnPairSpec->sk.len = RSA_2048_D_BYTE_SIZE; in GenerateRsa2048CorrectKeyPairSpec() 624 eccPriKeySpec->sk.data = (IS_BIG_ENDIAN ? g_ecc224CorrectBigSk : g_ecc224CorrectLittleSk); in ConstructEcc224PriKeyParamsSpec() 625 eccPriKeySpec->sk.len = NID_secp224r1_len; in ConstructEcc224PriKeyParamsSpec() [all …]
|
D | crypto_signature_exception_test.cpp | 49 HcfPriKey sk; variable 50 HcfResult ret = EngineSignInit((HcfSignSpi *)&g_obj, nullptr, &sk); 53 ret = EngineSignInit((HcfSignSpi *)&g_obj, nullptr, &sk);
|
D | crypto_ecc_key_agreement_by_spec_test.cpp | 96 eccKeyPairSpec->sk.data = (IS_BIG_ENDIAN ? g_ecc224CorrectBigSk : g_ecc224CorrectLittleSk); in ConstructEcc224KeyPairParamsSpec() 97 eccKeyPairSpec->sk.len = NID_secp224r1_len; in ConstructEcc224KeyPairParamsSpec() 130 eccKeyPairSpec->sk.data = (IS_BIG_ENDIAN ? g_ecc256CorrectBigSk : g_ecc256CorrectLittleSk); in ConstructEcc256KeyPairParamsSpec() 131 eccKeyPairSpec->sk.len = NID_X9_62_prime256v1_len; in ConstructEcc256KeyPairParamsSpec() 164 eccKeyPairSpec->sk.data = (IS_BIG_ENDIAN ? g_ecc384CorrectBigSk : g_ecc384CorrectLittleSk); in ConstructEcc384KeyPairParamsSpec() 165 eccKeyPairSpec->sk.len = NID_secp384r1_len; in ConstructEcc384KeyPairParamsSpec() 198 eccKeyPairSpec->sk.data = (IS_BIG_ENDIAN ? g_ecc521CorrectBigSk : g_ecc521CorrectLittleSk); in ConstructEcc521KeyPairParamsSpec() 199 eccKeyPairSpec->sk.len = NID_secp521r1_len; in ConstructEcc521KeyPairParamsSpec()
|
D | crypto_dsa_exception_test.cpp | 368 HcfPriKey *sk = nullptr; variable 369 … ret = EngineGenerateDsaPriKeyBySpec((const HcfAsyKeyGeneratorSpi *)&g_obj, &asySpecKeyPair, &sk); 396 HcfPriKey *sk = nullptr; variable 397 ret = IsSignInitInputValid((HcfSignSpi *)&g_obj, sk);
|
D | crypto_dsa_asy_key_generator_test.cpp | 559 HcfBigInteger sk = { .data = nullptr, .len = 0 }; variable 560 …lt ret = dsa2048KeyPair_->priKey->getAsyKeySpecBigInteger(dsa2048KeyPair_->priKey, DSA_SK_BN, &sk); 563 ASSERT_NE(sk.data, nullptr); 564 ASSERT_NE(sk.len, 0); 565 HcfFree(sk.data); 1145 HcfBigInteger sk = { .data = nullptr, .len = 0 }; variable 1146 ret = convertKeyPair->priKey->getAsyKeySpecBigInteger(convertKeyPair->priKey, DSA_SK_BN, &sk); 1151 ASSERT_NE(sk.data, nullptr); 1152 ASSERT_NE(sk.len, 0); 1153 HcfFree(sk.data);
|
D | crypto_ecc_no_length_sign_test.cpp | 104 eccKeyPairSpec->sk.data = (IS_BIG_ENDIAN ? g_ecc224CorrectBigSk : g_ecc224CorrectLittleSk); in ConstructEcc224KeyPairParamsSpec() 105 eccKeyPairSpec->sk.len = NID_secp224r1_len; in ConstructEcc224KeyPairParamsSpec() 138 eccKeyPairSpec->sk.data = (IS_BIG_ENDIAN ? g_ecc256CorrectBigSk : g_ecc256CorrectLittleSk); in ConstructEcc256KeyPairParamsSpec() 139 eccKeyPairSpec->sk.len = NID_X9_62_prime256v1_len; in ConstructEcc256KeyPairParamsSpec() 172 eccKeyPairSpec->sk.data = (IS_BIG_ENDIAN ? g_ecc384CorrectBigSk : g_ecc384CorrectLittleSk); in ConstructEcc384KeyPairParamsSpec() 173 eccKeyPairSpec->sk.len = NID_secp384r1_len; in ConstructEcc384KeyPairParamsSpec() 206 eccKeyPairSpec->sk.data = (IS_BIG_ENDIAN ? g_ecc521CorrectBigSk : g_ecc521CorrectLittleSk); in ConstructEcc521KeyPairParamsSpec() 207 eccKeyPairSpec->sk.len = NID_secp521r1_len; in ConstructEcc521KeyPairParamsSpec()
|
/base/security/crypto_framework/plugin/openssl_plugin/key/asy_key_generator/src/ |
D | dsa_asy_key_generator_openssl.c | 121 Openssl_DSA_free(impl->sk); in DestroyDsaPriKey() 122 impl->sk = NULL; in DestroyDsaPriKey() 199 int len = Openssl_i2d_DSAPrivateKey(impl->sk, &returnData); in GetDsaPriKeyEncoded() 285 DSA *dsaSk = impl->sk; in GetBigIntegerSpecFromDsaPriKey() 347 Openssl_DSA_free(impl->sk); in ClearDsaPriKeyMem() 348 impl->sk = NULL; in ClearDsaPriKeyMem() 412 static void FillOpensslDsaPriKeyFunc(HcfOpensslDsaPriKey *sk) in FillOpensslDsaPriKeyFunc() argument 414 sk->base.base.base.destroy = DestroyDsaPriKey; in FillOpensslDsaPriKeyFunc() 415 sk->base.base.base.getClass = GetDsaPriKeyClass; in FillOpensslDsaPriKeyFunc() 416 sk->base.base.getAlgorithm = GetDsaPriKeyAlgorithm; in FillOpensslDsaPriKeyFunc() [all …]
|
D | rsa_asy_key_generator_openssl.c | 171 const BIGNUM *n = Openssl_RSA_get0_n(impl->sk); in GetRsaPriKeySpecBigInteger() 182 const BIGNUM *d = Openssl_RSA_get0_d(impl->sk); in GetRsaPriKeySpecBigInteger() 269 Openssl_RSA_free(impl->sk); in DestroyPriKey() 270 impl->sk = NULL; in DestroyPriKey() 433 Openssl_RSA_get0_factors(impl->sk, &p, &q); in GetPriKeyEncoded() 438 return EncodePriKeyToPKCS8(impl->sk, returnBlob); in GetPriKeyEncoded() 500 Openssl_RSA_free(impl->sk); in ClearPriKeyMem() 501 impl->sk = NULL; in ClearPriKeyMem() 540 (*retPriKey)->sk = rsaPriKey; in PackPriKey() 810 if (BigIntegerToBigNum(&((HcfRsaKeyPairParamsSpec *)paramsSpec)->sk, d) != HCF_SUCCESS) { in ParseRsaBnFromBin()
|
D | ecc_asy_key_generator_openssl.c | 407 BIGNUM *sk = NULL; in InitEcKeyByPriKey() local 408 if (BigIntegerToBigNum(priKey, &sk) != HCF_SUCCESS) { in InitEcKeyByPriKey() 412 int32_t res = Openssl_EC_KEY_set_private_key(ecKey, sk); in InitEcKeyByPriKey() 415 Openssl_BN_free(sk); in InitEcKeyByPriKey() 418 Openssl_BN_free(sk); in InitEcKeyByPriKey() 429 BIGNUM *sk = NULL; in SetEcPubKeyFromPriKey() local 430 if (BigIntegerToBigNum(priKey, &sk) != HCF_SUCCESS) { in SetEcPubKeyFromPriKey() 437 Openssl_BN_free(sk); in SetEcPubKeyFromPriKey() 440 if (!Openssl_EC_POINT_mul(group, point, sk, NULL, NULL, NULL)) { in SetEcPubKeyFromPriKey() 443 Openssl_BN_free(sk); in SetEcPubKeyFromPriKey() [all …]
|
/base/security/crypto_framework/interfaces/innerkits/algorithm_parameter/ |
D | detailed_ecc_key_params.h | 57 HcfBigInteger sk; member 62 HcfBigInteger sk; member
|
D | detailed_rsa_key_params.h | 41 HcfBigInteger sk; member
|
D | detailed_dsa_key_params.h | 43 HcfBigInteger sk; member
|
/base/security/crypto_framework/plugin/openssl_plugin/common/inc/ |
D | openssl_class.h | 70 RSA *sk; member 89 DSA *sk; member
|
/base/security/certificate_framework/frameworks/adapter/v1.0/inc/ |
D | certificate_openssl_class.h | 46 RSA *sk; member
|
/base/global/i18n_lite/tools/i18n-dat-tool/src/main/java/resource/ |
D | plural.txt | 56 sk "", "= 1", "", "= 2<4", "", ""
|
D | decimalPlurals.txt | 56 sk "", "v = 0", "", "v = 0", "v ! 0", ""
|
D | locales.txt | 384 sk 385 sk-SK
|
/base/security/crypto_framework/test/fuzztest/key/asykeygenerator_fuzzer/ |
D | asykeygenerator_fuzzer.cpp | 279 .sk = sk_BN 400 returnPairSpec->sk.data = dataD; in GenerateRsa2048CorrectKeyPairSpec() 401 returnPairSpec->sk.len = RSA_2048_D_BYTE_SIZE; in GenerateRsa2048CorrectKeyPairSpec() 489 eccPriKeySpec->sk.data = (IsBigEndian() ? g_ecc224CorrectBigSk : g_ecc224CorrectLittleSk); in ConstructEcc224PriKeyParamsSpec() 490 eccPriKeySpec->sk.len = NID_secp224r1_len; in ConstructEcc224PriKeyParamsSpec() 523 eccKeyPairSpec->sk.data = (IsBigEndian() ? g_ecc224CorrectBigSk : g_ecc224CorrectLittleSk); in ConstructEcc224KeyPairParamsSpec() 524 eccKeyPairSpec->sk.len = NID_secp224r1_len; in ConstructEcc224KeyPairParamsSpec()
|
/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
D | napi_utils.cpp | 622 napi_value sk = GetDetailAsyKeySpecValue(env, arg, "sk"); in GetDsaKeyPairAsyKeySpec() local 623 ret = GetBigIntFromNapiValue(env, sk, &spec->sk); in GetDsaKeyPairAsyKeySpec() 834 napi_value sk = GetDetailAsyKeySpecValue(env, arg, "sk"); in GetEccPriKeySpec() local 835 bool ret = GetBigIntFromNapiValue(env, sk, &spec->sk); in GetEccPriKeySpec() 908 napi_value sk = GetDetailAsyKeySpecValue(env, arg, "sk"); in GetEccKeyPairAsyKeySpec() local 909 ret = GetBigIntFromNapiValue(env, sk, &spec->sk); in GetEccKeyPairAsyKeySpec() 1035 napi_value sk = GetDetailAsyKeySpecValue(env, arg, "sk"); in GetRsaKeyPairAsyKeySpec() local 1036 ret = GetBigIntFromNapiValue(env, sk, &spec->sk); in GetRsaKeyPairAsyKeySpec()
|
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/ |
D | cipher_rsa_openssl.c | 77 ret = DuplicateRsa(((HcfOpensslRsaPriKey *)key)->sk, true, dupRsa); in DuplicateRsaFromKey() 87 Openssl_RSA_get0_key(((HcfOpensslRsaPriKey *)key)->sk, &n, &e, &d); in DuplicateRsaFromKey()
|
/base/security/certificate_framework/test/fuzztest/v1.0/x509crl_fuzzer/ |
D | x509crl_fuzzer.cpp | 111 RSA *rsaPrikey = (reinterpret_cast<HcfOpensslRsaPriKey *>(g_keyPair->priKey))->sk; in GetCrlStream()
|
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/signature/src/ |
D | signature_rsa_openssl.c | 139 if (DuplicateRsa(((HcfOpensslRsaPriKey *)key)->sk, signing, &rsa) != HCF_SUCCESS) { in InitRsaEvpKey() 148 Openssl_RSA_get0_key(((HcfOpensslRsaPriKey *)key)->sk, &n, &e, &d); in InitRsaEvpKey()
|