/base/web/webview/test/fuzztest/ohos_adapter/systemproperties_fuzzer/ |
H A D | system_properties_adapter_impl_fuzzer.cpp | 28 size_t keySize = std::min(size, static_cast<size_t>(32)); in SystemPropertiesAdapterFuzzTest() local 29 std::string key(reinterpret_cast<const char*>(data), keySize); in SystemPropertiesAdapterFuzzTest() local 31 size_t valueSize = size > keySize ? size - keySize : 0; in SystemPropertiesAdapterFuzzTest() 32 std::string value(reinterpret_cast<const char*>(data + keySize), valueSize); in SystemPropertiesAdapterFuzzTest()
|
/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/ |
H A D | hks_crypto_hal_rsa_oaep_encrypt.cpp | 39 HksKeySize keySize = HksKeySize::HKS_RSA_KEY_SIZE_512; member 56 .keySize = HKS_RSA_KEY_SIZE_512, 72 .keySize = HKS_RSA_KEY_SIZE_768, 88 .keySize = HKS_RSA_KEY_SIZE_1024, 104 .keySize = HKS_RSA_KEY_SIZE_2048, 120 .keySize = HKS_RSA_KEY_SIZE_3072, 136 .keySize = HKS_RSA_KEY_SIZE_4096, 152 .keySize = HKS_RSA_KEY_SIZE_512, 168 .keySize = HKS_RSA_KEY_SIZE_768, 184 .keySize [all...] |
H A D | hks_crypto_hal_rsa_encrypt.cpp | 37 HksKeySize keySize = HksKeySize::HKS_RSA_KEY_SIZE_512; member 55 .keySize = HKS_RSA_KEY_SIZE_512, 83 .keySize = HKS_RSA_KEY_SIZE_768, 105 .keySize = HKS_RSA_KEY_SIZE_1024, 131 .keySize = HKS_RSA_KEY_SIZE_2048, 159 .keySize = HKS_RSA_KEY_SIZE_3072, 190 .keySize = HKS_RSA_KEY_SIZE_4096, 212 .keySize = HKS_RSA_KEY_SIZE_512, 228 .keySize = HKS_RSA_KEY_SIZE_768, 244 .keySize [all...] |
/base/security/crypto_framework/frameworks/key/ |
H A D | sym_key_generator.c | 86 keyAttr->keySize = AES_KEY_SIZE_128; in SetKeyLength() 90 keyAttr->keySize = AES_KEY_SIZE_192; in SetKeyLength() 94 keyAttr->keySize = AES_KEY_SIZE_256; in SetKeyLength() 98 keyAttr->keySize = SM4_KEY_SIZE_128; in SetKeyLength() 102 keyAttr->keySize = DES_KEY_SIZE_192; in SetKeyLength() 124 keyAttr->keySize = HMAC_KEY_SIZE_SHA1; in SetKeyLenByDigest() 127 keyAttr->keySize = HMAC_KEY_SIZE_SHA224; in SetKeyLenByDigest() 130 keyAttr->keySize = HMAC_KEY_SIZE_SHA256; in SetKeyLenByDigest() 133 keyAttr->keySize = HMAC_KEY_SIZE_SHA384; in SetKeyLenByDigest() 136 keyAttr->keySize in SetKeyLenByDigest() [all...] |
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
H A D | hks_import_key_test.cpp | 56 uint32_t keySize = 0; member 70 .keySize = HKS_AES_KEY_SIZE_128 / HKS_BITS_PER_BYTE, 84 .keySize = HKS_AES_KEY_SIZE_192 / HKS_BITS_PER_BYTE, 98 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE, 113 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE, 127 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE, 142 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE, 155 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE, 169 .keySize = HKS_AES_KEY_SIZE_256 / HKS_BITS_PER_BYTE, 182 .keySize [all...] |
H A D | hks_import_sign_verify_test.cpp | 348 static int32_t ConstructImportedCurve25519Key(uint32_t alg, uint32_t keySize, uint32_t importType, in ConstructImportedCurve25519Key() argument 363 material.keySize = keySize; in ConstructImportedCurve25519Key() 399 static int32_t ConstructImportedDsaPriOrPairKey(uint32_t keySize, uint32_t importType, struct HksBlob *outKey) in ConstructImportedDsaPriOrPairKey() argument 404 material.keySize = keySize; in ConstructImportedDsaPriOrPairKey() 466 static int32_t ConstructImportedDsaKey(uint32_t keySize, uint32_t importType, struct HksBlob *outKey) in ConstructImportedDsaKey() argument 471 return ConstructImportedDsaPriOrPairKey(keySize, importType, outKey); in ConstructImportedDsaKey() 475 static int32_t ConstructEcPrivateKey(const struct HksBlob *zDataBlob, uint32_t keySize, struct HksBlob *outKey) in ConstructEcPrivateKey() argument 479 material.keySize in ConstructEcPrivateKey() 508 ConstructEccPubKey(uint32_t keySize, struct HksBlob *outKey) ConstructEccPubKey() argument 534 ConstructEcKey(const struct HksBlob *xDataBlob, const struct HksBlob *yDataBlob, const struct HksBlob *zDataBlob, uint32_t keySize, struct HksBlob *outKey) ConstructEcKey() argument 593 ConstructImportedSm2Key(uint32_t keySize, uint32_t importType, struct HksBlob *outKey, Sm2TestKeyData *sm2Key) ConstructImportedSm2Key() argument 648 ConstructImportedSm2KeyForOpenssl1(uint32_t keySize, uint32_t importType, struct HksBlob *outKey) ConstructImportedSm2KeyForOpenssl1() argument 663 ConstructImportedSm2KeyForOpenssl3(uint32_t keySize, uint32_t importType, struct HksBlob *outKey) ConstructImportedSm2KeyForOpenssl3() argument 678 ConstructImportedEccKey(uint32_t keySize, uint32_t importType, struct HksBlob *outKey) ConstructImportedEccKey() argument 732 ConstructImportedKey(uint32_t alg, uint32_t keySize, uint32_t importType, struct HksBlob *outKey, bool sm2CompabilityTest) ConstructImportedKey() argument 754 ModifyImportParams(uint32_t alg, uint32_t purpose, uint32_t keySize, uint32_t digest, uint32_t importType) ModifyImportParams() argument 763 ModifyinitOp1Params(uint32_t alg, uint32_t purpose, uint32_t keySize, uint32_t digest) ModifyinitOp1Params() argument 771 ModifyinitOp2Params(uint32_t alg, uint32_t purpose, uint32_t keySize, uint32_t digest) ModifyinitOp2Params() argument 904 ImportPlainKeyTest(uint32_t alg, uint32_t keySize, uint32_t digest, bool sm2CompabilityTest) ImportPlainKeyTest() argument 952 ImportInvalidPurposePlainKeyTest(uint32_t alg, uint32_t keySize, uint32_t digest, uint32_t purpose, bool sm2CompabilityTest) ImportInvalidPurposePlainKeyTest() argument [all...] |
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/ |
H A D | hks_openssl_dsa.c | 53 uint8_t *buff = (uint8_t *)HksMalloc(HKS_KEY_BYTES(keyMaterial->keySize)); in InitDsaStructKey() 62 if (memcpy_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), key->data + *offset, keyMaterial->xSize) != EOK) { in InitDsaStructKey() 70 if (memcpy_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), key->data + *offset, keyMaterial->ySize) != EOK) { in InitDsaStructKey() 85 (void)memset_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), 0, HKS_KEY_BYTES(keyMaterial->keySize)); in InitDsaStructKey() 94 uint8_t *buff = HksMalloc(HKS_KEY_BYTES(keyMaterial->keySize)); in InitDsaStructParameter() 97 if (memcpy_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), key->data + *offset, keyMaterial->pSize) != EOK) { in InitDsaStructParameter() 103 if (memcpy_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), key->data + *offset, keyMaterial->qSize) != EOK) { in InitDsaStructParameter() 110 if (memcpy_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), key->data + *offset, keyMaterial->gSize) != EOK) { in InitDsaStructParameter() 111 (void)memset_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), in InitDsaStructParameter() 163 DsaCalculateMaterialLen(uint32_t keySize, uint32_t *dsaKeyLen) DsaCalculateMaterialLen() argument 243 DsaSaveKeyMaterial(const DSA *dsa, const uint32_t keySize, uint8_t **output, uint32_t *outputSize) DsaSaveKeyMaterial() argument [all...] |
H A D | hks_openssl_ecc.c | 112 uint32_t keySize = spec->keyLen;
in EccSaveKeyMaterial() local 113 /* public exponent x and y, and private exponent, so need size is: keySize / 8 * 3 */
in EccSaveKeyMaterial() 114 uint32_t rawMaterialLen = sizeof(struct KeyMaterialEcc) + HKS_KEY_BYTES(keySize) * ECC_KEYPAIR_CNT;
in EccSaveKeyMaterial() 126 keyMaterial->keySize = keySize;
in EccSaveKeyMaterial() 127 keyMaterial->xSize = HKS_KEY_BYTES(keySize);
in EccSaveKeyMaterial() 128 keyMaterial->ySize = HKS_KEY_BYTES(keySize);
in EccSaveKeyMaterial() 129 keyMaterial->zSize = HKS_KEY_BYTES(keySize);
in EccSaveKeyMaterial() 219 publickeyMaterial->keySize = keyMaterial->keySize;
in HksOpensslGetEccPubKey() 234 GetEccModules( const uint8_t *key, uint32_t *keySize, uint32_t *publicXSize, uint32_t *publicYSize, uint32_t *privateXSize) GetEccModules() argument 302 uint32_t keySize; EccInitKey() local [all...] |
H A D | hks_openssl_dh.c | 39 static int32_t HksOpensslGetNid(uint32_t keySize, int *nid) in HksOpensslGetNid() argument 41 switch (keySize) { in HksOpensslGetNid() 52 HKS_LOG_E("invalid key size, keySize = %" LOG_PUBLIC "u", keySize); in HksOpensslGetNid() 78 int32_t ret = HksOpensslGetNid(keyMaterial->keySize, &nid); in InitDhStruct() 106 int32_t ret = HksOpensslGetNid(keyMaterial->keySize, &nid); in InitDhPubStruct() 128 static int32_t DhSaveKeyMaterial(const DH *dh, const uint32_t keySize, struct HksBlob *key) in DhSaveKeyMaterial() argument 142 keyMaterial->keySize = keySize; in DhSaveKeyMaterial()
|
/base/security/huks/interfaces/inner_api/huks_standard/main/include/ |
H A D | hks_type.h | 64 #define HKS_KEY_BYTES(keySize) (((keySize) + HKS_BITS_PER_BYTE - 1) / HKS_BITS_PER_BYTE) 143 uint32_t keySize; member 154 uint32_t keySize; member 165 uint32_t keySize; member 176 uint32_t keySize; member 189 uint32_t keySize; member 200 uint32_t keySize; member 311 uint16_t keySize; /* keySize o member [all...] |
/base/security/huks/frameworks/huks_standard/main/common/src/ |
H A D | hks_check_paramset.c | 450 if ((keyMaterial->keyAlg != alg) || (keyMaterial->keySize != params->keyLen.value)) { in CheckImportKeySize() 555 if ((keyMaterial->keyAlg != alg) || (keyMaterial->keySize != params->keyLen.value)) { in CheckRsaKeyLen() 567 uint32_t keySize = sizeof(struct HksKeyMaterialRsa) + keyMaterial->nSize + keyMaterial->dSize + keyMaterial->eSize; in CheckRsaKeyLen() local 568 if (key->size < keySize) { in CheckRsaKeyLen() 569 HKS_LOG_E("import key size[%" LOG_PUBLIC "u] smaller than keySize[%" LOG_PUBLIC "u]", key->size, keySize); in CheckRsaKeyLen() 585 if ((keyMaterial->keyAlg != alg) || (keyMaterial->keySize != params->keyLen.value)) { in CheckEccKeyLen() 605 uint32_t keySize = sizeof(struct HksKeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize + keyMaterial->zSize; in CheckEccKeyLen() local 606 if (key->size < keySize) { in CheckEccKeyLen() 607 HKS_LOG_E("import key size[%" LOG_PUBLIC "u] smaller than keySize[ in CheckEccKeyLen() 646 uint32_t keySize = sizeof(struct HksKeyMaterialDsa) + keyMaterial->xSize + keyMaterial->ySize + CheckDsaKeyLen() local 686 uint32_t keySize = sizeof(struct HksKeyMaterial25519) + keyMaterial->pubKeySize + keyMaterial->priKeySize; CheckCurve25519KeyLen() local 724 uint32_t keySize = sizeof(struct HksKeyMaterialDh) + keyMaterial->pubKeySize + keyMaterial->priKeySize; CheckDHKeyLen() local 908 uint32_t keySize = 0; HksCoreCheckSignVerifyParams() local 926 HksLocalCheckSignVerifyParams(uint32_t cmdId, uint32_t keySize, const struct HksParamSet *paramSet, const struct HksBlob *srcData, const struct HksBlob *signature) HksLocalCheckSignVerifyParams() argument 971 uint32_t keySize = 0; HksCoreCheckAgreeKeyParams() local 1030 HksLocalCheckCipherParams(uint32_t cmdId, uint32_t keySize, const struct HksParamSet *paramSet, const struct HksBlob *inData, const struct HksBlob *outData) HksLocalCheckCipherParams() argument 1182 struct HksParam *keySize = NULL; HksCoreCheckAgreeDeriveFinishParams() local [all...] |
H A D | hks_base_check.c | 1042 uint32_t expectCnt, uint32_t *keySize)
in CheckAndGetKeySize() 1061 *keySize = keySizeParam->uint32Param;
in CheckAndGetKeySize() 1066 uint32_t expectCnt, uint32_t *keySize)
in CheckAndGetKeySize() 1077 "check key size: keySize value %" LOG_PUBLIC "u not expected", keyLen)
in CheckAndGetKeySize() 1078 *keySize = keyLen;
in CheckAndGetKeySize() 1096 static int32_t CheckAndGetRsaKeySize(const struct HksBlob *key, uint32_t *keySize)
in CheckAndGetRsaKeySize() argument 1114 *keySize = keySizeParam->uint32Param;
in CheckAndGetRsaKeySize() 1413 static int32_t CheckEccSignature(uint32_t cmdId, uint32_t keySize, const struct HksBlob *signature)
in CheckEccSignature() argument 1417 * sign: signSize no less than 2*keySize/8 + 8;
in CheckEccSignature() 1418 * verify: signSize no greater than 2*keySize/ in CheckEccSignature() 1041 CheckAndGetKeySize(const struct HksBlob *key, const uint32_t *expectKeySize, uint32_t expectCnt, uint32_t *keySize) CheckAndGetKeySize() argument 1065 CheckAndGetKeySize(const struct HksBlob *key, const uint32_t *expectKeySize, uint32_t expectCnt, uint32_t *keySize) CheckAndGetKeySize() argument 1484 CheckRsaSignature(uint32_t cmdId, uint32_t keySize, const struct HksBlob *signature) CheckRsaSignature() argument 1514 CheckRsaNoPadCipherData(uint32_t keySize, const struct HksBlob *inData, const struct HksBlob *outData) CheckRsaNoPadCipherData() argument 1532 CheckRsaOaepCipherData(uint32_t cmdId, uint32_t keySize, uint32_t digest, const struct HksBlob *inData, const struct HksBlob *outData) CheckRsaOaepCipherData() argument 1581 uint32_t keySize = inputParams->keyLen.value / HKS_BITS_PER_BYTE; CheckRsaCipherData() local 1934 HksGetDsaKeySize(const struct HksBlob *key, uint32_t *keySize) HksGetDsaKeySize() argument 1954 HksGetKeySize(uint32_t alg, const struct HksBlob *key, uint32_t *keySize) HksGetKeySize() argument 2219 HksCheckSignature(uint32_t cmdId, uint32_t alg, uint32_t keySize, const struct HksBlob *signature) HksCheckSignature() argument [all...] |
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
H A D | cert_manager_app_cert_process.c | 102 static int32_t SaveKeyMaterialEcc(const EC_KEY *eccKey, const uint32_t keySize, struct CmBlob *keyOut) in SaveKeyMaterialEcc() argument 105 /* public exponent x and y, and private exponent, so need size is: keySize / 8 * 3 */ in SaveKeyMaterialEcc() 106 rawMaterial.size = sizeof(struct HksKeyMaterialEcc) + CM_KEY_BYTES(keySize) * ECC_KEYPAIR_CNT; in SaveKeyMaterialEcc() 120 keyMaterial->keySize = keySize; in SaveKeyMaterialEcc() 121 keyMaterial->xSize = CM_KEY_BYTES(keySize); in SaveKeyMaterialEcc() 122 keyMaterial->ySize = CM_KEY_BYTES(keySize); in SaveKeyMaterialEcc() 123 keyMaterial->zSize = CM_KEY_BYTES(keySize); in SaveKeyMaterialEcc() 138 static int32_t SaveKeyMaterialRsa(const RSA *rsa, const uint32_t keySize, struct CmBlob *keyOut) in SaveKeyMaterialRsa() argument 140 const uint32_t keyByteLen = keySize / CM_BITS_PER_BYT in SaveKeyMaterialRsa() 243 uint32_t keySize = ((uint32_t)RSA_size(rsa)) * CM_BITS_PER_BYTE; ImportRsaKey() local [all...] |
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/ |
H A D | hks_mbedtls_ecc.c | 42 static int32_t HksMbedtlsEccCheckKeySize(const uint32_t keySize)
in HksMbedtlsEccCheckKeySize() argument 44 if ((keySize != HKS_ECC_KEY_SIZE_224) && (keySize != HKS_ECC_KEY_SIZE_256) && (keySize != HKS_ECC_KEY_SIZE_384) &&
in HksMbedtlsEccCheckKeySize() 45 (keySize != HKS_ECC_KEY_SIZE_521)) {
in HksMbedtlsEccCheckKeySize() 46 HKS_LOG_E("Invalid ecc keySize! keySize = 0x%" LOG_PUBLIC "X", keySize);
in HksMbedtlsEccCheckKeySize() 91 int32_t ret = HksMbedtlsEccCheckKeySize(keyMaterial->keySize);
in EccKeyCheck() 113 return GetEccGroupId(keyMaterial->keySize, curv in HksMbedtlsEccGetKeyCurveNist() 160 EccSaveKeyMaterial(const mbedtls_ecp_keypair *ecp, const uint32_t keySize, struct HksBlob *key) EccSaveKeyMaterial() argument [all...] |
H A D | hks_mbedtls_dh.c | 43 static int32_t GetDhParam(uint32_t keySize, struct HksBlob *P, struct HksBlob *G) in GetDhParam() argument 45 switch (keySize) { in GetDhParam() 71 static int32_t DhSaveKeyMaterial(const mbedtls_dhm_context *ctx, const uint32_t keySize, struct HksBlob *key) in DhSaveKeyMaterial() argument 73 const uint32_t keyByteLen = HKS_KEY_BYTES(keySize); in DhSaveKeyMaterial() 81 keyMaterial->keySize = keySize; in DhSaveKeyMaterial() 193 ret = GetDhParam(keyMaterial->keySize, ¶mP, ¶mG); in DhKeyMaterialToCtx() 201 ctx->len = HKS_KEY_BYTES(keyMaterial->keySize); in DhKeyMaterialToCtx()
|
/base/security/crypto_framework/plugin/openssl_plugin/key/sym_key_generator/src/ |
H A D | sym_key_openssl.c | 205 static char *GetAlgoName(HcfSymKeyGeneratorSpiOpensslImpl *impl, int keySize) in GetAlgoName() argument 208 if (sprintf_s(keySizeChar, MAX_KEY_STR_SIZE, "%d", keySize) < 0) { in GetAlgoName() 270 HcfResult res = HcfSymmKeySpiCreate(impl->attr.keySize / KEY_BIT, returnSymmKey); in GenerateSymmKey() 275 returnSymmKey->algoName = GetAlgoName(impl, impl->attr.keySize); in GenerateSymmKey() 292 if ((attr.keySize / KEY_BIT) == (int32_t)key->len) { in IsBlobKeyLenValid() 296 if ((attr.algo == HCF_ALG_HMAC) && (attr.keySize == 0)) { in IsBlobKeyLenValid() 330 int keySize = impl->attr.keySize; in ConvertSymmKey() local 331 if (impl->attr.algo == HCF_ALG_HMAC && keySize == 0) { in ConvertSymmKey() 332 keySize in ConvertSymmKey() [all...] |
/base/security/huks/interfaces/kits/liteapi/src/ |
H A D | hks_lite_api.cpp | 103 JSIValue keySize = JSI::CreateObject(); in CreateHuksKeySize() local 105 AddInt32PropertyInLite(keySize, "HUKS_AES_KEY_SIZE_128", HKS_AES_KEY_SIZE_128); in CreateHuksKeySize() 106 AddInt32PropertyInLite(keySize, "HUKS_AES_KEY_SIZE_192", HKS_AES_KEY_SIZE_192); in CreateHuksKeySize() 107 AddInt32PropertyInLite(keySize, "HUKS_AES_KEY_SIZE_256", HKS_AES_KEY_SIZE_256); in CreateHuksKeySize() 108 AddInt32PropertyInLite(keySize, "HUKS_AES_KEY_SIZE_512", HKS_AES_KEY_SIZE_512); in CreateHuksKeySize() 110 AddInt32PropertyInLite(keySize, "HUKS_DES_KEY_SIZE_64", HKS_DES_KEY_SIZE_64); in CreateHuksKeySize() 111 AddInt32PropertyInLite(keySize, "HUKS_3DES_KEY_SIZE_128", HKS_3DES_KEY_SIZE_128); in CreateHuksKeySize() 112 AddInt32PropertyInLite(keySize, "HUKS_3DES_KEY_SIZE_192", HKS_3DES_KEY_SIZE_192); in CreateHuksKeySize() 114 AddInt32PropertyInLite(keySize, "HUKS_RSA_KEY_SIZE_1024", HKS_RSA_KEY_SIZE_1024); in CreateHuksKeySize() 115 AddInt32PropertyInLite(keySize, "HUKS_RSA_KEY_SIZE_204 in CreateHuksKeySize() [all...] |
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/include/ |
H A D | hks_openssl_aes.h | 77 const EVP_CIPHER *GetBlockCipherType(uint32_t keySize, uint32_t mode,
78 const EVP_CIPHER *(*getCbcCipherType)(uint32_t keySize),
79 const EVP_CIPHER *(*getCtrCipherType)(uint32_t keySize),
80 const EVP_CIPHER *(*getEcbCipherType)(uint32_t keySize));
89 const EVP_CIPHER *(*getCipherType)(uint32_t keySize, uint32_t mode));
|
/base/security/huks/services/huks_standard/huks_engine/main/core/src/ |
H A D | hks_keyblob.c | 47 uint32_t keySize;
member 181 uint32_t keySize;
in BuildKeyBlobUsageSpec() local 182 (void)memcpy_s(&keySize, sizeof(keySize), &(keyBlobInfo->keySize), sizeof(keyBlobInfo->keySize));
in BuildKeyBlobUsageSpec() 184 aeadParam->payloadLen = keySize;
in BuildKeyBlobUsageSpec() 218 uint32_t keySize;
in EncryptAndDecryptKeyBlob() local 219 (void)memcpy_s(&keySize, sizeof(keySize), in EncryptAndDecryptKeyBlob() 461 uint32_t keySize; HksGetRawKey() local [all...] |
/base/security/huks/frameworks/huks_standard/main/core/src/ |
H A D | hks_local_engine.c | 181 uint32_t keySize = 0; in CheckLocalCipherParams() local 183 keySize = key->size * HKS_BITS_PER_BYTE; in CheckLocalCipherParams() 186 keySize = keyMaterial->keySize; in CheckLocalCipherParams() 191 return HksLocalCheckCipherParams(cmdId, keySize, paramSet, inputText, outputText); in CheckLocalCipherParams() 261 uint32_t keySize = 0; in CheckLocalSignVerifyParams() local 263 keySize = ((struct KeyMaterialRsa *)key->data)->keySize; in CheckLocalSignVerifyParams() 265 keySize = ((struct KeyMaterialDsa *)key->data)->keySize; in CheckLocalSignVerifyParams() [all...] |
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/src/ |
H A D | hks_inner_test.cpp | 150 HksParam keySize; in HWTEST_F() local 151 keySize.tag = HKS_TAG_KEY_SIZE; in HWTEST_F() 152 keySize.uint32Param = 256; in HWTEST_F() 153 HksAddParams(paramSetTest, &keySize, 1); in HWTEST_F() 197 HksParam keySize; in HWTEST_F() local 198 keySize.tag = HKS_TAG_KEY_SIZE; in HWTEST_F() 199 keySize.uint32Param = 256; in HWTEST_F() 200 HksAddParams(paramSet, &keySize, 1); in HWTEST_F() 317 HksParam keySize; in HWTEST_F() local 318 keySize in HWTEST_F() [all...] |
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/include/ |
H A D | openssl_dsa_helper.h | 31 EVP_PKEY *GenerateDsaKey(const uint32_t keySize); 43 int32_t SaveDsaKeyToHksBlob(EVP_PKEY *pkey, const uint32_t keySize, struct HksBlob *key);
|
/base/security/huks/services/huks_standard/huks_service/main/core/src/ |
H A D | hks_upgrade_helper.c | 113 uint32_t keySize = 0;
in HksDeleteOldKeyForSmallToService() 114 ret = HksManageStoreGetKeyBlobSize(&rootProcessInfo, NULL, keyAlias, &keySize, HKS_STORAGE_TYPE_KEY);
in HksDeleteOldKeyForSmallToService() 117 if (keySize > MAX_KEY_SIZE) {
in HksDeleteOldKeyForSmallToService() 118 HKS_LOG_E("invalid storage size, size = %" LOG_PUBLIC "u", keySize);
in HksDeleteOldKeyForSmallToService() 121 struct HksBlob oldKey = { .size = keySize, .data = NULL };
in HksDeleteOldKeyForSmallToService() 123 oldKey.data = (uint8_t *)HksMalloc(keySize);
in HksDeleteOldKeyForSmallToService()
|
/base/security/huks/interfaces/kits/c/include/ |
H A D | native_huks_type.h | 827 uint32_t keySize;
member 846 uint32_t keySize;
member 865 uint32_t keySize;
member 884 uint32_t keySize;
member 907 uint32_t keySize;
member 926 uint32_t keySize;
member
|
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/ |
H A D | openssl_rsa_helper.c | 29 int32_t SaveRsaKeyToHksBlob(EVP_PKEY *pkey, const uint32_t keySize, struct HksBlob *key) in SaveRsaKeyToHksBlob() argument 31 const uint32_t keyByteLen = keySize / BIT_NUM_OF_UINT8; in SaveRsaKeyToHksBlob() 35 keyMaterial->keySize = keySize; in SaveRsaKeyToHksBlob() 67 EVP_PKEY *GenerateRsaKey(const uint32_t keySize) in GenerateRsaKey() argument 81 if (RSA_generate_key_ex(rsa, keySize, bne, NULL) != 1) { in GenerateRsaKey() 151 pubKeyInfo->keySize = (uint32_t)RSA_size(rsa) * BIT_NUM_OF_UINT8; in X509ToRsaPublicKey() 166 uint8_t *buff = (uint8_t *)HksMalloc(HKS_KEY_BYTES(keyMaterial->keySize)); in InitRsa() 176 if (memcpy_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), key->data + offset, keyMaterial->nSize) == 0) { in InitRsa() 181 if (memcpy_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), ke in InitRsa() [all...] |