Home
last modified time | relevance | path

Searched refs:alg_key_len (Results 1 – 16 of 16) sorted by relevance

/openbmc/qemu/crypto/
H A Dcipher.c28 static const size_t alg_key_len[QCRYPTO_CIPHER_ALGO__MAX] = { variable
74 assert(alg < G_N_ELEMENTS(alg_key_len)); in qcrypto_cipher_get_block_len()
81 assert(alg < G_N_ELEMENTS(alg_key_len)); in qcrypto_cipher_get_key_len()
82 return alg_key_len[alg]; in qcrypto_cipher_get_key_len()
126 if (alg_key_len[alg] != (nkey / 2)) { in qcrypto_cipher_validate_key_length()
128 nkey, alg_key_len[alg] * 2); in qcrypto_cipher_validate_key_length()
132 if (alg_key_len[alg] != nkey) { in qcrypto_cipher_validate_key_length()
134 nkey, alg_key_len[alg]); in qcrypto_cipher_validate_key_length()
/openbmc/linux/drivers/net/ethernet/netronome/nfp/crypto/
H A Dipsec.c368 key_len = DIV_ROUND_UP(x->aalg->alg_key_len, BITS_PER_BYTE); in nfp_net_xfrm_add_state()
408 if (set_aes_keylen(cfg, x->props.ealgo, x->aead->alg_key_len - 32)) { in nfp_net_xfrm_add_state()
419 if (set_aes_keylen(cfg, x->props.ealgo, x->ealg->alg_key_len) < 0) { in nfp_net_xfrm_add_state()
432 key_len = DIV_ROUND_UP(x->aead->alg_key_len, BITS_PER_BYTE); in nfp_net_xfrm_add_state()
449 key_len = DIV_ROUND_UP(x->ealg->alg_key_len, BITS_PER_BYTE); in nfp_net_xfrm_add_state()
/openbmc/linux/net/xfrm/
H A Dxfrm_user.c446 p = kmalloc(sizeof(*p) + (ualg->alg_key_len + 7) / 8, GFP_KERNEL); in attach_auth()
451 p->alg_key_len = ualg->alg_key_len; in attach_auth()
453 memcpy(p->alg_key, ualg->alg_key, (ualg->alg_key_len + 7) / 8); in attach_auth()
985 sizeof(*algo) + (auth->alg_key_len + 7) / 8); in copy_to_user_auth()
991 if (redact_secret && auth->alg_key_len) in copy_to_user_auth()
992 memset(algo->alg_key, 0, (auth->alg_key_len + 7) / 8); in copy_to_user_auth()
995 (auth->alg_key_len + 7) / 8); in copy_to_user_auth()
996 algo->alg_key_len = auth->alg_key_len; in copy_to_user_auth()
1003 ap->alg_key_len = auth->alg_key_len; in copy_to_user_auth()
1005 if (redact_secret && auth->alg_key_len) in copy_to_user_auth()
[all …]
/openbmc/linux/include/uapi/linux/
H A Dxfrm.h104 unsigned int alg_key_len; /* in bits */ member
110 unsigned int alg_key_len; /* in bits */ member
117 unsigned int alg_key_len; /* in bits */ member
/openbmc/linux/net/ipv4/
H A Desp4.c1032 (x->aead->alg_key_len + 7) / 8); in esp_init_aead()
1092 keylen = (x->aalg ? (x->aalg->alg_key_len + 7) / 8 : 0) + in esp_init_authenc()
1093 (x->ealg->alg_key_len + 7) / 8 + RTA_SPACE(sizeof(*param)); in esp_init_authenc()
1109 memcpy(p, x->aalg->alg_key, (x->aalg->alg_key_len + 7) / 8); in esp_init_authenc()
1110 p += (x->aalg->alg_key_len + 7) / 8; in esp_init_authenc()
1130 param->enckeylen = cpu_to_be32((x->ealg->alg_key_len + 7) / 8); in esp_init_authenc()
1131 memcpy(p, x->ealg->alg_key, (x->ealg->alg_key_len + 7) / 8); in esp_init_authenc()
H A Dah4.c502 (x->aalg->alg_key_len + 7) / 8)) { in ah_init_state()
/openbmc/linux/net/ipv6/
H A Desp6.c1075 (x->aead->alg_key_len + 7) / 8); in esp_init_aead()
1135 keylen = (x->aalg ? (x->aalg->alg_key_len + 7) / 8 : 0) + in esp_init_authenc()
1136 (x->ealg->alg_key_len + 7) / 8 + RTA_SPACE(sizeof(*param)); in esp_init_authenc()
1152 memcpy(p, x->aalg->alg_key, (x->aalg->alg_key_len + 7) / 8); in esp_init_authenc()
1153 p += (x->aalg->alg_key_len + 7) / 8; in esp_init_authenc()
1173 param->enckeylen = cpu_to_be32((x->ealg->alg_key_len + 7) / 8); in esp_init_authenc()
1174 memcpy(p, x->ealg->alg_key, (x->ealg->alg_key_len + 7) / 8); in esp_init_authenc()
H A Dah6.c697 (x->aalg->alg_key_len + 7) / 8)) { in ah6_init_state()
/openbmc/linux/drivers/net/ethernet/chelsio/inline_crypto/ch_ipsec/
H A Dchcr_ipsec.c170 int keylen = (x->aead->alg_key_len + 7) / 8; in ch_ipsec_setkey()
271 if ((x->aead->alg_key_len != 128 + 32) && in ch_ipsec_xfrm_add_state()
272 (x->aead->alg_key_len != 256 + 32)) { in ch_ipsec_xfrm_add_state()
/openbmc/linux/net/key/
H A Daf_key.c805 if (x->aalg && x->aalg->alg_key_len) { in __pfkey_xfrm_state2msg()
807 PFKEY_ALIGN8((x->aalg->alg_key_len + 7) / 8); in __pfkey_xfrm_state2msg()
810 if (x->ealg && x->ealg->alg_key_len) { in __pfkey_xfrm_state2msg()
812 PFKEY_ALIGN8((x->ealg->alg_key_len+7) / 8); in __pfkey_xfrm_state2msg()
968 key->sadb_key_bits = x->aalg->alg_key_len; in __pfkey_xfrm_state2msg()
970 memcpy(key + 1, x->aalg->alg_key, (x->aalg->alg_key_len+7)/8); in __pfkey_xfrm_state2msg()
978 key->sadb_key_bits = x->ealg->alg_key_len; in __pfkey_xfrm_state2msg()
981 (x->ealg->alg_key_len+7)/8); in __pfkey_xfrm_state2msg()
1183 x->aalg->alg_key_len = 0; in pfkey_msg2xfrm_state()
1185 x->aalg->alg_key_len = key->sadb_key_bits; in pfkey_msg2xfrm_state()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dipsec.c326 crypto_data_len = (x->aead->alg_key_len + 7) / 8; in mlx5e_ipsec_build_accel_xfrm_attrs()
465 if ((x->aead->alg_key_len != 128 + 32) && in mlx5e_xfrm_validate_state()
466 (x->aead->alg_key_len != 256 + 32)) { in mlx5e_xfrm_validate_state()
/openbmc/linux/drivers/net/netdevsim/
H A Dipsec.c105 key_len = xs->aead->alg_key_len; in nsim_ipsec_parse_proto_keys()
/openbmc/linux/tools/testing/selftests/net/
H A Dipsec.c854 sizeof(alg.buf), &alg.u.alg.alg_key_len)) in xfrm_state_pack_algo()
865 sizeof(alg.buf), &alg.u.alg.alg_key_len)) in xfrm_state_pack_algo()
878 sizeof(alg.buf), &alg.u.aead.alg_key_len)) in xfrm_state_pack_algo()
886 sizeof(alg.buf), &alg.u.alg.alg_key_len)) in xfrm_state_pack_algo()
894 sizeof(alg.buf), &alg.u.alg.alg_key_len)) in xfrm_state_pack_algo()
/openbmc/linux/drivers/net/ethernet/intel/ixgbe/
H A Dixgbe_ipsec.c447 key_len = xs->aead->alg_key_len; in ixgbe_ipsec_parse_proto_keys()
949 xs->aead->alg_key_len = IXGBE_IPSEC_KEY_BITS; in ixgbe_ipsec_vf_add_sa()
/openbmc/linux/include/net/
H A Dxfrm.h1870 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); in aead_len()
1875 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); in xfrm_alg_len()
1880 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); in xfrm_alg_auth_len()
/openbmc/linux/drivers/net/ethernet/intel/ixgbevf/
H A Dipsec.c231 key_len = xs->aead->alg_key_len; in ixgbevf_ipsec_parse_proto_keys()