/device/board/unionman/unionpi_tiger/kernel/drivers/rtl88x2cs/core/crypto/ |
D | aes-siv.c | 63 static int aes_s2v(const u8 *key, size_t key_len, in aes_s2v() argument 78 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 83 ret = omac1_aes_vector(key, key_len, 1, data, data_len, tmp); in aes_s2v() 88 ret = omac1_aes_vector(key, key_len, 1, &addr[i], &len[i], in aes_s2v() 103 ret = omac1_aes_vector(key, key_len, 1, data, &len[i], mac); in aes_s2v() 114 return omac1_aes_vector(key, key_len, 1, data, data_len, mac); in aes_s2v() 118 int aes_siv_encrypt(const u8 *key, size_t key_len, in aes_siv_encrypt() argument 131 (key_len != 32 && key_len != 48 && key_len != 64)) in aes_siv_encrypt() 134 key_len /= 2; in aes_siv_encrypt() 136 k2 = key + key_len; in aes_siv_encrypt() [all …]
|
D | sha256.c | 26 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, in hmac_sha256_vector() argument 43 if (key_len > 64) { in hmac_sha256_vector() 44 if (sha256_vector(1, &key, &key_len, tk) < 0) in hmac_sha256_vector() 47 key_len = 32; in hmac_sha256_vector() 61 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector() 77 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector() 100 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, in hmac_sha256() argument 103 return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac); in hmac_sha256()
|
D | sha256-prf.c | 31 int sha256_prf(const u8 *key, size_t key_len, const char *label, in sha256_prf() argument 34 return sha256_prf_bits(key, key_len, label, data, data_len, buf, in sha256_prf() 55 int sha256_prf_bits(const u8 *key, size_t key_len, const char *label, in sha256_prf_bits() argument 82 if (hmac_sha256_vector(key, key_len, 4, addr, len, in sha256_prf_bits() 87 if (hmac_sha256_vector(key, key_len, 4, addr, len, in sha256_prf_bits()
|
D | aes_wrap.h | 25 int __must_check omac1_aes_vector(const u8 *key, size_t key_len, 36 int __must_check aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, 52 int __must_check aes_gcm_ae(const u8 *key, size_t key_len, 57 int __must_check aes_gcm_ad(const u8 *key, size_t key_len, 62 int __must_check aes_gmac(const u8 *key, size_t key_len, 65 int __must_check aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce, 68 int __must_check aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
|
D | sha256.h | 14 int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, 16 int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, 18 int sha256_prf(const u8 *key, size_t key_len, const char *label, 20 int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,
|
D | aes-gcm.c | 174 static void * aes_gcm_init_hash_subkey(const u8 *key, size_t key_len, u8 *H) in aes_gcm_init_hash_subkey() argument 178 aes = aes_encrypt2_init(key, key_len); in aes_gcm_init_hash_subkey() 253 int aes_gcm_ae(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gcm_ae() argument 262 aes = aes_gcm_init_hash_subkey(key, key_len, H); in aes_gcm_ae() 287 int aes_gcm_ad(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gcm_ad() argument 296 aes = aes_gcm_init_hash_subkey(key, key_len, H); in aes_gcm_ad() 321 int aes_gmac(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len, in aes_gmac() argument 324 return aes_gcm_ae(key, key_len, iv, iv_len, NULL, 0, aad, aad_len, NULL, in aes_gmac()
|
D | aes_siv.h | 12 int aes_siv_encrypt(const u8 *key, size_t key_len, 16 int aes_siv_decrypt(const u8 *key, size_t key_len,
|
/device/board/unionman/unionpi_tiger/kernel/drivers/rtl88x2cs/core/ |
D | rtw_swcrypto.c | 30 int _rtw_ccmp_encrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen) in _rtw_ccmp_encrypt() argument 35 if (key_len == 16) { /* 128 bits */ in _rtw_ccmp_encrypt() 42 } else if (key_len == 32) { /* 256 bits */ in _rtw_ccmp_encrypt() 52 RTW_INFO("Failed to encrypt CCMP(%u) frame", key_len); in _rtw_ccmp_encrypt() 71 int _rtw_ccmp_decrypt(_adapter * padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, in _rtw_ccmp_decrypt() argument 80 if (key_len == 16) { /* 128 bits */ in _rtw_ccmp_decrypt() 86 } else if (key_len == 32) { /* 256 bits */ in _rtw_ccmp_decrypt() 95 RTW_INFO("Failed to decrypt CCMP(%u) frame", key_len); in _rtw_ccmp_decrypt() 112 int _aes_siv_encrypt(const u8 *key, size_t key_len, in _aes_siv_encrypt() argument 116 return aes_siv_encrypt(key, key_len, pw, pwlen, num_elem, addr, len, out); in _aes_siv_encrypt() [all …]
|
/device/board/unionman/unionpi_tiger/kernel/drivers/rtl88x2cs/include/ |
D | rtw_swcrypto.h | 21 int _rtw_ccmp_encrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen); 22 int _rtw_ccmp_decrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen); 24 int _rtw_gcmp_encrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen); 25 int _rtw_gcmp_decrypt(_adapter *padapter, u8 *key, u32 key_len, uint hdrlen, u8 *frame, uint plen); 28 int _aes_siv_encrypt(const u8 *key, size_t key_len, 31 int _aes_siv_decrypt(const u8 *key, size_t key_len, 37 u8 _bip_ccmp_protect(const u8 *key, size_t key_len, 40 const u8 *key, size_t key_len,
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/boot/flashboot/upg/ |
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_key + ECC_256_LEN, ECC_256_LEN, cs); in boot_upg_secure_get_key_part2() [all …]
|
/device/soc/beken/bk7235/liteos_m/bk_sdk_armino/components/security/ |
D | security_func.c | 54 int i, key_len; in sec_Command() local 57 key_len = os_strtoul(argv[2], NULL, 10);; in sec_Command() 59 key_len = os_strtoul(argv[2], NULL, 10);; in sec_Command() 70 os_printf("key len%d: ", key_len); in sec_Command() 81 ctx = hal_aes_init(aes256_key, key_len); in sec_Command() 92 ctx = aes_decrypt_init(aes256_key, key_len); in sec_Command() 109 ctx = aes_encrypt_init(aes256_key, key_len); in sec_Command() 120 ctx = hal_aes_init(aes256_key, key_len); in sec_Command()
|
/device/soc/esp/esp32/components/esp_wifi/include/ |
D | esp_wifi_crypto_types.h | 119 typedef int (*esp_hmac_sha256_vector_t)(const unsigned char *key, int key_len, int num_elem, 134 typedef int (*esp_sha256_prf_t)(const unsigned char *key, int key_len, const char *label, 147 typedef int (*esp_hmac_md5_t)(const unsigned char *key, unsigned int key_len, const unsigned char *… 161 typedef int (*esp_hmac_md5_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int n… 174 typedef int (*esp_hmac_sha1_t)(const unsigned char *key, unsigned int key_len, const unsigned char … 188 typedef int (*esp_hmac_sha1_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int … 206 typedef int (*esp_sha1_prf_t)(const unsigned char *key, unsigned int key_len, const char *label,
|
/device/board/unionman/unionpi_tiger/kernel/drivers/rtl88x2cs/os_dep/linux/ |
D | rhashtable.h | 118 size_t key_len; member 147 unsigned int key_len; member 218 if (!__builtin_constant_p(params.key_len)) in rht_key_hashfn() 219 hash = ht->p.hashfn(key, ht->key_len, tbl->hash_rnd); in rht_key_hashfn() 220 else if (params.key_len) { in rht_key_hashfn() 221 unsigned int key_len = params.key_len; in rht_key_hashfn() local 224 hash = params.hashfn(key, key_len, tbl->hash_rnd); in rht_key_hashfn() 225 else if (key_len & (sizeof(u32) - 1)) in rht_key_hashfn() 226 hash = jhash(key, key_len, tbl->hash_rnd); in rht_key_hashfn() 228 hash = jhash2(key, key_len / sizeof(u32), in rht_key_hashfn() [all …]
|
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/interdrv/common/cipher/src/drv/cipher_v1.0/compat/ |
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() argument 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() argument 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()
|
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()
|
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);
|
/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/hmac/ |
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()
|
/device/board/isoftstone/zhiyuan/kernel/driver/drivers/net/wireless/xr829/umac/ |
D | fils_aead.c | 66 static int aes_siv_encrypt(const u8 *key, size_t key_len, in aes_siv_encrypt() argument 79 key_len /= 2; /* S2V key || CTR key */ in aes_siv_encrypt() 91 res = crypto_shash_setkey(tfm, key, key_len); in aes_siv_encrypt() 122 res = crypto_skcipher_setkey(tfm2, key + key_len, key_len); in aes_siv_encrypt() 144 static int aes_siv_decrypt(const u8 *key, size_t key_len, in aes_siv_decrypt() argument 159 key_len /= 2; /* S2V key || CTR key */ in aes_siv_decrypt() 179 res = crypto_skcipher_setkey(tfm2, key + key_len, key_len); in aes_siv_decrypt() 206 res = crypto_shash_setkey(tfm, key, key_len); in aes_siv_decrypt()
|
D | aes_ccm.h | 15 ieee80211_aes_key_setup_encrypt(const u8 key[], size_t key_len, size_t mic_len) in ieee80211_aes_key_setup_encrypt() argument 17 return aead_key_setup_encrypt("ccm(aes)", key, key_len, mic_len); in ieee80211_aes_key_setup_encrypt()
|
D | aes_gcm.h | 32 ieee80211_aes_gcm_key_setup_encrypt(const u8 key[], size_t key_len) in ieee80211_aes_gcm_key_setup_encrypt() argument 35 key_len, IEEE80211_GCMP_MIC_LEN); in ieee80211_aes_gcm_key_setup_encrypt()
|
/device/soc/hisilicon/hi3861v100/sdk_liteos/platform/system/upg/ |
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 i… 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 1081 key[key_len - 1] = 0x01; /* 1: first byte. 0x01: part of key_e 0x10001 */ in upg_get_unencrpt_rsa_key() [all …]
|
/device/soc/beken/bk7235/liteos_m/bk_sdk_armino/components/easy_flash/src/ |
D | ef_env.c | 295 size_t key_len = strlen(key), value_len = strlen(value), env_str_len; in write_env() local 299 env_str_len = key_len + value_len + 2; in write_env() 310 memmove(env_cache_bak, key, key_len); in write_env() 311 env_cache_bak += key_len; in write_env() 322 memset(env_cache_bak, 0, env_str_len - (key_len + value_len + 2)); in write_env() 340 size_t key_len = strlen(key), env_len; in find_env() local 358 if (!strncmp(env, key, key_len) && (env[key_len] == '=')) { in find_env()
|
/device/soc/hisilicon/common/platform/wifi/hi3881v100/driver/mac/common/ |
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 …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/hisilicon/hi3516dv300/sdk_linux/drv/interdrv/common/cipher/include/ |
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/board/isoftstone/zhiyuan/kernel/driver/drivers/net/wireless/xr829/include/crypto/ |
D | aes.h | 52 unsigned int key_len); 69 unsigned int key_len);
|