Home
last modified time | relevance | path

Searched refs:nonceParam (Results 1 – 6 of 6) sorted by relevance

/ohos5.0/base/security/huks/test/unittest/huks_common_test/src/
H A Dhks_test_aes_func.cpp113 struct HksParam nonceParam = {0}; in ConstructParamSetEncryptDecryptAesPost() local
114 nonceParam.tag = HKS_TAG_NONCE; in ConstructParamSetEncryptDecryptAesPost()
115 nonceParam.blob.data = g_nonce; in ConstructParamSetEncryptDecryptAesPost()
116 nonceParam.blob.size = sizeof(g_nonce); in ConstructParamSetEncryptDecryptAesPost()
117 ret = HksAddParams(*paramSet, (const struct HksParam *)&nonceParam, 1); in ConstructParamSetEncryptDecryptAesPost()
H A Dhks_test_common_func.cpp263 struct HksParam nonceParam = {0}; in TestAesCipherParamSetPost() local
264 nonceParam.tag = HKS_TAG_NONCE; in TestAesCipherParamSetPost()
265 nonceParam.blob = *(paramStruct->nonceBlob); in TestAesCipherParamSetPost()
266 ret = HksAddParams(paramSet, (const struct HksParam *)&nonceParam, 1); in TestAesCipherParamSetPost()
/ohos5.0/base/security/huks/frameworks/huks_standard/main/common/src/
H A Dhks_base_check.c1454 struct HksParam *nonceParam = NULL; in CheckCipherAeNonceMaterial() local
1455 int32_t ret = HksGetParam(paramSet, HKS_TAG_NONCE, &nonceParam); in CheckCipherAeNonceMaterial()
1457 HKS_IF_NOT_SUCC_RETURN(CheckBlob(&nonceParam->blob), HKS_ERROR_INVALID_NONCE) in CheckCipherAeNonceMaterial()
1461 if (nonceParam->blob.size < HKS_AES_GCM_NONCE_LEN_MIN) { in CheckCipherAeNonceMaterial()
1462 … HKS_LOG_E("gcm invalid nonce size, nonce size = %" LOG_PUBLIC "u", nonceParam->blob.size); in CheckCipherAeNonceMaterial()
1466 if ((nonceParam->blob.size < HKS_AES_CCM_NONCE_LEN_MIN) || in CheckCipherAeNonceMaterial()
1467 (nonceParam->blob.size > HKS_AES_CCM_NONCE_LEN_MAX)) { in CheckCipherAeNonceMaterial()
1468 … HKS_LOG_E("ccm invalid nonce size, nonce size = %" LOG_PUBLIC "u", nonceParam->blob.size); in CheckCipherAeNonceMaterial()
H A Dhks_crypto_adapter.c115 struct HksParam *nonceParam = NULL; in HksFillAeadParam() local
116 int32_t ret = HksGetParam(paramSet, HKS_TAG_NONCE, &nonceParam); in HksFillAeadParam()
157 aeadParam->nonce = nonceParam->blob; in HksFillAeadParam()
/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/core/src/
H A Dhks_core_service_three_stage.c614 struct HksParam *nonceParam = NULL; in CheckWhetherUpdateAesNonce() local
615 int32_t ret2 = HksGetParam(*runtimeParamSet, HKS_TAG_NONCE, &nonceParam); in CheckWhetherUpdateAesNonce()
791 struct HksParam *nonceParam = NULL; in AppendNonceWhenNeeded() local
792 ret = HksGetParam(keyNode->runtimeParamSet, HKS_TAG_NONCE, &nonceParam); in AppendNonceWhenNeeded()
794 if (nonceParam->blob.size != nonceLen) { in AppendNonceWhenNeeded()
799 nonceParam->blob.data, nonceParam->blob.size) != EOK) { in AppendNonceWhenNeeded()
803 outData->size += nonceParam->blob.size; in AppendNonceWhenNeeded()
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/symmetric_alg_test/
H A Dhks_aes_cipher_ccm_test.cpp713 HksParam *nonceParam = NULL; in HksAesCmcCipherTestCaseRun() local
714 ret = HksGetParam(encParamSet, HKS_TAG_NONCE, &nonceParam); in HksAesCmcCipherTestCaseRun()
719 ret = HksGetParam(decParamSet, HKS_TAG_NONCE, &nonceParam); in HksAesCmcCipherTestCaseRun()
721 …(void)memcpy_s(nonceParam->blob.data, CCM_NONCE_SIZE, cipherText.data + cipherText.size - CCM_NONC… in HksAesCmcCipherTestCaseRun()
723 nonceParam->blob.size = CCM_NONCE_SIZE; in HksAesCmcCipherTestCaseRun()