Searched refs:IV_BYTE_LENGTH (Results 1 - 6 of 6) sorted by relevance
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/system/upg/ |
H A D | kernel_crypto.h | 41 #define IV_BYTE_LENGTH 16 macro 76 hi_u8 iv_nv[IV_BYTE_LENGTH]; 77 hi_u8 iv_content[IV_BYTE_LENGTH]; 86 hi_u8 upg_iv[IV_BYTE_LENGTH]; 87 hi_u8 upg_salt[IV_BYTE_LENGTH];
|
H A D | kernel_crypto.c | 30 static const hi_u8 g_upg_file_magic[IV_BYTE_LENGTH] = { 169 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), content_tmp->iv_nv, IV_BYTE_LENGTH); in crypto_decrypt_hash() 178 content_size - ROOT_SALT_LENGTH - IV_BYTE_LENGTH, HI_FALSE); in crypto_decrypt_hash() 195 hi_u32 encrypt_size = content_size - ROOT_SALT_LENGTH - IV_BYTE_LENGTH; in crypto_encrypt_hash() 202 hi_u32 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), key_content->iv_nv, IV_BYTE_LENGTH); in crypto_encrypt_hash() 341 hi_u8 salt[IV_BYTE_LENGTH]; in crypto_gen_key_content() 345 (hi_void)hi_cipher_trng_get_random_bytes(salt, IV_BYTE_LENGTH); in crypto_gen_key_content() 347 (hi_void)hi_cipher_trng_get_random_bytes(key_content->iv_nv, IV_BYTE_LENGTH); in crypto_gen_key_content() 348 (hi_void)hi_cipher_trng_get_random_bytes(key_content->iv_content, IV_BYTE_LENGTH); in crypto_gen_key_content() 384 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), content->iv_content, IV_BYTE_LENGTH); in crypto_decrypt_kernel() [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/secure/ |
H A D | crypto.h | 31 #define IV_BYTE_LENGTH 16 macro 73 hi_u8 iv_nv[IV_BYTE_LENGTH]; /* The root key encrypts the initial vector value of the working key 75 hi_u8 iv_content[IV_BYTE_LENGTH]; 87 hi_u8 upg_iv[IV_BYTE_LENGTH]; 88 hi_u8 upg_salt[IV_BYTE_LENGTH];
|
H A D | crypto.c | 207 hi_u32 encrypt_size = content_size - ROOT_SALT_LENGTH - IV_BYTE_LENGTH; in crypto_encrypt_hash() 215 IV_BYTE_LENGTH; in crypto_encrypt_hash() 216 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), key_content->iv_nv, IV_BYTE_LENGTH, cs); in crypto_encrypt_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() 281 content_size - ROOT_SALT_LENGTH - IV_BYTE_LENGTH, HI_FALSE); in crypto_decrypt_hash() 392 hi_u8 salt[IV_BYTE_LENGTH]; in crypto_gen_key_content() 396 (hi_void)hi_cipher_trng_get_random_bytes(salt, IV_BYTE_LENGTH); in crypto_gen_key_content() 398 (hi_void)hi_cipher_trng_get_random_bytes(key_content->iv_nv, IV_BYTE_LENGTH); in crypto_gen_key_content() 399 (hi_void)hi_cipher_trng_get_random_bytes(key_content->iv_content, IV_BYTE_LENGTH); in crypto_gen_key_content() [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/secure/ |
H A D | load_crypto.h | 29 #define IV_BYTE_LENGTH 16 macro 74 hi_u8 iv_nv[IV_BYTE_LENGTH]; 75 hi_u8 iv_content[IV_BYTE_LENGTH];
|
H A D | load_crypto.c | 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() 163 content_size - ROOT_SALT_LENGTH - IV_BYTE_LENGTH, HI_FALSE); in crypto_decrypt_hash() 181 hi_u32 encrypt_size = content_size - ROOT_SALT_LENGTH - IV_BYTE_LENGTH; in crypto_encrypt_hash() 189 IV_BYTE_LENGTH; in crypto_encrypt_hash() 190 ret = (hi_u32)memcpy_s(aes_ctrl.iv, sizeof(aes_ctrl.iv), key_content->iv_nv, IV_BYTE_LENGTH, cs); in crypto_encrypt_hash() 339 hi_u8 salt[IV_BYTE_LENGTH]; in crypto_gen_key_content() 343 (hi_void)hi_cipher_trng_get_random_bytes(salt, IV_BYTE_LENGTH); in crypto_gen_key_content() 345 (hi_void)hi_cipher_trng_get_random_bytes(key_content->iv_nv, IV_BYTE_LENGTH); in crypto_gen_key_content() 346 (hi_void)hi_cipher_trng_get_random_bytes(key_content->iv_content, IV_BYTE_LENGTH); in crypto_gen_key_content() [all...] |
Completed in 4 milliseconds