| /base/security/certificate_framework/frameworks/core/v1.0/certificate/ |
| D | cert_chain_validator.c | 37 char *algorithm; member 45 const char *algorithm; member 53 static const HcfCertChainValidatorFuncSet *FindAbility(const char *algorithm) in FindAbility() argument 56 if (strcmp(CERT_PATH_VALIDATOR_ABILITY_SET[i].algorithm, algorithm) == 0) { in FindAbility() 60 LOGE("Algorithm for certChain validator is not support! [algorithm]: %{public}s", algorithm); in FindAbility() 81 CfFree(validatorImpl->algorithm); in DestroyCertChainValidator() 82 validatorImpl->algorithm = NULL; in DestroyCertChainValidator() 168 const char *algo = (const char *)impl->algorithm; in GetAlgorithm() 172 CfResult HcfCertChainValidatorCreate(const char *algorithm, HcfCertChainValidator **pathValidator) in HcfCertChainValidatorCreate() argument 175 if (!CfIsStrValid(algorithm, HCF_MAX_STR_LEN) || (pathValidator == NULL)) { in HcfCertChainValidatorCreate() [all …]
|
| /base/update/updater/services/package/pkg_algorithm/ |
| D | pkg_algorithm.cpp | 42 int32_t PkgAlgorithm::FinalDigest(DigestAlgorithm::DigestAlgorithmPtr algorithm, in FinalDigest() argument 47 algorithm->Final(digest); in FinalDigest() 62 …DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.di… in Pack() local 63 if (algorithm == nullptr) { in Pack() 67 algorithm->Init(); in Pack() 88 algorithm->Update(buffer, readLen); in Pack() 93 ret = FinalDigest(algorithm, context, true); in Pack() 109 …DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.di… in Unpack() local 110 if (algorithm == nullptr) { in Unpack() 114 algorithm->Init(); in Unpack() [all …]
|
| D | pkg_algo_deflate.cpp | 59 const PkgStreamPtr outStream, const DigestAlgorithm::DigestAlgorithmPtr algorithm) in PackCalculate() argument 87 algorithm->Calculate(crcResult, inBuffer, readLen); in PackCalculate() 116 …DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.di… in Pack() local 117 if (algorithm == nullptr) { in Pack() 121 return PackCalculate(context, inStream, outStream, algorithm); in Pack() 155 const PkgStreamPtr outStream, DigestAlgorithm::DigestAlgorithmPtr algorithm) in UnpackCalculate() argument 194 algorithm->Calculate(crcResult, outBuffer, inflateLen); in UnpackCalculate() 203 …DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(context.di… in Unpack() local 204 if (algorithm == nullptr) { in Unpack() 213 return UnpackCalculate(context, inStream, outStream, algorithm); in Unpack()
|
| /base/update/updater/services/package/pkg_package/ |
| D | pkg_upgradefile.h | 159 DigestAlgorithm::DigestAlgorithmPtr algorithm, std::vector<std::string> &fileNames); 161 DigestAlgorithm::DigestAlgorithmPtr algorithm, std::vector<std::string> &fileNames); 165 DigestAlgorithm::DigestAlgorithmPtr &algorithm); 167 int32_t Verify(size_t start, DigestAlgorithm::DigestAlgorithmPtr algorithm, 173 size_t &parsedLen, DigestAlgorithm::DigestAlgorithmPtr algorithm); 174 int32_t ReadReserveData(size_t &parsedLen, DigestAlgorithm::DigestAlgorithmPtr &algorithm); 176 … DigestAlgorithm::DigestAlgorithmPtr algorithm, uint32_t needType); 177 int32_t ReadImgHashData(size_t &parsedLen, DigestAlgorithm::DigestAlgorithmPtr algorithm); 179 size_t &parsedLen, DigestAlgorithm::DigestAlgorithmPtr algorithm); 180 int32_t VerifyHeader(DigestAlgorithm::DigestAlgorithmPtr algorithm, VerifyFunction verifier, [all …]
|
| D | pkg_upgradefile.cpp | 265 size_t &parsedLen, DigestAlgorithm::DigestAlgorithmPtr algorithm) in ReadSignData() argument 308 … DigestAlgorithm::DigestAlgorithmPtr algorithm, uint32_t needType) in ReadImgHashTLV() argument 327 algorithm->Update(buffer, buffer.length); in ReadImgHashTLV() 338 algorithm->Update(dataBuf, dataBuf.length); in ReadImgHashTLV() 343 …t UpgradePkgFile::ReadImgHashData(size_t &parsedLen, DigestAlgorithm::DigestAlgorithmPtr algorithm) in ReadImgHashData() argument 358 int32_t ret = ReadImgHashTLV(imgHashBuf, parsedLen, algorithm, TLV_TYPE_FOR_HASH_HEADER); in ReadImgHashData() 366 ret = ReadImgHashTLV(imgHashBuf, parsedLen, algorithm, TLV_TYPE_FOR_HASH_DATA); in ReadImgHashData() 394 DigestAlgorithm::DigestAlgorithmPtr algorithm) in ReadPackageInfo() argument 434 algorithm->Update(buffer, UPGRADE_RESERVE_LEN + GetUpgradeSignatureLen()); in ReadPackageInfo() 463 DigestAlgorithm::DigestAlgorithmPtr algorithm = nullptr; in LoadPackage() local [all …]
|
| D | pkg_lz4file.cpp | 49 … PkgAlgorithm::PkgAlgorithmPtr algorithm = PkgAlgorithmFactory::GetAlgorithm(&fileInfo_.fileInfo); in Pack() local 55 if (algorithm == nullptr || outStream == nullptr || inStream == nullptr) { in Pack() 65 int32_t ret = algorithm->Pack(inStream, outStream, context); in Pack() 79 … PkgAlgorithm::PkgAlgorithmPtr algorithm = PkgAlgorithmFactory::GetAlgorithm(&fileInfo_.fileInfo); in Unpack() local 80 if (algorithm == nullptr) { in Unpack() 95 int32_t ret = algorithm->Unpack(inStream, outStream, context); in Unpack() 105 algorithm->UpdateFileInfo(&fileInfo_.fileInfo); in Unpack()
|
| /base/tee/tee_os_framework/lib/teelib/libcrypto/src/ |
| D | tee_crypto_api_cipher.c | 35 uint32_t algorithm; member 62 static const struct cipher_op_config_s *get_ae_config(uint32_t algorithm) in get_ae_config() argument 66 if (algorithm == g_cipher_config[index].algorithm) in get_ae_config() 74 const struct cipher_op_config_s *config = get_ae_config(operation->algorithm); in cipher_init_check_config() 124 bool no_need_set_iv = (operation->algorithm == TEE_ALG_AES_ECB_PKCS5 || in set_operation_iv() 125 operation->algorithm == TEE_ALG_AES_ECB_NOPAD || in set_operation_iv() 126 operation->algorithm == TEE_ALG_SM4_ECB_NOPAD || in set_operation_iv() 127 operation->algorithm == TEE_ALG_DES3_ECB_NOPAD || in set_operation_iv() 128 operation->algorithm == TEE_ALG_AES_CMAC || in set_operation_iv() 129 operation->algorithm == TEE_ALG_AES_GMAC || in set_operation_iv() [all …]
|
| D | tee_crypto_api_hmac.c | 31 uint32_t algorithm; member 55 if (operation->algorithm == g_mac_config[index].algorithm) { in mac_init_check_config() 127 operation->crypto_ctxt = tee_crypto_hmac_init(operation->algorithm, &hmac_key, engine); in hmac_init_hal() 134 static bool is_cipher_algorithm(uint32_t algorithm) in is_cipher_algorithm() argument 136 bool check = (algorithm == TEE_ALG_AES_CBC_MAC_NOPAD || algorithm == TEE_ALG_AES_CMAC || in is_cipher_algorithm() 137 algorithm == TEE_ALG_DES_CBC_MAC_NOPAD || algorithm == TEE_ALG_DES3_CBC_MAC_NOPAD); in is_cipher_algorithm() 171 if (is_cipher_algorithm(operation->algorithm)) { in TEE_MACInit() 192 if (operation->algorithm == g_mac_config[index].algorithm) { in mac_update_check_config() 260 if (is_cipher_algorithm(operation->algorithm)) { in TEE_MACUpdate() 304 static TEE_Result crypto_output_buff_len_check(uint32_t algorithm, size_t output_len) in crypto_output_buff_len_check() argument [all …]
|
| D | tee_crypto_api_asymmetric.c | 35 uint32_t algorithm; member 55 if (operation->algorithm == g_asymmetric_cipher_config[index].algorithm) { in asymmetric_cipher_operation_check_config() 164 int32_t ret = tee_crypto_rsa_encrypt(operation->algorithm, in rsa_encrypt_hal() 173 int32_t ret = tee_crypto_ecc_encrypt(operation->algorithm, in sm2_encrypt_hal() 184 switch (operation->algorithm) { in asymmetric_encrypt_hal() 298 int32_t ret = tee_crypto_rsa_decrypt(operation->algorithm, in rsa_decrypt_hal() 307 int32_t ret = tee_crypto_ecc_decrypt(operation->algorithm, in sm2_decrypt_hal() 318 switch (operation->algorithm) { in asymmetric_decrypt_hal() 414 if (g_support_signature_algs[i] == operation->algorithm) { in signature_operation_state_check() 430 static uint32_t get_expect_digest_len_from_algorithm(uint32_t algorithm, uint32_t api_level) in get_expect_digest_len_from_algorithm() argument [all …]
|
| D | tee_crypto_api.c | 123 static TEE_Result check_low_lev_key_size_for_alg(uint32_t algorithm, uint32_t key_size) in check_low_lev_key_size_for_alg() argument 126 if (algorithm == g_algo_low_lev_key_size_config[index].algo) { in check_low_lev_key_size_for_alg() 138 static TEE_Result check_valid_key_size_for_algorithm(uint32_t algorithm, uint32_t max_key_size) in check_valid_key_size_for_algorithm() argument 142 return check_low_lev_key_size_for_alg(algorithm, max_key_size); in check_valid_key_size_for_algorithm() 144 return crypto_check_keysize(algorithm, max_key_size); in check_valid_key_size_for_algorithm() 175 static TEE_Result set_operation_hal_info(TEE_OperationHandle operation, uint32_t algorithm) in set_operation_hal_info() argument 183 uint32_t engine = crypto_get_default_engine(algorithm); in set_operation_hal_info() 187 size_t crypto_get_output_length(uint32_t algorithm) in crypto_get_output_length() argument 190 if (g_output_lower_limit[i].algorithm == algorithm) in crypto_get_output_length() 197 static TEE_Result check_allocate_param(TEE_OperationHandle *operation, uint32_t algorithm, uint32_t… in check_allocate_param() argument [all …]
|
| D | tee_crypto_common_hash.c | 25 uint32_t algorithm; member 60 if (operation->algorithm == g_digest_config[index].algorithm) { in digest_operation_state_check() 91 … operation->crypto_ctxt = tee_crypto_hash_init(operation->algorithm, crypto_hal_data->crypto_flag); in proc_hal_digest_init()
|
| D | tee_crypto_api_hash.c | 81 static TEE_Result crypto_output_buff_len_check(uint32_t algorithm, size_t output_len) in crypto_output_buff_len_check() argument 84 if (g_output_lower_limit[i].algorithm == algorithm) { in crypto_output_buff_len_check() 143 if (crypto_output_buff_len_check(operation->algorithm, *hashLen) != TEE_SUCCESS) { in TEE_DigestDoFinal()
|
| D | tee_crypto_api_derive_key.c | 34 if (operation->algorithm == TEE_ALG_X25519) { in get_ecdh_public_key_hal() 100 …int32_t res = tee_crypto_ecdh_derive_key(operation->algorithm, &client_key, operation->privateKey,… in tee_derive_key_ecdh_hal() 133 if (operation->algorithm != (uint32_t)TEE_ALG_ECDH_DERIVE_SHARED_SECRET && in tee_derive_key_ecdh() 134 operation->algorithm != (uint32_t)TEE_ALG_X25519) { in tee_derive_key_ecdh() 135 tloge("algorithm error 0x%x\n", operation->algorithm); in tee_derive_key_ecdh() 272 if (operation->algorithm != (uint32_t)TEE_ALG_DH_DERIVE_SHARED_SECRET) { in tee_derive_key_dh() 378 if (operation->algorithm == TEE_ALG_DH_DERIVE_SHARED_SECRET) { in TEE_DeriveKey() 383 } else if (operation->algorithm == TEE_ALG_ECDH_DERIVE_SHARED_SECRET) { in TEE_DeriveKey() 388 } else if (operation->algorithm == TEE_ALG_X25519) { in TEE_DeriveKey() 393 tloge("not support DH algorithm 0x%x\n", operation->algorithm); in TEE_DeriveKey()
|
| /base/startup/hvb/tools/ |
| D | readme.md | 21 … --algorithm SHA256_RSA2048 //签名算法,目前支… 29 …partition_size 31457280 --pubkey boot_pub.pem --privkey boot_priv.pem --algorithm SHA256_RSA2048/S… 45 … --algorithm SHA256_RSA2048 //签… 53 …on_size 3724541952 --pubkey system_pub.pem --privkey system_priv.pem --algorithm SHA256_RSA2048/S… 67 --algorithm SHA256_RSA2048 //签名算法 83 ….pem --privkey test_priv.pem --partition rvt --partition_size 4194304 --algorithm SHA256_RSA2048/S…
|
| /base/security/certificate_manager/interfaces/kits/napi/src/ |
| D | cm_napi_get_cert_store_path.cpp | 223 static int32_t GetAndCheckCertAlg(napi_env env, napi_value arg, uint32_t &algorithm) in GetAndCheckCertAlg() argument 229 algorithm = CM_ALG_INTERNATIONAL; in GetAndCheckCertAlg() 240 napi_value result = ParseUint32(env, certAlg, algorithm); in GetAndCheckCertAlg() 246 if (!IsValidCertAlg(algorithm)) { in GetAndCheckCertAlg() 247 CM_LOG_E("certAlg[%u] is invalid", algorithm); in GetAndCheckCertAlg() 286 uint32_t algorithm; in CMNapiGetCertStorePath() local 287 ret = GetAndCheckCertAlg(env, argv[0], algorithm); in CMNapiGetCertStorePath() 294 static_cast<CmCertAlg>(algorithm)); in CMNapiGetCertStorePath()
|
| D | cm_napi.cpp | 148 napi_value algorithm = nullptr; in CreateCertAlgorithm() local 149 NAPI_CALL(env, napi_create_object(env, &algorithm)); in CreateCertAlgorithm() 151 AddInt32Property(env, algorithm, "INTERNATIONAL", CM_ALG_INTERNATIONAL); in CreateCertAlgorithm() 152 AddInt32Property(env, algorithm, "SM", CM_ALG_SM); in CreateCertAlgorithm() 153 return algorithm; in CreateCertAlgorithm()
|
| /base/msdp/device_status/libs/ |
| D | BUILD.gn | 24 "include/algorithm", 85 "src/algorithm/algo_absolute_still.cpp", 86 "src/algorithm/algo_base.cpp", 87 "src/algorithm/algo_horizontal.cpp", 88 "src/algorithm/algo_vertical.cpp",
|
| /base/security/certificate_framework/frameworks/cj/src/ |
| D | cj_certchain_validator.cpp | 20 int32_t FfiCertCjCertChainValidatorNewInstance(const char *algorithm, CjCertChainValidator *returnO… in FfiCertCjCertChainValidatorNewInstance() argument 26 const auto errCode = HcfCertChainValidatorCreate(algorithm, &validator); in FfiCertCjCertChainValidatorNewInstance()
|
| /base/security/device_security_level/oem_property/common/ |
| D | dslm_credential_utils.c | 62 uint32_t algorithm; member 98 const struct DataBuffer *pbkData, uint32_t algorithm); 180 … int32_t ret = EcdsaVerify(&root->publicKey, &root->signature, &root->publicKey, root->algorithm); in VerifyCredentialCb() 188 …ify(&intermediate->publicKey, &intermediate->signature, &root->publicKey, intermediate->algorithm); in VerifyCredentialCb() 196 … ret = EcdsaVerify(&last->publicKey, &last->signature, &intermediate->publicKey, last->algorithm); in VerifyCredentialCb() 277 static uint32_t GetAlgorithmType(const char *algorithm) in GetAlgorithmType() argument 279 if (algorithm == NULL) { in GetAlgorithmType() 283 if (strncmp(algorithm, "SHA256withECDSA", strlen("SHA256withECDSA")) == 0) { in GetAlgorithmType() 287 if (strncmp(algorithm, "SHA384withECDSA", strlen("SHA384withECDSA")) == 0) { in GetAlgorithmType() 385 attestation->algorithm = GetAlgorithmType(DslmGetJsonFieldString(item, JSON_KEY_ALGORITHM)); in ParsePublicKeyAttestation() [all …]
|
| /base/security/device_security_level/test/dslm_unit_test/ |
| D | dslm_oem_property_test.cpp | 43 const struct DataBuffer *pbkData, uint32_t algorithm); 692 uint32_t algorithm = TYPE_ECDSA_SHA_256; variable 694 int32_t ret = EcdsaVerify(&srcData, &sigData, pbkData, algorithm); 697 ret = EcdsaVerify(nullptr, &sigData, pbkData, algorithm); 700 ret = EcdsaVerify(&srcData, nullptr, pbkData, algorithm); 708 uint32_t algorithm = TYPE_ECDSA_SHA_256; variable 716 int32_t ret = EcdsaVerify(&srcData, &sigData, &pbkData, algorithm); 726 int32_t ret = EcdsaVerify(&srcData, &sigData, &pbkData, algorithm); 736 int32_t ret = EcdsaVerify(&srcData, &sigData, &pbkData, algorithm); 745 uint32_t algorithm = TYPE_ECDSA_SHA_256; variable [all …]
|
| /base/security/certificate_framework/ |
| D | README-en.md | 4 …ework shields the implementation differences of third-party certificate algorithm libraries. It pr… 14 …ning the version number, serial number (SN), issuer, subject, signature algorithm, and public key … 18 …lexibly loads the algorithm library adaptation layer to adapt to the algorithm and shield differen… 19 - Algorithm library adaptation layer: calls specific APIs of the OpenSSL or Mbed TLS algorithm li…
|
| /base/tee/tee_os_framework/lib/teelib/libcrypto_hal/include/ |
| D | soft_common_api.h | 52 int32_t check_valid_algorithm(uint32_t algorithm, const uint32_t *array, uint32_t array_size); 53 uint32_t get_hash_context_size(uint32_t algorithm);
|
| /base/update/updater/test/unittest/package/ |
| D | pkg_algo_unittest.cpp | 111 …DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(invalidTyp… in TestInvalidParam() local 112 EXPECT_NE(nullptr, algorithm); in TestInvalidParam() 113 algorithm->Init(); in TestInvalidParam() 116 algorithm->Update(buffer, sizeof(dig2)); in TestInvalidParam() 117 algorithm->Final(buffer); in TestInvalidParam()
|
| /base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/ |
| D | UpdaterStartUpdaterProc_fuzzer.cpp | 71 …DigestAlgorithm::DigestAlgorithmPtr algorithm = PkgAlgorithmFactory::GetDigestAlgorithm(PKG_DIGEST… in BuildFileDigest() local 72 if (algorithm == nullptr) { in BuildFileDigest() 78 algorithm->Init(); in BuildFileDigest() 90 algorithm->Update(buff, readLen); in BuildFileDigest() 96 algorithm->Final(signBuffer); in BuildFileDigest()
|
| /base/tee/tee_os_framework/lib/teelib/libcrypto_hal/src/boringssl/ |
| D | soft_common_api.c | 42 int32_t check_valid_algorithm(uint32_t algorithm, const uint32_t *array, uint32_t array_size) in check_valid_algorithm() argument 48 if (algorithm == array[index]) in check_valid_algorithm() 54 uint32_t get_hash_context_size(uint32_t algorithm) in get_hash_context_size() argument 56 switch (algorithm) { in get_hash_context_size() 225 uint32_t algorithm; member 279 if (src_ctx->alg_type == g_soft_copy_ctx[i].algorithm) in soft_crypto_ctx_copy()
|