Home
last modified time | relevance | path

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

/Linux-v5.10/drivers/crypto/rockchip/
Drk3288_crypto.c260 static int rk_crypto_register(struct rk_crypto_info *crypto_info) in rk_crypto_register() argument
266 rk_cipher_algs[i]->dev = crypto_info; in rk_crypto_register()
302 struct rk_crypto_info *crypto_info = data; in rk_crypto_action() local
304 reset_control_assert(crypto_info->rst); in rk_crypto_action()
316 struct rk_crypto_info *crypto_info; in rk_crypto_probe() local
319 crypto_info = devm_kzalloc(&pdev->dev, in rk_crypto_probe()
320 sizeof(*crypto_info), GFP_KERNEL); in rk_crypto_probe()
321 if (!crypto_info) { in rk_crypto_probe()
326 crypto_info->rst = devm_reset_control_get(dev, "crypto-rst"); in rk_crypto_probe()
327 if (IS_ERR(crypto_info->rst)) { in rk_crypto_probe()
[all …]
/Linux-v5.10/drivers/net/ethernet/mellanox/mlx5/core/accel/
Dtls.h42 struct tls_crypto_info *crypto_info,
69 struct tls_crypto_info *crypto_info) in mlx5e_ktls_type_check() argument
71 switch (crypto_info->cipher_type) { in mlx5e_ktls_type_check()
73 if (crypto_info->version == TLS_1_2_VERSION) in mlx5e_ktls_type_check()
89 struct tls_crypto_info *crypto_info, in mlx5_ktls_create_key() argument
98 struct tls_crypto_info *crypto_info) { return false; } in mlx5e_ktls_type_check() argument
124 struct tls_crypto_info *crypto_info,
140 struct tls_crypto_info *crypto_info, in mlx5_accel_tls_add_flow() argument
Dtls.c44 struct tls_crypto_info *crypto_info, in mlx5_accel_tls_add_flow() argument
48 return mlx5_fpga_tls_add_flow(mdev, flow, crypto_info, in mlx5_accel_tls_add_flow()
89 struct tls_crypto_info *crypto_info, in mlx5_ktls_create_key() argument
95 switch (crypto_info->cipher_type) { in mlx5_ktls_create_key()
98 (struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in mlx5_ktls_create_key()
106 (struct tls12_crypto_info_aes_gcm_256 *)crypto_info; in mlx5_ktls_create_key()
/Linux-v5.10/net/tls/
Dtls_main.c338 struct tls_crypto_info *crypto_info; in do_tls_getsockopt_conf() local
345 if (!optval || (len < sizeof(*crypto_info))) { in do_tls_getsockopt_conf()
357 crypto_info = &ctx->crypto_send.info; in do_tls_getsockopt_conf()
360 crypto_info = &ctx->crypto_recv.info; in do_tls_getsockopt_conf()
364 if (!TLS_CRYPTO_INFO_READY(crypto_info)) { in do_tls_getsockopt_conf()
369 if (len == sizeof(*crypto_info)) { in do_tls_getsockopt_conf()
370 if (copy_to_user(optval, crypto_info, sizeof(*crypto_info))) in do_tls_getsockopt_conf()
375 switch (crypto_info->cipher_type) { in do_tls_getsockopt_conf()
379 container_of(crypto_info, in do_tls_getsockopt_conf()
403 container_of(crypto_info, in do_tls_getsockopt_conf()
[all …]
Dtls_device.c1006 struct tls_crypto_info *crypto_info; in tls_set_device_offload() local
1029 crypto_info = &ctx->crypto_send.info; in tls_set_device_offload()
1030 if (crypto_info->version != TLS_1_2_VERSION) { in tls_set_device_offload()
1035 switch (crypto_info->cipher_type) { in tls_set_device_offload()
1040 iv = ((struct tls12_crypto_info_aes_gcm_128 *)crypto_info)->iv; in tls_set_device_offload()
1043 ((struct tls12_crypto_info_aes_gcm_128 *)crypto_info)->rec_seq; in tls_set_device_offload()
1056 prot->version = crypto_info->version; in tls_set_device_offload()
1057 prot->cipher_type = crypto_info->cipher_type; in tls_set_device_offload()
1078 rc = tls_sw_fallback_init(sk, offload_ctx, crypto_info); in tls_set_device_offload()
Dtls_sw.c2295 struct tls_crypto_info *crypto_info; in tls_set_sw_offload() local
2344 crypto_info = &ctx->crypto_send.info; in tls_set_sw_offload()
2353 crypto_info = &ctx->crypto_recv.info; in tls_set_sw_offload()
2359 switch (crypto_info->cipher_type) { in tls_set_sw_offload()
2364 iv = ((struct tls12_crypto_info_aes_gcm_128 *)crypto_info)->iv; in tls_set_sw_offload()
2367 ((struct tls12_crypto_info_aes_gcm_128 *)crypto_info)->rec_seq; in tls_set_sw_offload()
2369 (struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in tls_set_sw_offload()
2381 iv = ((struct tls12_crypto_info_aes_gcm_256 *)crypto_info)->iv; in tls_set_sw_offload()
2384 ((struct tls12_crypto_info_aes_gcm_256 *)crypto_info)->rec_seq; in tls_set_sw_offload()
2386 (struct tls12_crypto_info_aes_gcm_256 *)crypto_info; in tls_set_sw_offload()
[all …]
Dtls_device_fallback.c441 struct tls_crypto_info *crypto_info) in tls_sw_fallback_init() argument
455 key = ((struct tls12_crypto_info_aes_gcm_128 *)crypto_info)->key; in tls_sw_fallback_init()
/Linux-v5.10/drivers/net/ethernet/chelsio/inline_crypto/chtls/
Dchtls_main.c470 struct tls_crypto_info crypto_info = { 0 }; in do_chtls_getsockopt() local
472 crypto_info.version = TLS_1_2_VERSION; in do_chtls_getsockopt()
473 if (copy_to_user(optval, &crypto_info, sizeof(struct tls_crypto_info))) in do_chtls_getsockopt()
493 struct tls_crypto_info *crypto_info, tmp_crypto_info; in do_chtls_setsockopt() local
501 if (sockptr_is_null(optval) || optlen < sizeof(*crypto_info)) { in do_chtls_setsockopt()
506 rc = copy_from_sockptr(&tmp_crypto_info, optval, sizeof(*crypto_info)); in do_chtls_setsockopt()
518 crypto_info = (struct tls_crypto_info *)&csk->tlshws.crypto_info; in do_chtls_setsockopt()
526 crypto_info[0] = tmp_crypto_info; in do_chtls_setsockopt()
528 rc = copy_from_sockptr_offset((char *)crypto_info + in do_chtls_setsockopt()
529 sizeof(*crypto_info), in do_chtls_setsockopt()
[all …]
Dchtls_hw.c231 &csk->tlshws.crypto_info; in chtls_key_info()
244 &csk->tlshws.crypto_info; in chtls_key_info()
Dchtls.h273 } crypto_info; member
/Linux-v5.10/drivers/net/ethernet/mellanox/mlx5/core/en_accel/
Dktls.c11 struct tls_crypto_info *crypto_info, in mlx5e_ktls_add() argument
18 if (WARN_ON(!mlx5e_ktls_type_check(mdev, crypto_info))) in mlx5e_ktls_add()
22 err = mlx5e_ktls_add_tx(netdev, sk, crypto_info, start_offload_tcp_sn); in mlx5e_ktls_add()
24 err = mlx5e_ktls_add_rx(netdev, sk, crypto_info, start_offload_tcp_sn); in mlx5e_ktls_add()
Dktls_tx.c52 struct tls12_crypto_info_aes_gcm_128 crypto_info; member
82 struct tls_crypto_info *crypto_info, u32 start_offload_tcp_sn) in mlx5e_ktls_add_tx() argument
98 err = mlx5_ktls_create_key(mdev, crypto_info, &priv_tx->key_id); in mlx5e_ktls_add_tx()
103 priv_tx->crypto_info = in mlx5e_ktls_add_tx()
104 *(struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in mlx5e_ktls_add_tx()
173 mlx5e_ktls_build_static_params(wqe, sq->pc, sq->sqn, &priv_tx->crypto_info, in post_static_params()
283 struct tls12_crypto_info_aes_gcm_128 *info = &priv_tx->crypto_info; in tx_post_resync_params()
Dktls_utils.h24 struct tls_crypto_info *crypto_info, u32 start_offload_tcp_sn);
27 struct tls_crypto_info *crypto_info, u32 start_offload_tcp_sn);
Dktls_rx.c46 struct tls12_crypto_info_aes_gcm_128 crypto_info; member
135 mlx5e_ktls_build_static_params(wqe, sq->pc, sq->sqn, &priv_rx->crypto_info, in post_static_params()
354 struct tls12_crypto_info_aes_gcm_128 *info = &priv_rx->crypto_info; in resync_handle_seq_match()
565 struct tls_crypto_info *crypto_info, in mlx5e_ktls_add_rx() argument
583 err = mlx5_ktls_create_key(mdev, crypto_info, &priv_rx->key_id); in mlx5e_ktls_add_rx()
587 priv_rx->crypto_info = in mlx5e_ktls_add_rx()
588 *(struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in mlx5e_ktls_add_rx()
Dtls.c104 struct tls_crypto_info *crypto_info, in mlx5e_tls_add() argument
123 ret = mlx5_accel_tls_add_flow(mdev, flow, crypto_info, in mlx5e_tls_add()
/Linux-v5.10/drivers/net/ethernet/mellanox/mlx5/core/fpga/
Dtls.c514 struct tls12_crypto_info_aes_gcm_128 *crypto_info = in mlx5_fpga_tls_set_aes_gcm128_ctx() local
517 memcpy(MLX5_ADDR_OF(tls_cmd, cmd, tls_rcd_sn), crypto_info->rec_seq, in mlx5_fpga_tls_set_aes_gcm128_ctx()
521 crypto_info->salt, TLS_CIPHER_AES_GCM_128_SALT_SIZE); in mlx5_fpga_tls_set_aes_gcm128_ctx()
523 crypto_info->key, TLS_CIPHER_AES_GCM_128_KEY_SIZE); in mlx5_fpga_tls_set_aes_gcm128_ctx()
528 crypto_info->key, TLS_CIPHER_AES_GCM_128_KEY_SIZE); in mlx5_fpga_tls_set_aes_gcm128_ctx()
534 struct tls_crypto_info *crypto_info) in mlx5_fpga_tls_set_key_material() argument
538 switch (crypto_info->cipher_type) { in mlx5_fpga_tls_set_key_material()
542 mlx5_fpga_tls_set_aes_gcm128_ctx(cmd, crypto_info, &rcd_sn); in mlx5_fpga_tls_set_key_material()
552 struct tls_crypto_info *crypto_info, in _mlx5_fpga_tls_add_flow() argument
567 ret = mlx5_fpga_tls_set_key_material(cmd, caps, crypto_info); in _mlx5_fpga_tls_add_flow()
[all …]
Dtls.h55 struct tls_crypto_info *crypto_info,
/Linux-v5.10/Documentation/networking/
Dtls.rst49 struct tls12_crypto_info_aes_gcm_128 crypto_info;
51 crypto_info.info.version = TLS_1_2_VERSION;
52 crypto_info.info.cipher_type = TLS_CIPHER_AES_GCM_128;
53 memcpy(crypto_info.iv, iv_write, TLS_CIPHER_AES_GCM_128_IV_SIZE);
54 memcpy(crypto_info.rec_seq, seq_number_write,
56 memcpy(crypto_info.key, cipher_key_write, TLS_CIPHER_AES_GCM_128_KEY_SIZE);
57 memcpy(crypto_info.salt, implicit_iv_write, TLS_CIPHER_AES_GCM_128_SALT_SIZE);
59 setsockopt(sock, SOL_TLS, TLS_TX, &crypto_info, sizeof(crypto_info));
Dtls-offload.rst93 struct tls_crypto_info *crypto_info,
99 Cryptographic information in ``crypto_info`` includes the key, iv, salt
102 sequence number from ``crypto_info``. The driver can add its state
/Linux-v5.10/drivers/net/ethernet/netronome/nfp/crypto/
Dtls.c266 struct tls_crypto_info *crypto_info, in nfp_net_tls_add() argument
286 if (!nfp_net_cipher_supported(nn, crypto_info->cipher_type, direction)) in nfp_net_tls_add()
337 tls_ci = (struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in nfp_net_tls_add()
/Linux-v5.10/include/net/
Dtls.h287 struct tls_crypto_info *crypto_info,
704 struct tls_crypto_info *crypto_info);
/Linux-v5.10/drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/
Dchcr_ktls.c70 struct tls_crypto_info *crypto_info, in chcr_ktls_save_keys() argument
80 switch (crypto_info->cipher_type) { in chcr_ktls_save_keys()
83 (struct tls12_crypto_info_aes_gcm_128 *)crypto_info; in chcr_ktls_save_keys()
128 crypto_info->cipher_type); in chcr_ktls_save_keys()
428 struct tls_crypto_info *crypto_info, in chcr_ktls_dev_add() argument
484 ret = chcr_ktls_save_keys(tx_info, crypto_info, direction); in chcr_ktls_dev_add()
/Linux-v5.10/drivers/net/ethernet/chelsio/cxgb4/
Dcxgb4_main.c6447 struct tls_crypto_info *crypto_info, in cxgb4_ktls_dev_add() argument
6464 crypto_info, in cxgb4_ktls_dev_add()