Home
last modified time | relevance | path

Searched refs:keyAlias (Results 1 – 25 of 61) sorted by relevance

123

/test/xts/acts/security_lite/huks/liteos_a_adapter/
Dhks_exist_test.cpp71 struct HksBlob *keyAlias = NULL; variable
73 HKS_TEST_ASSERT(TestGenDefaultKeyAndGetAlias(&keyAlias) == 0);
74 ret = HksKeyExistRun(keyAlias, 1);
76 HKS_TEST_ASSERT(HksDeleteKey(keyAlias, NULL) == HKS_SUCCESS);
78 ret = TestConstuctBlob(&keyAlias,
84 ret = HksKeyExistRun(keyAlias, 1);
90 TestFreeBlob(&keyAlias);
Dhks_delete_test.cpp71 struct HksBlob *keyAlias = NULL; variable
73 HKS_TEST_ASSERT(TestGenDefaultKeyAndGetAlias(&keyAlias) == 0);
75 ret = TestConstuctBlob(&keyAlias,
83 ret = HksDeleteKeyRun(keyAlias, 1);
86 TestFreeBlob(&keyAlias);
Dhks_derive_test.cpp150 struct HksBlob *keyAlias = NULL; in BaseTestDerive() local
154 ret = GenerateLocalRandomKey(&keyAlias, &g_testDeriveParams[index].localKeyParams); in BaseTestDerive()
157 ret = HuksGenerateKey(&keyAlias, &g_testDeriveParams[index].keyAliasParams, in BaseTestDerive()
160 ret = TestConstuctBlob(&keyAlias, in BaseTestDerive()
180 …ret = DeriveKey(&g_testDeriveParams[index].deriveParamSetParams, keyAlias, derivedKey, &saltData, … in BaseTestDerive()
190 HKS_TEST_ASSERT(HksDeleteKey(keyAlias, NULL) == 0); in BaseTestDerive()
192 TestFreeBlob(&keyAlias); in BaseTestDerive()
Dhks_generate_key_test.cpp84 struct HksBlob *keyAlias = NULL; variable
85 int32_t ret = TestConstuctBlob(&keyAlias,
112 ret = HksGenerateKeyRun(keyAlias, paramSet, paramSetOut, performTimes);
121 HKS_TEST_ASSERT(HksDeleteKey(keyAlias, NULL) == 0);
123 TestFreeBlob(&keyAlias);
/test/xts/acts/security/security_huks_basic/utils/param/signverify/
DpublicSignverifyPromise.js24 async function publicGenerateKeyFunc(keyAlias, HuksOptions) { argument
26 .generateKey(keyAlias, HuksOptions)
37 async function publicImportKey(keyAlias, HuksOptions) { argument
41 .importKey(keyAlias, HuksOptions)
52 async function publicExportKey(keyAlias, HuksOptions) { argument
54 .exportKey(keyAlias, HuksOptions)
65 async function publicInitFunc(keyAlias, HuksOptions) { argument
67 .init(keyAlias, HuksOptions)
162 let keyAlias = srcKeyAlies;
171 await publicGenerateKeyFunc(keyAlias, HuksOptions);
[all …]
DpublicSignverifyCallback.js24 async function publicGenerateKeyFunc(keyAlias, HuksOptions) { argument
25 await generateKey(keyAlias, HuksOptions)
50 async function publicImportKey(keyAlias, HuksOptions) { argument
53 await importKey(keyAlias, HuksOptions)
78 async function publicExportKey(keyAlias, HuksOptions) { argument
79 await exportkey(keyAlias, HuksOptions)
104 async function publicInitFunc(keyAlias, HuksOptions) { argument
105 await init(keyAlias, HuksOptions)
261 let keyAlias = srcKeyAlies;
270 await publicGenerateKeyFunc(keyAlias, HuksOptions);
[all …]
/test/xts/acts/security/huks_napi_BasicTest/src/
Dhuks_cipher_aes_test_common.cpp24 const struct OH_Huks_Blob *keyAlias, in HksAesCipherTestEncrypt() argument
29 … OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksAesCipherTestEncrypt()
48 const struct OH_Huks_Blob *keyAlias, in HksAesCipherTestDecrypt() argument
54 … OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, decryptParamSet, &handleDecrypt, nullptr); in HksAesCipherTestDecrypt()
73 const struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *genParamSet, in HksAesCipherTestCaseOther() argument
90 ret = OH_Huks_GenerateKeyItem(keyAlias, genParamSet, nullptr); in HksAesCipherTestCaseOther()
100 ret = HksAesCipherTestEncrypt(keyAlias, encryptParamSet, &inData, &cipherText); in HksAesCipherTestCaseOther()
106 ret = HksAesCipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, &inData); in HksAesCipherTestCaseOther()
110 …EXPECT_EQ(OH_Huks_DeleteKeyItem(keyAlias, genParamSet).errorCode, (int32_t)OH_HUKS_SUCCESS) << "De… in HksAesCipherTestCaseOther()
115 const struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *genParamSet, in HksAesCipherTestCaseGcm2() argument
[all …]
Dhuks_cipher_rsa_test_common.cpp20 …ks_Result Unittest::RsaCipher::HksRsaCipherTestEncryptAbnormal(const struct OH_Huks_Blob *keyAlias, in HksRsaCipherTestEncryptAbnormal() argument
25 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksRsaCipherTestEncryptAbnormal()
44 OH_Huks_Result Unittest::RsaCipher::HksRsaCipherTestEncrypt(const struct OH_Huks_Blob *keyAlias, in HksRsaCipherTestEncrypt() argument
49 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksRsaCipherTestEncrypt()
65 OH_Huks_Result Unittest::RsaCipher::HksRsaCipherTestDecrypt(const struct OH_Huks_Blob *keyAlias, in HksRsaCipherTestDecrypt() argument
71 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, decryptParamSet, &handleDecrypt, nullptr); in HksRsaCipherTestDecrypt()
87 OH_Huks_Result Unittest::RsaCipher::HksRsaCipherTestCase(const struct OH_Huks_Blob *keyAlias, struc… in HksRsaCipherTestCase() argument
91 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(keyAlias, genParamSet, nullptr); in HksRsaCipherTestCase()
97 ret = OH_Huks_ExportPublicKeyItem(keyAlias, genParamSet, &publicKey); in HksRsaCipherTestCase()
113 ret = HksRsaCipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, inData); in HksRsaCipherTestCase()
[all …]
Dhuks_cipher_sm4_test_common.cpp21 static OH_Huks_Result HksSm4CipherTestEncrypt(const struct OH_Huks_Blob *keyAlias, in HksSm4CipherTestEncrypt() argument
26 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksSm4CipherTestEncrypt()
42 static OH_Huks_Result HksSm4CipherTestDecrypt(const struct OH_Huks_Blob *keyAlias, in HksSm4CipherTestDecrypt() argument
48 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, decryptParamSet, &handleDecrypt, nullptr); in HksSm4CipherTestDecrypt()
63 OH_Huks_Result HksSm4CipherTestCaseOther(const struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamS… in HksSm4CipherTestCaseOther() argument
80 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(keyAlias, genParamSet, nullptr); in HksSm4CipherTestCaseOther()
88 ret = HksSm4CipherTestEncrypt(keyAlias, encryptParamSet, &inData, &cipherText); in HksSm4CipherTestCaseOther()
94 ret = HksSm4CipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, &inData); in HksSm4CipherTestCaseOther()
98 …EXPECT_EQ(OH_Huks_DeleteKeyItem(keyAlias, genParamSet).errorCode, (int32_t)OH_HUKS_SUCCESS) << "De… in HksSm4CipherTestCaseOther()
Dhuks_hmac_test.cpp106 static OH_Huks_Result HksHmacTestCase(const struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet … in HksHmacTestCase() argument
112 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(keyAlias, genParamSet, nullptr); in HksHmacTestCase()
121 ret = OH_Huks_InitSession(keyAlias, hmacParamSet, &handleHMAC, nullptr); in HksHmacTestCase()
124 OH_Huks_DeleteKeyItem(keyAlias, genParamSet); in HksHmacTestCase()
132 OH_Huks_DeleteKeyItem(keyAlias, genParamSet); in HksHmacTestCase()
137 ret = OH_Huks_DeleteKeyItem(keyAlias, genParamSet); in HksHmacTestCase()
150 struct OH_Huks_Blob keyAlias = { strlen(tmpKeyAlias), (uint8_t *)tmpKeyAlias }; variable
158 ret = HksHmacTestCase(&keyAlias, genParamSet, hmacParamSet);
173 struct OH_Huks_Blob keyAlias = { strlen(tmpKeyAlias), (uint8_t *)tmpKeyAlias }; variable
181 ret = HksHmacTestCase(&keyAlias, genParamSet, hmacParamSet);
Dhuks_signverify_sm2_test.cpp283 static OH_Huks_Result HksTestSignVerify(const struct OH_Huks_Blob *keyAlias, const struct OH_Huks_P… in HksTestSignVerify() argument
291 ret = OH_Huks_InitSession(keyAlias, paramSet, &handle, nullptr); in HksTestSignVerify()
313 …sult CreateImportKeyAlias(struct OH_Huks_Blob *importKeyAlias, const struct OH_Huks_Blob *keyAlias) in CreateImportKeyAlias() argument
318 importKeyAlias->size = keyAlias->size + strlen(tmp); in CreateImportKeyAlias()
325 … if (memcpy_s(importKeyAlias->data, importKeyAlias->size, keyAlias->data, keyAlias->size) != EOK) { in CreateImportKeyAlias()
331 if (memcpy_s(importKeyAlias->data + keyAlias->size, in CreateImportKeyAlias()
332 importKeyAlias->size - keyAlias->size, tmp, strlen(tmp)) != EOK) { in CreateImportKeyAlias()
350 static OH_Huks_Result HksSm2SignVerifyTestRun(const struct OH_Huks_Blob *keyAlias, const uint32_t g… in HksSm2SignVerifyTestRun() argument
365 OH_Huks_Result ret = CreateImportKeyAlias(&importKeyAlias, keyAlias); in HksSm2SignVerifyTestRun()
373 ret = OH_Huks_GenerateKeyItem(keyAlias, genParamSet, nullptr); in HksSm2SignVerifyTestRun()
[all …]
Dhuks_signverify_dsa_test.cpp94 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, … in HksTestSignVerify() argument
99 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, paramSet, &handle, nullptr); in HksTestSignVerify()
120 OH_Huks_Result HksDsaSignVerifyTestNormalCase(struct OH_Huks_Blob keyAlias, struct OH_Huks_ParamSet… in HksDsaSignVerifyTestNormalCase() argument
129 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr); in HksDsaSignVerifyTestNormalCase()
135 ret = HksTestSignVerify(&keyAlias, signParamSet, &inData, &outDataSign, true); in HksDsaSignVerifyTestNormalCase()
141 ret = OH_Huks_ExportPublicKeyItem(&keyAlias, genParamSet, &publicKey); in HksDsaSignVerifyTestNormalCase()
174 struct OH_Huks_Blob keyAlias = { strlen(keyAliasString), (uint8_t *)keyAliasString }; variable
183 … ret = HksDsaSignVerifyTestNormalCase(keyAlias, genParamSet, signParamSet, verifyParamSet);
187 ret = OH_Huks_DeleteKeyItem(&keyAlias, genParamSet);
Dhuks_derive_hkdf_test_common.cpp22 OH_Huks_Result HksHkdfDeriveTestNormalCase(const struct OH_Huks_Blob keyAlias, in HksHkdfDeriveTestNormalCase() argument
32 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr); in HksHkdfDeriveTestNormalCase()
39 ret = OH_Huks_InitSession(&keyAlias, deriveParamSet, &handleDerive, nullptr); in HksHkdfDeriveTestNormalCase()
55 OH_Huks_Result HksHkdfDeriveTestCmpCase(const struct OH_Huks_Blob keyAlias, in HksHkdfDeriveTestCmpCase() argument
65 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr); in HksHkdfDeriveTestCmpCase()
72 ret = OH_Huks_InitSession(&keyAlias, deriveParamSet, &handleDerive, nullptr); in HksHkdfDeriveTestCmpCase()
Dhuks_signverify_ecc_test_common.cpp22 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, in HksTestSignVerify() argument
27 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, paramSet, &handle, nullptr); in HksTestSignVerify()
47 OH_Huks_Result HksEccSignVerifyTestNormalCase(struct OH_Huks_Blob keyAlias, in HksEccSignVerifyTestNormalCase() argument
57 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr); in HksEccSignVerifyTestNormalCase()
63 ret = HksTestSignVerify(&keyAlias, signParamSet, &inData, &outDataSign, true); in HksEccSignVerifyTestNormalCase()
69 ret = OH_Huks_ExportPublicKeyItem(&keyAlias, genParamSet, &publicKey); in HksEccSignVerifyTestNormalCase()
Dhuks_derive_pbkdf_test_common.cpp22 OH_Huks_Result HksPbkdf2DeriveTestNormalCase(const struct OH_Huks_Blob keyAlias, in HksPbkdf2DeriveTestNormalCase() argument
32 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr); in HksPbkdf2DeriveTestNormalCase()
39 ret = OH_Huks_InitSession(&keyAlias, deriveParamSet, &handleDerive, nullptr); in HksPbkdf2DeriveTestNormalCase()
55 OH_Huks_Result HksPbkdf2DeriveTestCmpCase(const struct OH_Huks_Blob keyAlias, in HksPbkdf2DeriveTestCmpCase() argument
65 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr); in HksPbkdf2DeriveTestCmpCase()
72 ret = OH_Huks_InitSession(&keyAlias, deriveParamSet, &handleDerive, nullptr); in HksPbkdf2DeriveTestCmpCase()
Dhuks_signverify_ed25519_test.cpp56 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, … in HksTestSignVerify() argument
61 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, paramSet, &handle, nullptr); in HksTestSignVerify()
104 struct OH_Huks_Blob keyAlias = { strlen(keyAliasString), (uint8_t *)keyAliasString }; variable
107 ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr);
113 ret = HksTestSignVerify(&keyAlias, signParamSet, &g_inData, &outDataSign, true);
119 ret = OH_Huks_ExportPublicKeyItem(&keyAlias, genParamSet, &publicKey);
133 …EXPECT_EQ(OH_Huks_DeleteKeyItem(&keyAlias, genParamSet).errorCode, (int32_t)OH_HUKS_SUCCESS) << "D…
Dhuks_signverify_rsa_test_common.cpp22 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, in HksTestSignVerify() argument
27 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, paramSet, &handle, nullptr); in HksTestSignVerify()
48 OH_Huks_Result HksRsaSignVerifyTestNormalCase(struct OH_Huks_Blob keyAlias, in HksRsaSignVerifyTestNormalCase() argument
57 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr); in HksRsaSignVerifyTestNormalCase()
64 ret = OH_Huks_InitSession(&keyAlias, signParamSet, &handleSign, nullptr); in HksRsaSignVerifyTestNormalCase()
78 ret = OH_Huks_ExportPublicKeyItem(&keyAlias, genParamSet, &publicKey); in HksRsaSignVerifyTestNormalCase()
109 OH_Huks_Result HksRSASignVerifyTestAbnormalCase(struct OH_Huks_Blob keyAlias, in HksRSASignVerifyTestAbnormalCase() argument
120 OH_Huks_Result ret = OH_Huks_GenerateKeyItem(&keyAlias, genParamSet, nullptr); in HksRSASignVerifyTestAbnormalCase()
127 ret = OH_Huks_InitSession(&keyAlias, signParamSet, &handleSign, nullptr); in HksRSASignVerifyTestAbnormalCase()
143 ret = OH_Huks_ExportPublicKeyItem(&keyAlias, genParamSet, &publicKey); in HksRSASignVerifyTestAbnormalCase()
/test/xts/acts/security/security_huks_reformed_test/utils/param/signverify/
DpublicSignverifyPromise.js24 async function publicGenerateKeyItem(keyAlias, HuksOptions) { argument
27 await huks.generateKeyItem(keyAlias, HuksOptions)
41 async function publicImportKeyFunc(keyAlias, HuksOptions) { argument
46 await huks.importKeyItem(keyAlias, HuksOptions)
61 async function publicExportKeyFunc(keyAlias, HuksOptions) { argument
64 await huks.exportKeyItem(keyAlias, HuksOptions)
79 async function publicInitSessionFunc(keyAlias, HuksOptions) { argument
82 await huks.initSession(keyAlias, HuksOptions)
198 let keyAlias = srcKeyAlies;
207 await publicGenerateKeyItem(keyAlias, HuksOptions);
[all …]
DpublicSignverifyCallback.js24 async function publicGenerateKeyItemFunc(keyAlias, huksOptions) { argument
27 await generateKeyItem(keyAlias, huksOptions)
41 function generateKeyItem(keyAlias, huksOptions) { argument
44 huks.generateKeyItem(keyAlias, huksOptions, function (error, data) {
57 async function publicImportKeyItem(keyAlias, huksOptions) { argument
62 await importKeyItem(keyAlias, huksOptions)
77 function importKeyItem(keyAlias, huksOptions) { argument
80 huks.importKeyItem(keyAlias, huksOptions, function (error, data) {
322 let keyAlias = srcKeyAlies;
331 await publicGenerateKeyItemFunc(keyAlias, HuksOptions);
[all …]
/test/xts/acts/security_lite/huks/liteos_m_adapter/
Dhks_exist_test.c64 struct HksBlob *keyAlias = NULL; in ExecHksExistTest001() local
66 TEST_ASSERT_TRUE(TestGenDefaultKeyAndGetAlias(&keyAlias) == 0); in ExecHksExistTest001()
67 ret = HksKeyExistRun(keyAlias, 1); in ExecHksExistTest001()
69 TEST_ASSERT_TRUE(HksDeleteKey(keyAlias, NULL) == HKS_SUCCESS); in ExecHksExistTest001()
71 ret = TestConstuctBlob(&keyAlias, in ExecHksExistTest001()
77 ret = HksKeyExistRun(keyAlias, 1); in ExecHksExistTest001()
83 TestFreeBlob(&keyAlias); in ExecHksExistTest001()
Dhks_delete_test.c60 struct HksBlob *keyAlias = NULL; in ExecHksDeleteTest001() local
62 HKS_TEST_ASSERT(TestGenDefaultKeyAndGetAlias(&keyAlias) == 0); in ExecHksDeleteTest001()
64 ret = TestConstuctBlob(&keyAlias, in ExecHksDeleteTest001()
72 ret = HksDeleteKeyRun(keyAlias, 1); in ExecHksDeleteTest001()
75 TestFreeBlob(&keyAlias); in ExecHksDeleteTest001()
/test/xts/acts/security/huks_napi_BasicTest/include/
Dhuks_cipher_rsa_test_common.h52 OH_Huks_Result HksRsaCipherTestCase(const struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *g…
54 OH_Huks_Result HksRsaCipherTestCaseAbnormal(const struct OH_Huks_Blob *keyAlias, struct OH_Huks_Par…
56 OH_Huks_Result HksRsaCipherTestEncrypt(const struct OH_Huks_Blob *keyAlias, const struct OH_Huks_Pa…
58 OH_Huks_Result HksRsaCipherTestEncryptAbnormal(const struct OH_Huks_Blob *keyAlias, const struct OH…
60 OH_Huks_Result HksRsaCipherTestDecrypt(const struct OH_Huks_Blob *keyAlias, const struct OH_Huks_Pa…
Dhuks_cipher_aes_test_common.h40 const struct OH_Huks_Blob *keyAlias,
46 const struct OH_Huks_Blob *keyAlias,
52 const struct OH_Huks_Blob *keyAlias,
58 const struct OH_Huks_Blob *keyAlias,
Dhuks_signverify_rsa_test_common.h27 OH_Huks_Result HksRsaSignVerifyTestNormalCase(struct OH_Huks_Blob keyAlias, struct OH_Huks_ParamSet…
29 OH_Huks_Result HksRSASignVerifyTestAbnormalCase(struct OH_Huks_Blob keyAlias, struct OH_Huks_ParamS…
31 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, …
/test/xts/acts/security_lite/huks/common/
Dhks_test_cipher.c522 …ret = HksEncryptRun(encryptStruct->keyAlias, encryptParamSet, encryptStruct->plainData, encryptStr… in Encrypt()
574 ret = HksDecryptRun(decryptStruct->keyAlias, decryptParamSet, decryptStruct->cipherData, in DecryptCipher()
626 ret = HksDecryptRun(onlyDecryptStruct->keyAlias, decryptParamSet, onlyDecryptStruct->cipherData, in Decrypt()
636 struct HksBlob *keyAlias = NULL; in BaseTestCipher() local
640 ret = GenerateLocalRandomKey(&keyAlias, &g_testCipherParams[index].localKeyParams); in BaseTestCipher()
642 ret = HuksGenerateKey(&keyAlias, &g_testCipherParams[index].keyAliasParams, in BaseTestCipher()
656 keyAlias, &g_testCipherParams[index].encryptParamSetParams, in BaseTestCipher()
665 keyAlias, &g_testCipherParams[index], cipherData, in BaseTestCipher()
675 HKS_TEST_ASSERT(HksDeleteKey(keyAlias, NULL) == 0); in BaseTestCipher()
677 TestFreeBlob(&keyAlias); in BaseTestCipher()
[all …]

123