Home
last modified time | relevance | path

Searched refs:tmpKey (Results 1 – 10 of 10) sorted by relevance

/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_common.c32 uint8_t *tmpKey = (uint8_t *)HksMalloc(keySizeByte); in HksOpensslGenerateRandomKey() local
33 HKS_IF_NULL_LOGE_RETURN(tmpKey, HKS_ERROR_MALLOC_FAIL, "malloc buffer failed") in HksOpensslGenerateRandomKey()
36 if (RAND_bytes(tmpKey, keySizeByte) <= 0) { in HksOpensslGenerateRandomKey()
41 key->data = tmpKey; in HksOpensslGenerateRandomKey()
47 (void)memset_s(tmpKey, keySizeByte, 0, keySizeByte); in HksOpensslGenerateRandomKey()
48 HksFree(tmpKey); in HksOpensslGenerateRandomKey()
Dhks_openssl_ed25519tox25519.c283 uint8_t tmpKey[P_BYTES] = {0}; in FillPubKeyByZero() local
285 (void)memcpy_s(tmpKey + baseAddr, P_BYTES - baseAddr, pubKey, *pubKeySize); in FillPubKeyByZero()
286 (void)memcpy_s(pubKey, P_BYTES, tmpKey, P_BYTES); in FillPubKeyByZero()
295 uint8_t tmpKey[P_BYTES] = {0}; in BnOperationOfPubKeyConversion() local
320 if (BN_bn2bin(var->c, tmpKey) <= 0) { in BnOperationOfPubKeyConversion()
324 HKS_IF_NOT_SUCC_BREAK(FillPubKeyByZero(tmpKey, &tmpSize)) in BnOperationOfPubKeyConversion()
325 SwapEndianThirtyTwoByte(tmpKey, tmpSize, true); in BnOperationOfPubKeyConversion()
326 if (memcpy_s(keyOut->data, keyOut->size, tmpKey, tmpSize) != EOK) { in BnOperationOfPubKeyConversion()
333 (void)memset_s(tmpKey, P_BYTES, 0, P_BYTES); in BnOperationOfPubKeyConversion()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dopenssl_hmac_helper.c28 uint8_t *tmpKey = (uint8_t *)malloc(keySizeByte); in HmacGenerateKey() local
29 if (tmpKey == NULL) { in HmacGenerateKey()
33 if (RAND_bytes(tmpKey, keySizeByte) != 1) { in HmacGenerateKey()
34 free(tmpKey); in HmacGenerateKey()
38 key->data = tmpKey; in HmacGenerateKey()
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_cross_test.cpp167 char tmpKey[] = "HksCrossTestRsaCipher001_new"; variable
168 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey };
215 char tmpKey[] = "HksCrossTestRsaCipher002_new"; variable
216 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey };
265 char tmpKey[] = "HksCrossTestDsaSignVerify001_new"; variable
266 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey };
309 char tmpKey[] = "HksCrossTestDsaSignVerify002_new"; variable
310 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey };
356 char tmpKey[] = "HksCrossTestEccSignVerify001_new"; variable
357 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey };
[all …]
Dhks_check_auth_part_test.cpp387 char tmpKey[] = "NewKeyAlias"; in CheckImportAuthTest() local
388 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey }; in CheckImportAuthTest()
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/asymmetric_alg_test/
Dhks_rsa_cipher_test_common.cpp125 char tmpKey[] = "RSA_Encrypt_Decrypt_KeyAlias"; in HksRsaCipherTestCase() local
126 …struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = reinterpret_cast<uint8_t *>(tmpKey)… in HksRsaCipherTestCase()
161 char tmpKey[] = "RSA_Encrypt_Decrypt_KeyAlias"; in HksRsaCipherTestCaseAbnormal() local
162 …struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = reinterpret_cast<uint8_t *>(tmpKey)… in HksRsaCipherTestCaseAbnormal()
Dhks_rsa_cipher_part5_test.cpp339 char tmpKey[] = "RSA_Encrypt_Decrypt_KeyAlias"; variable
340 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey };
412 char tmpKey[] = "RSA_Encrypt_Decrypt_KeyAlias"; variable
413 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey };
466 char tmpKey[] = "RSA_Encrypt_Decrypt_KeyAlias"; variable
467 struct HksBlob newKeyAlias = { .size = strlen(tmpKey), .data = (uint8_t *)tmpKey };
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_keyblob_lite.c278 struct HksBlob tmpKey = { 0, NULL }; in GetRawKeyMaterial() local
279 int32_t ret = HksBlobInit(&tmpKey, keyInfo->keySize); in GetRawKeyMaterial()
282 ret = DecryptKeyBlob(key, &tmpKey); in GetRawKeyMaterial()
285 HKS_FREE_BLOB(tmpKey); in GetRawKeyMaterial()
290 ret = Ed25519BlobToKeyMaterial(&tmpKey, rawKey); in GetRawKeyMaterial()
292 ret = CopyKey(&tmpKey, rawKey); in GetRawKeyMaterial()
296 (void)memset_s(tmpKey.data, tmpKey.size, 0, tmpKey.size); in GetRawKeyMaterial()
297 HKS_FREE_BLOB(tmpKey); in GetRawKeyMaterial()
Dhks_keyblob.c343 struct HksBlob tmpKey = { 0, NULL }; in BuildKeyBlobWithKeyParam() local
352 ret = InitKeyBlobInfo(key, &tmpKey); in BuildKeyBlobWithKeyParam()
355 ret = AddCoreServiceParams(&tmpKey, keyFlag, newParamSet); in BuildKeyBlobWithKeyParam()
363 if (tmpKey.data != NULL) { in BuildKeyBlobWithKeyParam()
364 (void)memset_s(tmpKey.data, tmpKey.size, 0, tmpKey.size); in BuildKeyBlobWithKeyParam()
365 HKS_FREE_PTR(tmpKey.data); in BuildKeyBlobWithKeyParam()
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/src/
Ddlp_crypt.cpp74 uint8_t* tmpKey = new (std::nothrow) uint8_t[keySizeByte]; in DlpOpensslGenerateRandomKey() local
75 if (tmpKey == nullptr) { in DlpOpensslGenerateRandomKey()
80 int res = RAND_bytes(tmpKey, keySizeByte); in DlpOpensslGenerateRandomKey()
83 (void)memset_s(tmpKey, keySizeByte, 0, keySizeByte); in DlpOpensslGenerateRandomKey()
84 delete[] tmpKey; in DlpOpensslGenerateRandomKey()
87 key->data = tmpKey; in DlpOpensslGenerateRandomKey()