/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/upg/ |
H A D | boot_upg_check_secure.c | 113 hi_u32 boot_upg_secure_get_key_part1(hi_u32 sign_alg, hi_u8 *key_n, hi_u32 key_len) in boot_upg_secure_get_key_part1() argument 118 hi_unref_param(key_len); in boot_upg_secure_get_key_part1() 121 hi_u32 cs = (uintptr_t)key_n ^ key_len ^ (uintptr_t)g_boot_ecc_key ^ ECC_256_LEN; in boot_upg_secure_get_key_part1() 122 ret = memcpy_s(key_n, key_len, g_boot_ecc_key, ECC_256_LEN, cs); in boot_upg_secure_get_key_part1() 127 hi_u32 cs = (uintptr_t)key_n ^ key_len ^ (uintptr_t)g_boot_rsa_key ^ RSA_2048_LEN; in boot_upg_secure_get_key_part1() 128 ret = memcpy_s(key_n, key_len, g_boot_rsa_key, RSA_2048_LEN, cs); in boot_upg_secure_get_key_part1() 134 hi_u32 boot_upg_secure_get_key_part2(hi_u32 sign_alg, hi_u8 *key_e, hi_u32 key_len) in boot_upg_secure_get_key_part2() argument 139 hi_unref_param(key_len); in boot_upg_secure_get_key_part2() 142 hi_u32 cs = (uintptr_t)key_e ^ key_len ^ (uintptr_t)(g_boot_ecc_key + ECC_256_LEN) ^ ECC_256_LEN; in boot_upg_secure_get_key_part2() 143 ret = memcpy_s(key_e, key_len, g_boot_ecc_ke in boot_upg_secure_get_key_part2() [all...] |
H A D | boot_upg_check.c | 175 if (head->key_len != sizeof(upg_rsa_key)) { in boot_upg_check_alg_param() 178 if (head->section_offset != (sizeof(hi_upg_common_head) + head->key_len + sizeof(upg_rsa_sign))) { in boot_upg_check_alg_param() 183 if (head->key_len != sizeof(upg_ecc_key)) { in boot_upg_check_alg_param() 186 if (head->section_offset != (sizeof(hi_upg_common_head) + head->key_len + sizeof(upg_ecc_sign))) { in boot_upg_check_alg_param()
|
H A D | boot_upg_check_secure.h | 56 hi_u32 key_len; member
|
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/interdrv/common/cipher/src/drv/cipher_v1.0/compat/ |
H A D | drv_klad.c | 196 hi_cipher_ca_type root_key, hi_cipher_klad_target target, const hi_u8 *data_in, hi_u32 key_len) in drv_cipher_klad_load_key() 205 hi_log_chk_param_return(((key_len % AES_BLOCK_SIZE) != 0) || (key_len == 0)); in drv_cipher_klad_load_key() 215 for (i = 0; i < key_len / AES_BLOCK_SIZE; i++) { in drv_cipher_klad_load_key() 235 hi_cipher_klad_target target, hi_u8 *clean_key, hi_u8 *encrypt_key, hi_u32 key_len) in drv_cipher_klad_encrypt_key() 243 hi_log_chk_param_return(key_len != AES_BLOCK_SIZE); in drv_cipher_klad_encrypt_key() 254 drv_cipher_inverse_data(clean_key, key_len); in drv_cipher_klad_encrypt_key() 257 hal_cipher_set_klad_data((hi_u32 *)clean_key, key_len / WORD_WIDTH); in drv_cipher_klad_encrypt_key() 264 hal_cipher_get_klad_data((hi_u32 *)encrypt_key, key_len / WORD_WIDTH); in drv_cipher_klad_encrypt_key() 195 drv_cipher_klad_load_key(hi_u32 chn_id, hi_cipher_ca_type root_key, hi_cipher_klad_target target, const hi_u8 *data_in, hi_u32 key_len) drv_cipher_klad_load_key() argument 234 drv_cipher_klad_encrypt_key(hi_cipher_ca_type root_key, hi_cipher_klad_target target, hi_u8 *clean_key, hi_u8 *encrypt_key, hi_u32 key_len) drv_cipher_klad_encrypt_key() argument
|
H A D | hi_drv_compat.c | 23 hi_s32 klad_load_hard_key(hi_u32 handle, hi_u32 ca_type, const hi_u8 *key, hi_u32 key_len) in klad_load_hard_key() argument 27 ret = drv_cipher_klad_load_key(handle, ca_type, HI_CIPHER_KLAD_TARGET_AES, key, key_len); in klad_load_hard_key() 36 hi_s32 klad_encrypt_key(hi_u32 keysel, hi_u32 target, hi_u8 *clear, hi_u8 *encrypt, hi_u32 key_len) in klad_encrypt_key() argument 40 ret = drv_cipher_klad_encrypt_key(keysel, target, clear, encrypt, key_len); in klad_encrypt_key()
|
H A D | hi_drv_compat.h | 24 hi_s32 klad_load_hard_key(hi_u32 handle, hi_u32 ca_type, const hi_u8 *key, hi_u32 key_len); 25 hi_s32 klad_encrypt_key(hi_u32 keysel, hi_u32 target, hi_u8 *clear, hi_u8 *encrypt, hi_u32 key_len);
|
H A D | drv_klad.h | 59 hi_cipher_ca_type root_key, hi_cipher_klad_target target, const hi_u8 *data_in, hi_u32 key_len); 62 hi_u8 *clean_key, hi_u8 *encrypt_key, hi_u32 key_len);
|
/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/ |
H A D | hmac_wapi_wpi.c | 68 hi_u8 key_len = wpi_key.key_len; in hmac_wpi_encrypt() local 77 hmac_sms4_keyext(puc_key, key_len, aul_pr_keyin, WPI_PR_KEYIN_LEN); in hmac_wpi_encrypt() 151 hi_u8 key_len = wpi_key.key_len; in hmac_wpi_pmac() local 160 hmac_sms4_keyext(puc_key, key_len, aul_pr_mac_keyin, WPI_PR_KEYIN_LEN); in hmac_wpi_pmac()
|
H A D | hmac_wapi_wpi.h | 36 hi_u8 key_len; member
|
H A D | hmac_wapi_sms4.h | 47 hi_void hmac_sms4_keyext(const hi_u8 *puc_key, hi_u8 key_len, hi_u32 *puc_rk, hi_u8 rk_len);
|
H A D | hmac_11i.c | 123 if (key_param->key_len != (WAPI_KEY_LEN * 2)) /* 扩大2倍 */ in hmac_config_wapi_add_key() 124 if (key_param->key_len != (WAPI_KEY_LEN * 2)) { /* 扩大2倍 */ in hmac_config_wapi_add_key() 125 oam_error_log1(0, OAM_SF_WPA, "{hmac_config_wapi_add_key:: key_len %d Err!.}", key_param->key_len); in hmac_config_wapi_add_key() 317 if (priv_key->key_len == 0) { in hmac_config_11i_get_key() 327 key.key_len = (hi_s32)priv_key->key_len; in hmac_config_11i_get_key() 377 if (key->key_len == 0) { in hmac_config_11i_remove_key() 412 key->key_len = 0; in hmac_config_11i_remove_key()
|
H A D | hmac_wapi_sms4.c | 147 hi_void hmac_sms4_keyext(const hi_u8 *puc_key, hi_u8 key_len, hi_u32 *puc_rk, hi_u8 rk_len) in hmac_sms4_keyext() argument 153 if (memcpy_s(x, sizeof(x), puc_key, key_len) != EOK) { /* 16:大小 */ in hmac_sms4_keyext()
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/system/upg/ |
H A D | upg_common.c | 972 hi_u32 upg_get_aes_info(HI_CONST boot_header *head, hi_u8 *key, hi_u32 key_len, hi_u8 *iv, hi_u32 iv_len) in upg_get_aes_info() argument 979 if ((head == HI_NULL) || (key_len != IV_BYTE_LEN) || (iv_len != IV_BYTE_LEN)) { in upg_get_aes_info() 993 if ((memcpy_s(key, key_len, comk->boot_key, key_len) != EOK) || in upg_get_aes_info() 1004 hi_u32 upg_set_kdf_key(const hi_u8 *boo_key, hi_u32 key_len) in upg_set_kdf_key() argument 1010 if (key_len != IV_BYTE_LEN) { in upg_set_kdf_key() 1034 hi_u32 upg_boot_key_decrypt(hi_u8 *key, hi_u32 key_len, const hi_u8 *iv, hi_u32 iv_len) in upg_boot_key_decrypt() argument 1054 aes_ctrl->key_len = HI_CIPHER_AES_KEY_LENGTH_256BIT; in upg_boot_key_decrypt() 1060 ret = hi_cipher_aes_crypto((uintptr_t)key, (uintptr_t)key, key_len, HI_FALSE); in upg_boot_key_decrypt() 1067 hi_u32 upg_get_unencrpt_rsa_key(hi_u8 *key, hi_u32 key_len) in upg_get_unencrpt_rsa_key() argument 1087 upg_get_unencrpt_ecc_key(hi_u8 *key, hi_u32 key_len) upg_get_unencrpt_ecc_key() argument 1105 upg_get_decrpt_rsa_key(HI_CONST boot_header *head, hi_u8 *key, hi_u32 key_len) upg_get_decrpt_rsa_key() argument 1155 upg_get_decrpt_ecc_key(HI_CONST boot_header *head, hi_u8 *key, hi_u32 key_len) upg_get_decrpt_ecc_key() argument 1202 upg_get_rsa_key_from_boot(hi_u8 *key, hi_u32 key_len) upg_get_rsa_key_from_boot() argument 1248 upg_get_ecc_key_from_boot(hi_u8 *key, hi_u32 key_len) upg_get_ecc_key_from_boot() argument [all...] |
H A D | upg_common.h | 107 hi_u32 upg_get_rsa_key_from_boot(hi_u8 *key, hi_u32 key_len); 108 hi_u32 upg_get_ecc_key_from_boot(hi_u8 *key, hi_u32 key_len);
|
H A D | upg_check_secure.c | 285 param.key_len = key_length; in upg_check_upg_file_code() 335 param.total_size[0] = sizeof(hi_upg_common_head) + head->key_len; in upg_check_upg_file_head() 338 param.key_len = (key_length / 2); /* 2: ken len include (px+py) or (key_n+key_e) */ in upg_check_upg_file_head() 339 param.key_e = key + param.key_len; in upg_check_upg_file_head() 340 param.sign = (hi_u8 *)upg_head + sizeof(hi_upg_common_head) + head->key_len; in upg_check_upg_file_head()
|
H A D | upg_check_secure.h | 48 hi_u32 key_len; member
|
H A D | kernel_crypto.c | 144 aes_ctrl->key_len = HI_CIPHER_AES_KEY_LENGTH_256BIT; in crpto_set_aes_ctrl_default_value() 166 .key_len = HI_CIPHER_AES_KEY_LENGTH_256BIT, in crypto_decrypt_hash() 210 aes_ctrl.key_len = HI_CIPHER_AES_KEY_LENGTH_256BIT; in crypto_encrypt_hash() 648 aes_ctrl.key_len = HI_CIPHER_AES_KEY_LENGTH_256BIT; in crypto_upg_file_decrypt()
|
/device/soc/rockchip/rk3588/kernel/include/trace/hooks/ |
H A D | fips140.h | 30 unsigned int key_len, 32 TP_ARGS(ctx, in_key, key_len, err));
|
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/interdrv/common/cipher/include/ |
H A D | hi_cipher_compat.h | 202 hi_cipher_key_len key_len; /* Key length */ member 213 hi_cipher_key_len key_len; /* Key length */ member 222 hi_cipher_key_len key_len; /* Key length */ member 244 hi_cipher_key_len key_len; /* Key length */ member
|
/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/ |
H A D | mac_user.c | 196 if (key->key_len > key_max_len) { in mac_user_add_key_common() 205 mac_user->key_info.ast_key[key_index].key_len = (hi_u32)key->key_len; in mac_user_add_key_common() 208 if (memcpy_s(mac_user->key_info.ast_key[key_index].auc_key, WLAN_WPA_KEY_LEN, key->auc_key, (hi_u32)key->key_len) != in mac_user_add_key_common() 268 (hi_u32)key->key_len) != EOK) { in mac_user_add_bip_key() 276 mac_user->key_info.ast_key[key_index].key_len = (hi_u32)key->key_len; in mac_user_add_bip_key()
|
/device/soc/rockchip/common/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/include/ |
H A D | eapol.h | 156 unsigned short key_len; /* Key Length (unaligned) */ member 171 unsigned short key_len; /* Key Length (unaligned) */ member
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/third_party/mbedtls/include/mbedtls/ |
H A D | cmac.h | 186 * \param key_len The key length in Bytes. 194 int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_len,
|
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/interdrv/common/cipher/src/drv/cipher_v1.0/drivers/core/include/ |
H A D | drv_symc.h | 363 hi_void drv_symc_set_key(hi_u32 chn_num, const hi_u32 key[SYMC_KEY_MAX_SIZE_IN_WORD], hi_u32 key_len, hi_u32 odd); 371 hi_void drv_symc_set_sm1_sk(hi_u32 chn_num, const hi_u32 key[SYMC_SM1_SK_SIZE_IN_WORD], hi_u32 key_len);
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/build/scripts/ |
H A D | make_upg_file.py | 107 ("key_len", hi_u32),
169 print("[file_len=0x%x][key_len=0x%x]"%(st_hupg.file_len, st_hupg.key_len))
181 common_sign_offset = sizeof(hi_upg_common_head) + st_hupg.key_len
197 common_sign_offset = sizeof(hi_upg_common_head) + st_hupg.key_len
213 common_sign_offset = sizeof(hi_upg_common_head) + st_hupg.key_len
248 print("[file_len=0x%x][key_len=0x%x]"%(st_hupg.file_len, st_hupg.key_len))
492 common_head.key_len = common_key_size
774 common_head.key_len [all...] |
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/loaderboot/secure/ |
H A D | load_crypto.c | 40 aes_ctrl->key_len = HI_CIPHER_AES_KEY_LENGTH_256BIT; in crpto_set_aes_ctrl_default_value() 151 .key_len = HI_CIPHER_AES_KEY_LENGTH_256BIT, in crypto_decrypt_hash() 198 aes_ctrl.key_len = HI_CIPHER_AES_KEY_LENGTH_256BIT; in crypto_encrypt_hash()
|