Home
last modified time | relevance | path

Searched refs:crypto_info (Results 1 – 17 of 17) sorted by relevance

/linux/net/tls/
H A Dtls_main.c76 .crypto_info = sizeof(struct ci)
441 struct tls_crypto_info *crypto_info; in do_tls_getsockopt_conf() local
448 if (!optval || (len < sizeof(*crypto_info))) { in do_tls_getsockopt_conf()
460 crypto_info = &ctx->crypto_send.info; in do_tls_getsockopt_conf()
463 crypto_info = &ctx->crypto_recv.info; in do_tls_getsockopt_conf()
467 if (!TLS_CRYPTO_INFO_READY(crypto_info)) { in do_tls_getsockopt_conf()
472 if (len == sizeof(*crypto_info)) { in do_tls_getsockopt_conf()
473 if (copy_to_user(optval, crypto_info, sizeof(*crypto_info))) in do_tls_getsockopt_conf()
478 cipher_desc = get_cipher_desc(crypto_info->cipher_type); in do_tls_getsockopt_conf()
479 if (!cipher_desc || len != cipher_desc->crypto_info) { in do_tls_getsockopt_conf()
[all …]
H A Dtls.h67 size_t crypto_info; member
82 static inline char *crypto_info_iv(struct tls_crypto_info *crypto_info, in crypto_info_iv() argument
85 return (char *)crypto_info + cipher_desc->iv_offset; in crypto_info_iv()
88 static inline char *crypto_info_key(struct tls_crypto_info *crypto_info, in crypto_info_key() argument
91 return (char *)crypto_info + cipher_desc->key_offset; in crypto_info_key()
94 static inline char *crypto_info_salt(struct tls_crypto_info *crypto_info, in crypto_info_salt() argument
97 return (char *)crypto_info + cipher_desc->salt_offset; in crypto_info_salt()
100 static inline char *crypto_info_rec_seq(struct tls_crypto_info *crypto_info, in crypto_info_rec_seq() argument
103 return (char *)crypto_info + cipher_desc->rec_seq_offset; in crypto_info_rec_seq()
148 const struct tls_crypto_info *crypto_info,
[all …]
H A Dtls_device.c1067 struct tls_crypto_info *crypto_info; in tls_set_device_offload() local
1091 crypto_info = &ctx->crypto_send.info; in tls_set_device_offload()
1092 if (crypto_info->version != TLS_1_2_VERSION) { in tls_set_device_offload()
1097 cipher_desc = get_cipher_desc(crypto_info->cipher_type); in tls_set_device_offload()
1103 rc = init_prot_info(prot, crypto_info, cipher_desc); in tls_set_device_offload()
1107 iv = crypto_info_iv(crypto_info, cipher_desc); in tls_set_device_offload()
1108 rec_seq = crypto_info_rec_seq(crypto_info, cipher_desc); in tls_set_device_offload()
1125 rc = tls_sw_fallback_init(sk, offload_ctx, crypto_info); in tls_set_device_offload()
H A Dtls_device_fallback.c441 struct tls_crypto_info *crypto_info) in tls_sw_fallback_init() argument
446 cipher_desc = get_cipher_desc(crypto_info->cipher_type); in tls_sw_fallback_init()
460 crypto_info_key(crypto_info, cipher_desc), in tls_sw_fallback_init()
H A Dtls_sw.c2739 const struct tls_crypto_info *crypto_info, in init_prot_info() argument
2744 if (crypto_info->version == TLS_1_3_VERSION) { in init_prot_info()
2757 prot->version = crypto_info->version; in init_prot_info()
2758 prot->cipher_type = crypto_info->cipher_type; in init_prot_info()
2781 struct tls_crypto_info *crypto_info, *src_crypto_info; in tls_set_sw_offload() local
2811 crypto_info = &ctx->crypto_send.info; in tls_set_sw_offload()
2816 crypto_info = &ctx->crypto_recv.info; in tls_set_sw_offload()
2821 src_crypto_info = new_crypto_info ?: crypto_info; in tls_set_sw_offload()
2885 unsafe_memcpy(crypto_info, new_crypto_info, in tls_set_sw_offload()
2886 cipher_desc->crypto_info, in tls_set_sw_offload()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
H A Dktls_txrx.c24 union mlx5e_crypto_info *crypto_info, in fill_static_params() argument
35 switch (crypto_info->crypto_info.cipher_type) { in fill_static_params()
38 &crypto_info->crypto_info_128; in fill_static_params()
45 &crypto_info->crypto_info_256; in fill_static_params()
52 crypto_info->crypto_info.cipher_type); in fill_static_params()
76 union mlx5e_crypto_info *crypto_info, in mlx5e_ktls_build_static_params() argument
97 fill_static_params(&wqe->params, crypto_info, key_id, resync_tcp_sn); in mlx5e_ktls_build_static_params()
H A Dktls.c13 struct tls_crypto_info *crypto_info) in mlx5_ktls_create_key() argument
18 switch (crypto_info->cipher_type) { in mlx5_ktls_create_key()
21 (struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in mlx5_ktls_create_key()
29 (struct tls12_crypto_info_aes_gcm_256 *)crypto_info; in mlx5_ktls_create_key()
50 struct tls_crypto_info *crypto_info, in mlx5e_ktls_add() argument
57 if (!mlx5e_ktls_type_check(mdev, crypto_info)) in mlx5e_ktls_add()
61 err = mlx5e_ktls_add_tx(netdev, sk, crypto_info, start_offload_tcp_sn); in mlx5e_ktls_add()
63 err = mlx5e_ktls_add_rx(netdev, sk, crypto_info, start_offload_tcp_sn); in mlx5e_ktls_add()
H A Dktls.h17 struct tls_crypto_info *crypto_info);
37 struct tls_crypto_info *crypto_info) in mlx5e_ktls_type_check() argument
39 switch (crypto_info->cipher_type) { in mlx5e_ktls_type_check()
41 if (crypto_info->version == TLS_1_2_VERSION) in mlx5e_ktls_type_check()
45 if (crypto_info->version == TLS_1_2_VERSION) in mlx5e_ktls_type_check()
H A Dktls_utils.h23 struct tls_crypto_info *crypto_info, u32 start_offload_tcp_sn);
26 struct tls_crypto_info *crypto_info, u32 start_offload_tcp_sn);
31 struct tls_crypto_info crypto_info; member
81 union mlx5e_crypto_info *crypto_info,
H A Dktls_rx.c46 union mlx5e_crypto_info crypto_info; member
149 mlx5e_ktls_build_static_params(wqe, sq->pc, sq->sqn, &priv_rx->crypto_info, in post_static_params()
380 switch (priv_rx->crypto_info.crypto_info.cipher_type) { in resync_handle_seq_match()
383 &priv_rx->crypto_info.crypto_info_128; in resync_handle_seq_match()
391 &priv_rx->crypto_info.crypto_info_256; in resync_handle_seq_match()
399 priv_rx->crypto_info.crypto_info.cipher_type); in resync_handle_seq_match()
634 struct tls_crypto_info *crypto_info, in mlx5e_ktls_add_rx() argument
650 switch (crypto_info->cipher_type) { in mlx5e_ktls_add_rx()
652 priv_rx->crypto_info.crypto_info_128 = in mlx5e_ktls_add_rx()
653 *(struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in mlx5e_ktls_add_rx()
[all …]
H A Dktls_tx.c97 union mlx5e_crypto_info crypto_info; member
455 struct tls_crypto_info *crypto_info, u32 start_offload_tcp_sn) in mlx5e_ktls_add_tx() argument
472 switch (crypto_info->cipher_type) { in mlx5e_ktls_add_tx()
474 priv_tx->crypto_info.crypto_info_128 = in mlx5e_ktls_add_tx()
475 *(struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in mlx5e_ktls_add_tx()
478 priv_tx->crypto_info.crypto_info_256 = in mlx5e_ktls_add_tx()
479 *(struct tls12_crypto_info_aes_gcm_256 *)crypto_info; in mlx5e_ktls_add_tx()
483 crypto_info->cipher_type); in mlx5e_ktls_add_tx()
488 dek = mlx5_ktls_create_key(priv->tls->dek_pool, crypto_info); in mlx5e_ktls_add_tx()
559 mlx5e_ktls_build_static_params(wqe, sq->pc, sq->sqn, &priv_tx->crypto_info, in post_static_params()
[all …]
/linux/drivers/net/ethernet/chelsio/inline_crypto/chtls/
H A Dchtls_main.c471 struct tls_crypto_info crypto_info = { 0 }; in do_chtls_getsockopt() local
473 crypto_info.version = TLS_1_2_VERSION; in do_chtls_getsockopt()
474 if (copy_to_user(optval, &crypto_info, sizeof(struct tls_crypto_info))) in do_chtls_getsockopt()
494 struct tls_crypto_info *crypto_info, tmp_crypto_info; in do_chtls_setsockopt() local
502 if (sockptr_is_null(optval) || optlen < sizeof(*crypto_info)) { in do_chtls_setsockopt()
507 rc = copy_from_sockptr(&tmp_crypto_info, optval, sizeof(*crypto_info)); in do_chtls_setsockopt()
519 crypto_info = (struct tls_crypto_info *)&csk->tlshws.crypto_info; in do_chtls_setsockopt()
527 crypto_info[0] = tmp_crypto_info; in do_chtls_setsockopt()
529 rc = copy_from_sockptr_offset((char *)crypto_info + in do_chtls_setsockopt()
530 sizeof(*crypto_info), in do_chtls_setsockopt()
[all …]
/linux/drivers/net/ethernet/fungible/funeth/
H A Dfuneth_ktls.c20 struct tls_crypto_info *crypto_info, in fun_ktls_add() argument
38 if (crypto_info->version == TLS_1_2_VERSION) in fun_ktls_add()
43 switch (crypto_info->cipher_type) { in fun_ktls_add()
45 struct tls12_crypto_info_aes_gcm_128 *c = (void *)crypto_info; in fun_ktls_add()
/linux/tools/testing/selftests/net/
H A Dtls.c33 struct tls_crypto_info crypto_info; member
262 tls12.crypto_info.version = 200; in TEST_F()
263 tls12.crypto_info.cipher_type = TLS_CIPHER_AES_GCM_128; in TEST_F()
266 tls12.crypto_info.version = TLS_1_2_VERSION; in TEST_F()
267 tls12.crypto_info.cipher_type = 50; in TEST_F()
270 tls12.crypto_info.version = TLS_1_2_VERSION; in TEST_F()
271 tls12.crypto_info.cipher_type = 59; in TEST_F()
274 tls12.crypto_info.version = TLS_1_2_VERSION; in TEST_F()
275 tls12.crypto_info.cipher_type = 10; in TEST_F()
278 tls12.crypto_info.version = TLS_1_2_VERSION; in TEST_F()
[all …]
/linux/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/
H A Dchcr_ktls.c72 struct tls_crypto_info *crypto_info, in chcr_ktls_save_keys() argument
82 switch (crypto_info->cipher_type) { in chcr_ktls_save_keys()
85 (struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in chcr_ktls_save_keys()
130 crypto_info->cipher_type); in chcr_ktls_save_keys()
414 struct tls_crypto_info *crypto_info, in chcr_ktls_dev_add() argument
472 ret = chcr_ktls_save_keys(tx_info, crypto_info, direction); in chcr_ktls_dev_add()
/linux/include/net/
H A Dtls.h278 struct tls_crypto_info *crypto_info,
/linux/drivers/net/ethernet/chelsio/cxgb4/
H A Dcxgb4_main.c6427 struct tls_crypto_info *crypto_info, in cxgb4_ktls_dev_add() argument
6444 crypto_info, in cxgb4_ktls_dev_add()