Searched refs:content_tmp (Results 1 - 3 of 3) sorted by relevance
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/secure/ |
H A D | load_crypto.c | 136 hi_flash_crypto_content *content_tmp = (hi_flash_crypto_content *)boot_malloc(content_size); in crypto_decrypt_hash() local 137 if (content_tmp == HI_NULL) { in crypto_decrypt_hash() 141 cs = (uintptr_t)(content_tmp) ^ content_size ^ (uintptr_t)(key_content) ^ content_size; in crypto_decrypt_hash() 142 ret = (hi_u32)memcpy_s(content_tmp, content_size, key_content, content_size, cs); in crypto_decrypt_hash() 153 cs = (uintptr_t)(aes_ctrl.iv) ^ (hi_u32)sizeof(aes_ctrl.iv) ^ (uintptr_t)(content_tmp->iv_nv) ^ IV_BYTE_LENGTH; in crypto_decrypt_hash() 154 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), content_tmp->iv_nv, IV_BYTE_LENGTH, cs); in crypto_decrypt_hash() 162 ret = hi_cipher_aes_crypto((uintptr_t)content_tmp->iv_content, (uintptr_t)key_content->iv_content, in crypto_decrypt_hash() 171 loader_clear_content((hi_u8 *)content_tmp, content_size); in crypto_decrypt_hash() 172 crypto_mem_free(content_tmp); in crypto_decrypt_hash() 268 hi_flash_crypto_content *content_tmp in crypto_save_work_key() local [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/system/upg/ |
H A D | kernel_crypto.c | 152 hi_flash_crypto_content *content_tmp = (hi_flash_crypto_content *)hi_malloc(HI_MOD_ID_CRYPTO, content_size); in crypto_decrypt_hash() local 153 if (content_tmp == HI_NULL) { in crypto_decrypt_hash() 157 ret = (hi_u32)memcpy_s(content_tmp, content_size, key_content, content_size); in crypto_decrypt_hash() 169 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), content_tmp->iv_nv, IV_BYTE_LENGTH); in crypto_decrypt_hash() 177 ret = hi_cipher_aes_crypto((uintptr_t)content_tmp->iv_content, (uintptr_t)key_content->iv_content, in crypto_decrypt_hash() 186 crypto_clear_content((hi_u8 *)content_tmp, content_size); in crypto_decrypt_hash() 187 crypto_mem_free(content_tmp); in crypto_decrypt_hash() 287 hi_flash_crypto_content *content_tmp = (hi_flash_crypto_content *)hi_malloc(HI_MOD_ID_CRYPTO, content_size); in crypto_save_work_key() local 288 if (content_tmp == HI_NULL) { in crypto_save_work_key() 292 ret = (hi_u32)memcpy_s(content_tmp, content_siz in crypto_save_work_key() [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/secure/ |
H A D | crypto.c | 254 hi_flash_crypto_content *content_tmp = (hi_flash_crypto_content *)boot_malloc(content_size); in crypto_decrypt_hash() local 255 if (content_tmp == HI_NULL) { in crypto_decrypt_hash() 259 cs = (uintptr_t)(content_tmp) ^ content_size ^ (uintptr_t)(key_content) ^ content_size; in crypto_decrypt_hash() 260 ret = (hi_u32)memcpy_s(content_tmp, content_size, key_content, content_size, cs); in crypto_decrypt_hash() 271 cs = (uintptr_t)(aes_ctrl.iv) ^ (hi_u32)sizeof(aes_ctrl.iv) ^ (uintptr_t)(content_tmp->iv_nv) ^ IV_BYTE_LENGTH; in crypto_decrypt_hash() 272 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), content_tmp->iv_nv, IV_BYTE_LENGTH, cs); in crypto_decrypt_hash() 280 ret = hi_cipher_aes_crypto((uintptr_t)content_tmp->iv_content, (uintptr_t)key_content->iv_content, in crypto_decrypt_hash() 289 crypto_clear_content((hi_u8 *)content_tmp, content_size); in crypto_decrypt_hash() 290 crypto_mem_free(content_tmp); in crypto_decrypt_hash() 299 hi_flash_crypto_content *content_tmp in crypto_save_work_key() local [all...] |
Completed in 5 milliseconds