Home
last modified time | relevance | path

Searched refs:key_content (Results 1 - 3 of 3) sorted by relevance

/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/secure/
H A Dload_crypto.c48 static hi_u32 crypto_load_salt(crypto_workkey_partition part, hi_flash_crypto_content *key_content) in crypto_load_salt() argument
57 ret = hi_factory_nv_read(HI_NV_FTM_KERNELA_WORK_ID, key_content, sizeof(hi_flash_crypto_content), 0); in crypto_load_salt()
62 ret = hi_factory_nv_read(HI_NV_FTM_BACKUP_KERNELA_WORK_ID, key_content, sizeof(hi_flash_crypto_content), 0); in crypto_load_salt()
68 if (memcmp(key_content->root_salt, salt_e, ROOT_SALT_LENGTH) == HI_ERR_SUCCESS) { in crypto_load_salt()
76 static hi_u32 crypto_get_root_salt(hi_flash_crypto_content *key_content) in crypto_get_root_salt() argument
78 hi_u32 ret = crypto_load_salt(CRYPTO_WORKKEY_KERNEL_A, key_content); in crypto_get_root_salt()
80 ret = crypto_load_salt(CRYPTO_WORKKEY_KERNEL_A_BACKUP, key_content); in crypto_get_root_salt()
82 ret = hi_cipher_trng_get_random_bytes(key_content->root_salt, ROOT_SALT_LENGTH); in crypto_get_root_salt()
130 static hi_u32 crypto_decrypt_hash(hi_flash_crypto_content *key_content) in crypto_decrypt_hash() argument
141 cs = (uintptr_t)(content_tmp) ^ content_size ^ (uintptr_t)(key_content) in crypto_decrypt_hash()
176 crypto_encrypt_hash(hi_flash_crypto_content *key_content) crypto_encrypt_hash() argument
220 crypto_load_key_content(crypto_workkey_partition part, hi_flash_crypto_content *key_content) crypto_load_key_content() argument
263 crypto_save_work_key(crypto_workkey_partition part, hi_flash_crypto_content *key_content) crypto_save_work_key() argument
306 crypto_is_need_gen_key(hi_flash_crypto_content *key_content, hi_u8 *need_gen_key) crypto_is_need_gen_key() argument
337 crypto_gen_key_content(hi_flash_crypto_content *key_content) crypto_gen_key_content() argument
423 hi_flash_crypto_content *key_content = (hi_flash_crypto_content *)boot_malloc(sizeof(hi_flash_crypto_content)); crypto_burn_encrypt() local
[all...]
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/system/upg/
H A Dkernel_crypto.c69 static hi_u32 crypto_load_salt(crypto_workkey_partition part, hi_flash_crypto_content *key_content) in crypto_load_salt() argument
76 ret = hi_factory_nv_read(HI_NV_FTM_KERNELA_WORK_ID, key_content, sizeof(hi_flash_crypto_content), 0); in crypto_load_salt()
81 ret = hi_factory_nv_read(HI_NV_FTM_BACKUP_KERNELA_WORK_ID, key_content, sizeof(hi_flash_crypto_content), 0); in crypto_load_salt()
87 if (memcmp(key_content->root_salt, salt_e, ROOT_SALT_LENGTH) == HI_ERR_SUCCESS) { in crypto_load_salt()
95 static hi_u32 crypto_get_root_salt(hi_flash_crypto_content *key_content) in crypto_get_root_salt() argument
97 hi_u32 ret = crypto_load_salt(CRYPTO_WORKKEY_KERNEL_A, key_content); in crypto_get_root_salt()
99 ret = crypto_load_salt(CRYPTO_WORKKEY_KERNEL_A_BACKUP, key_content); in crypto_get_root_salt()
147 static hi_u32 crypto_decrypt_hash(hi_flash_crypto_content *key_content) in crypto_decrypt_hash() argument
157 ret = (hi_u32)memcpy_s(content_tmp, content_size, key_content, content_size); in crypto_decrypt_hash()
177 ret = hi_cipher_aes_crypto((uintptr_t)content_tmp->iv_content, (uintptr_t)key_content in crypto_decrypt_hash()
191 crypto_encrypt_hash(hi_flash_crypto_content *key_content) crypto_encrypt_hash() argument
231 crypto_load_key_content(crypto_workkey_partition part, hi_flash_crypto_content *key_content) crypto_load_key_content() argument
283 crypto_save_work_key(crypto_workkey_partition part, hi_flash_crypto_content *key_content) crypto_save_work_key() argument
339 crypto_gen_key_content(hi_flash_crypto_content *key_content) crypto_gen_key_content() argument
417 hi_flash_crypto_content *key_content = (hi_flash_crypto_content *)hi_malloc(HI_MOD_ID_CRYPTO, crypto_decrypt() local
[all...]
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/secure/
H A Dcrypto.c102 static hi_u32 crypto_load_salt(crypto_workkey_partition part, hi_flash_crypto_content *key_content) in crypto_load_salt() argument
110 ret = hi_factory_nv_read(HI_NV_FTM_KERNELA_WORK_ID, key_content, sizeof(hi_flash_crypto_content), 0); in crypto_load_salt()
115 ret = hi_factory_nv_read(HI_NV_FTM_BACKUP_KERNELA_WORK_ID, key_content, sizeof(hi_flash_crypto_content), 0); in crypto_load_salt()
121 if (memcmp(key_content->root_salt, salt_e, ROOT_SALT_LENGTH) == HI_ERR_SUCCESS) { in crypto_load_salt()
129 static hi_u32 crypto_get_root_salt(hi_flash_crypto_content *key_content) in crypto_get_root_salt() argument
131 hi_u32 ret = crypto_load_salt(CRYPTO_WORKKEY_KERNEL_A, key_content); in crypto_get_root_salt()
133 ret = crypto_load_salt(CRYPTO_WORKKEY_KERNEL_A_BACKUP, key_content); in crypto_get_root_salt()
202 static hi_u32 crypto_encrypt_hash(hi_flash_crypto_content *key_content) in crypto_encrypt_hash() argument
214 hi_u32 cs = (uintptr_t)(aes_ctrl.iv) ^ (hi_u32)sizeof(aes_ctrl.iv) ^ (uintptr_t)(key_content->iv_nv) ^ in crypto_encrypt_hash()
216 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), key_content in crypto_encrypt_hash()
248 crypto_decrypt_hash(hi_flash_crypto_content *key_content) crypto_decrypt_hash() argument
294 crypto_save_work_key(crypto_workkey_partition part, hi_flash_crypto_content *key_content) crypto_save_work_key() argument
337 crypto_load_key_content(crypto_workkey_partition part, hi_flash_crypto_content *key_content) crypto_load_key_content() argument
390 crypto_gen_key_content(hi_flash_crypto_content *key_content) crypto_gen_key_content() argument
585 hi_flash_crypto_content *key_content = (hi_flash_crypto_content *)boot_malloc(sizeof(hi_flash_crypto_content)); crypto_decrypt() local
[all...]

Completed in 3 milliseconds