Searched refs:KEY_BYTE_LENGTH (Results 1 - 7 of 7) sorted by relevance
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/secure/ |
H A D | load_crypto.c | 224 hi_u8 key_e[KEY_BYTE_LENGTH] = { 0 }; in crypto_load_key_content() 226 hi_u32 cs = (uintptr_t)key_e ^ (hi_u32)sizeof(key_e) ^ 0x0 ^ KEY_BYTE_LENGTH; in crypto_load_key_content() 227 (hi_void) memset_s(key_e, sizeof(key_e), 0x0, KEY_BYTE_LENGTH, cs); in crypto_load_key_content() 240 if (memcmp(key_content->work_text, key_e, KEY_BYTE_LENGTH) == HI_ERR_SUCCESS) { in crypto_load_key_content() 340 hi_u8 kdf_key[KEY_BYTE_LENGTH]; in crypto_gen_key_content() 344 (hi_void)hi_cipher_trng_get_random_bytes(kdf_key, KEY_BYTE_LENGTH); in crypto_gen_key_content() 360 cs = (uintptr_t)(key_content->work_text) ^ KEY_BYTE_LENGTH ^ (uintptr_t)(ctrl.result) ^ in crypto_gen_key_content() 362 if (memcpy_s(key_content->work_text, KEY_BYTE_LENGTH, ctrl.result, sizeof(ctrl.result), cs) != EOK) { in crypto_gen_key_content() 385 (uintptr_t)(content->work_text) ^ KEY_BYTE_LENGTH; in crypto_encrypt_data() 386 if (memcpy_s(aes_ctrl.key, sizeof(aes_ctrl.key), content->work_text, KEY_BYTE_LENGTH, c in crypto_encrypt_data() [all...] |
H A D | load_crypto.h | 34 #define KEY_BYTE_LENGTH 32 macro 76 hi_u8 work_text[KEY_BYTE_LENGTH];
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/system/upg/ |
H A D | kernel_crypto.h | 46 #define KEY_BYTE_LENGTH 32 macro 78 hi_u8 work_text[KEY_BYTE_LENGTH];
|
H A D | kernel_crypto.c | 235 hi_u8 key_e[KEY_BYTE_LENGTH] = { 0 }; in crypto_load_key_content() 237 (hi_void) memset_s(key_e, sizeof(key_e), 0x0, KEY_BYTE_LENGTH); in crypto_load_key_content() 260 if (memcmp(key_content->work_text, key_e, KEY_BYTE_LENGTH) == HI_ERR_SUCCESS) { in crypto_load_key_content() 342 hi_u8 kdf_key[KEY_BYTE_LENGTH]; in crypto_gen_key_content() 346 (hi_void)hi_cipher_trng_get_random_bytes(kdf_key, KEY_BYTE_LENGTH); in crypto_gen_key_content() 361 if (memcpy_s(key_content->work_text, KEY_BYTE_LENGTH, ctrl.result, sizeof(ctrl.result)) != EOK) { in crypto_gen_key_content() 379 ret = (hi_u32)memcpy_s(aes_ctrl.key, sizeof(aes_ctrl.key), content->work_text, KEY_BYTE_LENGTH); in crypto_decrypt_kernel() 472 if (memcpy_s(aes_ctrl.key, sizeof(aes_ctrl.key), new_content->work_text, KEY_BYTE_LENGTH) != EOK) { in crypto_encrypt_data()
|
H A D | upg_check_boot_bin.h | 41 #define KEY_BYTE_LENGTH 32 macro
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/secure/ |
H A D | crypto.h | 36 #define KEY_BYTE_LENGTH 32 macro 76 hi_u8 work_text[KEY_BYTE_LENGTH]; /* Working key ciphertext */
|
H A D | crypto.c | 341 hi_u8 key_e[KEY_BYTE_LENGTH] = { 0 }; in crypto_load_key_content() 343 hi_u32 cs = (uintptr_t)key_e ^ (hi_u32)sizeof(key_e) ^ 0x0 ^ KEY_BYTE_LENGTH; in crypto_load_key_content() 344 (hi_void) memset_s(key_e, sizeof(key_e), 0x0, KEY_BYTE_LENGTH, cs); in crypto_load_key_content() 367 if (memcmp(key_content->work_text, key_e, KEY_BYTE_LENGTH) == HI_ERR_SUCCESS) { in crypto_load_key_content() 393 hi_u8 kdf_key[KEY_BYTE_LENGTH]; in crypto_gen_key_content() 397 (hi_void)hi_cipher_trng_get_random_bytes(kdf_key, KEY_BYTE_LENGTH); in crypto_gen_key_content() 413 cs = (uintptr_t)(key_content->work_text) ^ KEY_BYTE_LENGTH ^ (uintptr_t)(ctrl.result) ^ (hi_u32)sizeof(ctrl.result); in crypto_gen_key_content() 414 if (memcpy_s(key_content->work_text, KEY_BYTE_LENGTH, ctrl.result, sizeof(ctrl.result), cs) != EOK) { in crypto_gen_key_content() 437 (uintptr_t)(content->work_text) ^ KEY_BYTE_LENGTH; in crypto_encrypt_data() 438 if (memcpy_s(aes_ctrl.key, sizeof(aes_ctrl.key), content->work_text, KEY_BYTE_LENGTH, c in crypto_encrypt_data() [all...] |
Completed in 5 milliseconds