/test/xts/acts/security_lite/huks/common/ |
D | hks_test_curve25519.c | 36 struct HksParamSet *paramSet = NULL; in TestGenerateEd25519Key() local 37 int32_t ret = HksInitParamSet(¶mSet); 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(¶mSet); in TestGenerateEd25519Key() 66 ret = HksGenerateKey(&alias, paramSet, NULL); in TestGenerateEd25519Key() 68 HksFreeParamSet(¶mSet); in TestGenerateEd25519Key() [all …]
|
D | hks_test_aes.c | 37 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 …]
|
D | hks_test_common.c | 96 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 …]
|
D | hks_test_api_performance.c | 42 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/ |
D | huks_attest_test_common.cpp | 75 struct OH_Huks_ParamSet *paramSet = nullptr; in TestGenerateKey() local 76 OH_Huks_Result ret = OH_Huks_InitParamSet(¶mSet); in TestGenerateKey() 81 ret = OH_Huks_AddParams(paramSet, tmpParams, sizeof(tmpParams) / sizeof(tmpParams[0])); in TestGenerateKey() 83 OH_Huks_FreeParamSet(¶mSet); in TestGenerateKey() 87 ret = OH_Huks_BuildParamSet(¶mSet); in TestGenerateKey() 89 OH_Huks_FreeParamSet(¶mSet); in TestGenerateKey() 93 ret = OH_Huks_GenerateKeyItem(keyAlias, paramSet, nullptr); in TestGenerateKey() 94 OH_Huks_FreeParamSet(¶mSet); 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 …]
|
D | huks_three_stage_test_common.cpp | 30 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 …]
|
D | huks_attest_test.cpp | 77 struct OH_Huks_ParamSet *paramSet = NULL; variable 78 … GenerateParamSet(¶mSet, g_commonParams, sizeof(g_commonParams) / sizeof(g_commonParams[0])); 82 ret = OH_Huks_AttestKeyItem(&g_keyAlias, paramSet, certChain); 89 OH_Huks_FreeParamSet(¶mSet);
|
D | huks_signverify_ecc_test_common.cpp | 22 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()
|
D | huks_signverify_ed25519_test.cpp | 56 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()
|
D | huks_signverify_dsa_test.cpp | 94 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()
|
D | huks_signverify_rsa_test_common.cpp | 22 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()
|
D | huks_signverify_sm2_test.cpp | 283 …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()
|
D | huks_misc_test.cpp | 250 ASSERT_EQ(sizeof(keyInfo.paramSet) == sizeof(struct OH_Huks_ParamSet *), true);
|
/test/xts/acts/security/huks_napi_BasicTest/include/ |
D | huks_three_stage_test_common.h | 49 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,
|
D | huks_signverify_ecc_test_common.h | 29 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, …
|
D | huks_signverify_rsa_test_common.h | 31 OH_Huks_Result HksTestSignVerify(struct OH_Huks_Blob *keyAlias, struct OH_Huks_ParamSet *paramSet, …
|
D | huks_attest_test_common.h | 58 OH_Huks_Result GenerateParamSet(struct OH_Huks_ParamSet **paramSet, const struct OH_Huks_Param tmpP…
|
/test/xts/acts/security_lite/huks/common/include/ |
D | hks_test_api_performance.h | 30 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/ |
D | hks_hash_test.cpp | 78 struct HksParamSet *paramSet = NULL; variable 82 int32_t ret = TestConstructHashParamSet(¶mSet, 101 ret = HksHashRun(paramSet, srcData, hash, 1); 107 HksFreeParamSet(¶mSet);
|
D | hks_generate_key_test.cpp | 92 struct HksParamSet *paramSet = NULL; variable 93 struct GenerateKeyParamSetStructure paramStruct = { ¶mSet, 112 ret = HksGenerateKeyRun(keyAlias, paramSet, paramSetOut, performTimes); 124 HksFreeParamSet(¶mSet);
|
/test/xts/acts/security_lite/huks/liteos_m_adapter/ |
D | hks_mac_test.c | 124 struct HksParamSet *paramSet = NULL; in ConstructParamSet() local 125 int32_t ret = HksInitParamSet(¶mSet); in ConstructParamSet() 130 ret = HksAddParams(paramSet, inParam, inParamNum); in ConstructParamSet() 132 HksFreeParamSet(¶mSet); in ConstructParamSet() 136 ret = HksBuildParamSet(¶mSet); in ConstructParamSet() 138 HksFreeParamSet(¶mSet); in ConstructParamSet() 142 *out = paramSet; in ConstructParamSet() 158 struct HksParamSet *paramSet = NULL; in BaseTestMacAnswer() local 171 int32_t ret = ConstructParamSet(¶mSet, hmacParam, CAL_ARRAY_SIZE(hmacParam)); in BaseTestMacAnswer() 175 ret = HksMac(&keyBlob, paramSet, &srcBlob, &hmacBlob); in BaseTestMacAnswer() [all …]
|
D | hks_generate_key_test.c | 117 struct HksParamSet *paramSet = NULL; in ExecHksGenerateKeyTest001() local 118 struct GenerateKeyParamSetStructure paramStruct = { ¶mSet, in ExecHksGenerateKeyTest001() 137 ret = HksGenerateKeyRun(keyAlias, paramSet, paramSetOut, performTimes); in ExecHksGenerateKeyTest001() 149 HksFreeParamSet(¶mSet); in ExecHksGenerateKeyTest001()
|
D | hks_hash_test.c | 113 struct HksParamSet *paramSet = NULL; in ExecHksHashTestCommon() local 117 int32_t ret = TestConstructHashParamSet(¶mSet, in ExecHksHashTestCommon() 136 ret = HksHashRun(paramSet, srcData, hash, 1); in ExecHksHashTestCommon() 142 HksFreeParamSet(¶mSet); in ExecHksHashTestCommon()
|
/test/xts/device_attest/services/core/security/ |
D | attest_security.c | 242 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()
|