/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/ |
H A D | hks_sm4_cipher_test_common.h | 26 static const uint32_t NONCE_SIZE = 12;
member 32 static uint8_t NONCE[NONCE_SIZE] = {0};
|
H A D | hks_import_wrapped_test_common.h | 50 static const uint32_t NONCE_SIZE = 12; member 51 static uint8_t NONCE[NONCE_SIZE] = "hahahahahah";
|
/base/security/asset/test/unittest/module_test/src/ |
H A D | huks_wrapper_test.cpp | 107 uint8_t plain[6 + TAG_SIZE + NONCE_SIZE] = { 0 }; in HWTEST_F() 108 struct HksBlob outData = { 6 + TAG_SIZE + NONCE_SIZE, plain }; in HWTEST_F() 132 uint8_t plain[6 + TAG_SIZE + NONCE_SIZE] = { 0 }; in HWTEST_F() 133 struct HksBlob outData = { 6 + TAG_SIZE + NONCE_SIZE, plain }; in HWTEST_F()
|
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/lite_exchange_task/ |
H A D | iso_client_bind_exchange_task.c | 94 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in DecAndImportAuthCode() 104 GOTO_ERR_AND_SET_RET(GetByteFromJson(in, FIELD_NONCE, nonce, NONCE_SIZE), res); in DecAndImportAuthCode() 114 Uint8Buff nonceBuf = { nonce, NONCE_SIZE }; in DecAndImportAuthCode() 171 *nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in ClientBindAesEncrypt() 176 Uint8Buff nonceBuf = { *nonce, NONCE_SIZE }; in ClientBindAesEncrypt() 190 gcmParams.nonceLen = NONCE_SIZE; in ClientBindAesEncrypt() 231 GOTO_ERR_AND_SET_RET(AddByteToJson(payload, FIELD_NONCE, nonce, NONCE_SIZE), res); in ClientBindExchangeStart()
|
H A D | iso_server_bind_exchange_task.c | 89 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in DecryptChallenge() 94 GOTO_ERR_AND_SET_RET(GetByteFromJson(in, FIELD_NONCE, nonce, NONCE_SIZE), res); in DecryptChallenge() 100 gcmParam.nonceLen = NONCE_SIZE; in DecryptChallenge() 194 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in GenerateAuthCodeAndImport() 205 Uint8Buff nonceBuf = { nonce, NONCE_SIZE }; in GenerateAuthCodeAndImport()
|
/base/security/asset/services/crypto_manager/src/ |
H A D | crypto.rs | 39 const NONCE_SIZE: usize = 12; consts 90 if cipher.len() <= (TAG_SIZE + NONCE_SIZE) { in exec_crypt() 98 let mut msg: Vec<u8> = vec![0; cipher.len() - TAG_SIZE - NONCE_SIZE]; in exec_crypt() 118 let mut cipher: Vec<u8> = vec![0; msg.len() + TAG_SIZE + NONCE_SIZE]; in encrypt() 141 if cipher.len() <= (TAG_SIZE + NONCE_SIZE) { in decrypt() 145 let mut plain: Vec<u8> = vec![0; cipher.len() - TAG_SIZE - NONCE_SIZE]; in decrypt()
|
H A D | huks_wrapper.c | 255 struct HksBlob cipher = { inData->size - NONCE_SIZE - TAG_SIZE, inData->data }; in DecryptData() 256 struct HksBlob tag = { TAG_SIZE, inData->data + (inData->size - NONCE_SIZE - TAG_SIZE) }; in DecryptData() 257 struct HksBlob nonce = { NONCE_SIZE, inData->data + (inData->size - NONCE_SIZE) }; in DecryptData() 321 struct HksBlob tag = { TAG_SIZE, inData->data + (inData->size - NONCE_SIZE - TAG_SIZE) }; in ExecCrypt() 322 struct HksBlob nonce = { NONCE_SIZE, inData->data + (inData->size - NONCE_SIZE) }; in ExecCrypt() 342 struct HksBlob cipher = { inData->size - NONCE_SIZE - TAG_SIZE, inData->data }; in ExecCrypt()
|
H A D | huks_wrapper.h | 28 static const uint32_t NONCE_SIZE = 12; variable
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/symmetric_alg_test/ |
H A D | hks_aes_cipher_test_common.h | 26 static const uint32_t NONCE_SIZE = 12; member 31 static uint8_t NONCE[NONCE_SIZE] = {0};
|
/base/security/device_auth/services/legacy/authenticators/inc/account_unrelated/iso_task/ |
H A D | iso_base_cur_task.h | 26 #define NONCE_SIZE 12 macro
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/symmetric_alg_test/ |
H A D | hks_aes_cipher_test_common.cpp | 270 cipherText.size -= NONCE_SIZE; in HksAesCipherTestCaseGcm3() 286 (void)memcpy_s(decryptParamSet->params[i].blob.data, NONCE_SIZE, in HksAesCipherTestCaseGcm3() 287 tempPtrTest + cipherText.size + AEAD_SIZE, NONCE_SIZE); in HksAesCipherTestCaseGcm3() 326 (void)memcpy_s(paramSet->params[i].blob.data, NONCE_SIZE, in HksAesGcmAppendAeadAndNonce() 327 tempPtrTest + cipherText->size + AEAD_SIZE, NONCE_SIZE); in HksAesGcmAppendAeadAndNonce() 359 cipherText.size -= NONCE_SIZE; in HksAesCipherTestCaseGcm4() 408 cipherText->size -= NONCE_SIZE; in HksAesDecryptThreeStage() 424 (void)memcpy_s(decryptParamSet->params[i].blob.data, NONCE_SIZE, in HksAesDecryptThreeStage() 425 tempPtrTest + cipherText->size + AEAD_SIZE, NONCE_SIZE); in HksAesDecryptThreeStage()
|
H A D | hks_aes_cipher_part4_test.cpp | 137 .size = NONCE_SIZE, 217 .size = NONCE_SIZE, 262 .size = NONCE_SIZE, 380 .size = NONCE_SIZE,
|
H A D | hks_aes_cipher_ccm_test.cpp | 42 static uint8_t CCM_NONCE[NONCE_SIZE + CCM_COMM_BUFF_SIZE] = {0};
135 .size = NONCE_SIZE,
166 .size = NONCE_SIZE,
259 .size = NONCE_SIZE,
284 .size = NONCE_SIZE,
463 (void)HksAesSetNonceLen(g_encCcmParams, sizeof(g_encCcmParams) / sizeof(HksParam), NONCE_SIZE, CCM_NONCE);
in TestAesCcmCaseInit() 466 (void)HksAesSetNonceLen(g_decCcmParams, sizeof(g_decCcmParams) / sizeof(HksParam), NONCE_SIZE, CCM_NONCE);
in TestAesCcmCaseInit() 470 (void)HksAesSetNonceLen(g_encCcmParamsNoAad, sizeof(g_encCcmParamsNoAad) / sizeof(HksParam), NONCE_SIZE,
in TestAesCcmCaseInit() 473 (void)HksAesSetNonceLen(g_decCcmParamsNoAad, sizeof(g_decCcmParamsNoAad) / sizeof(HksParam), NONCE_SIZE,
in TestAesCcmCaseInit()
|
/base/security/huks/test/unittest/huks_common_test/include/ |
H A D | hks_aes_cipher_part_test_c.h | 29 .size = NONCE_SIZE, \
|
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
H A D | hks_batch_test.cpp | 148 .size = AesCipher::NONCE_SIZE, 260 .size = AesCipher::NONCE_SIZE, 374 .size = AesCipher::NONCE_SIZE, 414 .size = AesCipher::NONCE_SIZE, 526 .size = AesCipher::NONCE_SIZE, 638 .size = AesCipher::NONCE_SIZE, 750 .size = AesCipher::NONCE_SIZE,
|
H A D | hks_import_wrapped_test_common.cpp | 39 { .tag = HKS_TAG_NONCE, .blob = {.size = Unittest::ImportWrappedKey::NONCE_SIZE, 189 struct HksBlob commonNonce = {.size = Unittest::ImportWrappedKey::NONCE_SIZE, in ImportWrappedKey()
|
H A D | hks_import_wrapped_x25519_suite_test.cpp | 124 .size = Unittest::ImportWrappedKey::NONCE_SIZE,
|
H A D | hks_sm4_cipher_part_test.cpp | 110 .size = NONCE_SIZE, \
|
/base/telephony/core_service/utils/common/src/ |
H A D | tel_aes_crypto_util.cpp | 28 constexpr uint32_t NONCE_SIZE = 12; member 31 constexpr uint8_t NONCE[NONCE_SIZE] = {0}; 71 .size = NONCE_SIZE, \
|
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/iso_task/iso_task_common/ |
H A D | iso_task_common.c | 88 uint8_t nonce[NONCE_SIZE] = { 0 }; in GenerateEncResult() 100 encryptInfo.nonceLen = NONCE_SIZE; in GenerateEncResult() 226 nonce = (uint8_t *)HcMalloc(NONCE_SIZE, 0); in CheckEncResult() 231 GOTO_ERR_AND_SET_RET(GetByteFromJson(in, FIELD_NONCE, nonce, NONCE_SIZE), res); in CheckEncResult() 244 gcmParam.nonceLen = NONCE_SIZE; in CheckEncResult()
|