Home
last modified time | relevance | path

Searched refs:paramSet (Results 1 – 24 of 24) sorted by relevance

/test/xts/acts/security_lite/huks/common/
Dhks_test_curve25519.c36 struct HksParamSet *paramSet = NULL; in TestGenerateEd25519Key() local
37 int32_t ret = HksInitParamSet(&paramSet); in TestGenerateEd25519Key()
42 ret = HksAddParams(paramSet, &algParam, 1); in TestGenerateEd25519Key()
47 ret = HksAddParams(paramSet, &keySizeParam, 1); in TestGenerateEd25519Key()
52 ret = HksAddParams(paramSet, &purposeParam, 1); in TestGenerateEd25519Key()
57 ret = HksAddParams(paramSet, &digestParam, 1); in TestGenerateEd25519Key()
62 ret = HksAddParams(paramSet, &paddingParam, 1); in TestGenerateEd25519Key()
64 ret = HksBuildParamSet(&paramSet); in TestGenerateEd25519Key()
66 ret = HksGenerateKey(&alias, paramSet, NULL); in TestGenerateEd25519Key()
68 HksFreeParamSet(&paramSet); in TestGenerateEd25519Key()
[all …]
Dhks_test_aes.c37 struct HksParamSet **paramSet) in ConstructParamSetEncryptDecryptAesPre() argument
39 int32_t ret = HksInitParamSet(paramSet); in ConstructParamSetEncryptDecryptAesPre()
49 ret = HksAddParams(*paramSet, (const struct HksParam *)&algParam, 1); in ConstructParamSetEncryptDecryptAesPre()
58 ret = HksAddParams(*paramSet, (const struct HksParam *)&modeParam, 1); in ConstructParamSetEncryptDecryptAesPre()
67 ret = HksAddParams(*paramSet, (const struct HksParam *)&padParam, 1); in ConstructParamSetEncryptDecryptAesPre()
80 ret = HksAddParams(*paramSet, (const struct HksParam *)&purposeParam, 1); in ConstructParamSetEncryptDecryptAesPre()
89 static int32_t ConstructParamSetEncryptDecryptAesPost(uint32_t mode, struct HksParamSet **paramSet) in ConstructParamSetEncryptDecryptAesPost() argument
97 ret = HksAddParams(*paramSet, (const struct HksParam *)&aadParam, 1); in ConstructParamSetEncryptDecryptAesPost()
108 ret = HksAddParams(*paramSet, (const struct HksParam *)&ivParam, 1); in ConstructParamSetEncryptDecryptAesPost()
118 ret = HksAddParams(*paramSet, (const struct HksParam *)&nonceParam, 1); in ConstructParamSetEncryptDecryptAesPost()
[all …]
Dhks_test_common.c96 struct HksParamSet *paramSet) in TestGenerateKeyParamSetPre() argument
107 ret = HksAddParams(paramSet, (const struct HksParam *)&algParam, 1); in TestGenerateKeyParamSetPre()
115 ret = HksAddParams(paramSet, (const struct HksParam *)&keySizeParam, 1); in TestGenerateKeyParamSetPre()
123 ret = HksAddParams(paramSet, (const struct HksParam *)&purposeParam, 1); in TestGenerateKeyParamSetPre()
131 ret = HksAddParams(paramSet, (const struct HksParam *)&digestParam, 1); in TestGenerateKeyParamSetPre()
140 ret = HksAddParams(paramSet, (const struct HksParam *)&paddingParam, 1); in TestGenerateKeyParamSetPre()
147 struct HksParamSet *paramSet) in TestGenerateKeyParamSetPost() argument
157 ret = HksAddParams(paramSet, (const struct HksParam *)&keyMode, 1); in TestGenerateKeyParamSetPost()
165 ret = HksAddParams(paramSet, (const struct HksParam *)&keyStorageFlagParam, 1); in TestGenerateKeyParamSetPost()
172 ret = HksAddParams(paramSet, (const struct HksParam *)&tmpParam, 1); in TestGenerateKeyParamSetPost()
[all …]
Dhks_test_api_performance.c42 int32_t HksEncryptRun(const struct HksBlob *key, const struct HksParamSet *paramSet, in HksEncryptRun() argument
57 ret = HksEncrypt(key, paramSet, plainText, cipherText); in HksEncryptRun()
65 int32_t HksDecryptRun(const struct HksBlob *key, const struct HksParamSet *paramSet, in HksDecryptRun() argument
79 ret = HksDecrypt(key, paramSet, cipherText, plainText); in HksDecryptRun()
87 int32_t HksMacRun(const struct HksBlob *key, const struct HksParamSet *paramSet, in HksMacRun() argument
101 ret = HksMac(key, paramSet, srcData, mac); in HksMacRun()
109 int32_t HksDeriveKeyRun(const struct HksParamSet *paramSet, const struct HksBlob *masterKey, in HksDeriveKeyRun() argument
123 ret = HksDeriveKey(paramSet, masterKey, derivedKey); in HksDeriveKeyRun()
170 int32_t HksAgreeKeyRun(const struct HksParamSet *paramSet, const struct HksBlob *privateKey, in HksAgreeKeyRun() argument
184 ret = HksAgreeKey(paramSet, privateKey, peerPublicKey, agreedKey); in HksAgreeKeyRun()
[all …]
/test/xts/acts/security/huks_napi_BasicTest/src/
Dhuks_attest_test_common.cpp75 struct OH_Huks_ParamSet *paramSet = nullptr; in TestGenerateKey() local
76 OH_Huks_Result ret = OH_Huks_InitParamSet(&paramSet); in TestGenerateKey()
81 ret = OH_Huks_AddParams(paramSet, tmpParams, sizeof(tmpParams) / sizeof(tmpParams[0])); in TestGenerateKey()
83 OH_Huks_FreeParamSet(&paramSet); in TestGenerateKey()
87 ret = OH_Huks_BuildParamSet(&paramSet); in TestGenerateKey()
89 OH_Huks_FreeParamSet(&paramSet); in TestGenerateKey()
93 ret = OH_Huks_GenerateKeyItem(keyAlias, paramSet, nullptr); in TestGenerateKey()
94 OH_Huks_FreeParamSet(&paramSet); in TestGenerateKey()
135 OH_Huks_Result GenerateParamSet(struct OH_Huks_ParamSet **paramSet, const struct OH_Huks_Param tmpP… in GenerateParamSet() argument
137 OH_Huks_Result ret = OH_Huks_InitParamSet(paramSet); in GenerateParamSet()
[all …]
Dhuks_three_stage_test_common.cpp30 struct OH_Huks_ParamSet **paramSet, in InitParamSet() argument
34 OH_Huks_Result ret = OH_Huks_InitParamSet(paramSet); in InitParamSet()
40 ret = OH_Huks_AddParams(*paramSet, params, paramcount); in InitParamSet()
43 OH_Huks_FreeParamSet(paramSet); in InitParamSet()
47 ret = OH_Huks_BuildParamSet(paramSet); in InitParamSet()
50 OH_Huks_FreeParamSet(paramSet); in InitParamSet()
59 const struct OH_Huks_ParamSet *paramSet, in TestLessThanMaxSeg() argument
74 ret = OH_Huks_UpdateSession(handle, paramSet, inData, &tmpOutData); in TestLessThanMaxSeg()
92 ret = OH_Huks_FinishSession(handle, paramSet, outData, &tmpInData); in TestLessThanMaxSeg()
96 ret = OH_Huks_FinishSession(handle, paramSet, &tmpInData, outData); in TestLessThanMaxSeg()
[all …]
Dhuks_attest_test.cpp77 struct OH_Huks_ParamSet *paramSet = NULL; variable
78 … GenerateParamSet(&paramSet, g_commonParams, sizeof(g_commonParams) / sizeof(g_commonParams[0]));
82 ret = OH_Huks_AttestKeyItem(&g_keyAlias, paramSet, certChain);
89 OH_Huks_FreeParamSet(&paramSet);
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()
34 ret = OH_Huks_GetParam(paramSet, OH_HUKS_TAG_PURPOSE, &tmpParam); in HksTestSignVerify()
39 ret = TestUpdateFinish(&handle, paramSet, tmpParam->uint32Param, inData, outData); in HksTestSignVerify()
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()
68 ret = OH_Huks_GetParam(paramSet, OH_HUKS_TAG_PURPOSE, &tmpParam); in HksTestSignVerify()
73 ret = TestUpdateFinish(&handle, paramSet, tmpParam->uint32Param, inData, outData); in HksTestSignVerify()
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()
106 ret = OH_Huks_GetParam(paramSet, OH_HUKS_TAG_PURPOSE, &tmpParam); in HksTestSignVerify()
111 ret = TestUpdateFinish(&handle, paramSet, tmpParam->uint32Param, inData, outData); in HksTestSignVerify()
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()
34 ret = OH_Huks_GetParam(paramSet, OH_HUKS_TAG_PURPOSE, &tmpParam); in HksTestSignVerify()
39 ret = TestUpdateFinish(&handle, paramSet, tmpParam->uint32Param, inData, outData); in HksTestSignVerify()
Dhuks_signverify_sm2_test.cpp283 …ult HksTestSignVerify(const struct OH_Huks_Blob *keyAlias, const struct OH_Huks_ParamSet *paramSet, in HksTestSignVerify() argument
291 ret = OH_Huks_InitSession(keyAlias, paramSet, &handle, nullptr); in HksTestSignVerify()
297 ret = OH_Huks_GetParam(paramSet, OH_HUKS_TAG_PURPOSE, &tmpParam); in HksTestSignVerify()
302 ret = TestUpdateFinish(&handle, paramSet, tmpParam->uint32Param, inData, outData); in HksTestSignVerify()
309 (void)OH_Huks_AbortSession(&handle, paramSet); in HksTestSignVerify()
Dhuks_misc_test.cpp250 ASSERT_EQ(sizeof(keyInfo.paramSet) == sizeof(struct OH_Huks_ParamSet *), true);
/test/xts/acts/security/huks_napi_BasicTest/include/
Dhuks_three_stage_test_common.h49 struct OH_Huks_ParamSet **paramSet,
55 const struct OH_Huks_ParamSet *paramSet,
60 const struct OH_Huks_ParamSet *paramSet,
66 const struct OH_Huks_ParamSet *paramSet,
81 const struct OH_Huks_ParamSet *paramSet,
86 const struct OH_Huks_ParamSet *paramSet,
91 const struct OH_Huks_ParamSet *paramSet,
Dhuks_signverify_ecc_test_common.h29 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, …
Dhuks_signverify_rsa_test_common.h31 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, …
Dhuks_attest_test_common.h58 OH_Huks_Result GenerateParamSet(struct OH_Huks_ParamSet **paramSet, const struct OH_Huks_Param tmpP…
/test/xts/acts/security_lite/huks/common/include/
Dhks_test_api_performance.h30 int32_t HksEncryptRun(const struct HksBlob *key, const struct HksParamSet *paramSet,
33 int32_t HksDecryptRun(const struct HksBlob *key, const struct HksParamSet *paramSet,
36 int32_t HksMacRun(const struct HksBlob *key, const struct HksParamSet *paramSet,
39 int32_t HksDeriveKeyRun(const struct HksParamSet *paramSet, const struct HksBlob *masterKey,
48 int32_t HksAgreeKeyRun(const struct HksParamSet *paramSet, const struct HksBlob *privateKey,
51 int32_t HksHashRun(const struct HksParamSet *paramSet,
/test/xts/acts/security_lite/huks/liteos_a_adapter/
Dhks_hash_test.cpp78 struct HksParamSet *paramSet = NULL; variable
82 int32_t ret = TestConstructHashParamSet(&paramSet,
101 ret = HksHashRun(paramSet, srcData, hash, 1);
107 HksFreeParamSet(&paramSet);
Dhks_generate_key_test.cpp92 struct HksParamSet *paramSet = NULL; variable
93 struct GenerateKeyParamSetStructure paramStruct = { &paramSet,
112 ret = HksGenerateKeyRun(keyAlias, paramSet, paramSetOut, performTimes);
124 HksFreeParamSet(&paramSet);
/test/xts/acts/security_lite/huks/liteos_m_adapter/
Dhks_mac_test.c124 struct HksParamSet *paramSet = NULL; in ConstructParamSet() local
125 int32_t ret = HksInitParamSet(&paramSet); in ConstructParamSet()
130 ret = HksAddParams(paramSet, inParam, inParamNum); in ConstructParamSet()
132 HksFreeParamSet(&paramSet); in ConstructParamSet()
136 ret = HksBuildParamSet(&paramSet); in ConstructParamSet()
138 HksFreeParamSet(&paramSet); in ConstructParamSet()
142 *out = paramSet; in ConstructParamSet()
158 struct HksParamSet *paramSet = NULL; in BaseTestMacAnswer() local
171 int32_t ret = ConstructParamSet(&paramSet, hmacParam, CAL_ARRAY_SIZE(hmacParam)); in BaseTestMacAnswer()
175 ret = HksMac(&keyBlob, paramSet, &srcBlob, &hmacBlob); in BaseTestMacAnswer()
[all …]
Dhks_generate_key_test.c117 struct HksParamSet *paramSet = NULL; in ExecHksGenerateKeyTest001() local
118 struct GenerateKeyParamSetStructure paramStruct = { &paramSet, in ExecHksGenerateKeyTest001()
137 ret = HksGenerateKeyRun(keyAlias, paramSet, paramSetOut, performTimes); in ExecHksGenerateKeyTest001()
149 HksFreeParamSet(&paramSet); in ExecHksGenerateKeyTest001()
Dhks_hash_test.c113 struct HksParamSet *paramSet = NULL; in ExecHksHashTestCommon() local
117 int32_t ret = TestConstructHashParamSet(&paramSet, in ExecHksHashTestCommon()
136 ret = HksHashRun(paramSet, srcData, hash, 1); in ExecHksHashTestCommon()
142 HksFreeParamSet(&paramSet); in ExecHksHashTestCommon()
/test/xts/device_attest/services/core/security/
Dattest_security.c242 static int32_t InitHksParamSet(struct HksParamSet** paramSet, const struct HksParam *params, uint32… in InitHksParamSet() argument
244 if (paramSet == NULL || params == NULL || paramcount == 0) { in InitHksParamSet()
248 int32_t ret = HksInitParamSet(paramSet); in InitHksParamSet()
254 ret = HksAddParams(*paramSet, params, paramcount); in InitHksParamSet()
257 HksFreeParamSet(paramSet); in InitHksParamSet()
261 ret = HksBuildParamSet(paramSet); in InitHksParamSet()
264 HksFreeParamSet(paramSet); in InitHksParamSet()