| mlx5dv_crypto_login_create / mlx5dv_crypto_login_query / mlx5dv_crypto_login_destroy(3) | mlx5dv_crypto_login_create / mlx5dv_crypto_login_query / mlx5dv_crypto_login_destroy(3) |
mlx5dv_crypto_login_create - Creates a crypto login object
mlx5dv_crypto_login_query - Queries the given crypto login object
mlx5dv_crypto_login_destroy - Destroys the given crypto login object
#include <infiniband/mlx5dv.h>
struct mlx5dv_crypto_login_obj *
mlx5dv_crypto_login_create(struct ibv_context *context,
struct mlx5dv_crypto_login_attr_ex *login_attr);
int mlx5dv_crypto_login_query(struct mlx5dv_crypto_login_obj *crypto_login,
struct mlx5dv_crypto_login_query_attr *query_attr);
int mlx5dv_crypto_login_destroy(struct mlx5dv_crypto_login_obj *crypto_login);
When using a crypto engine that is in wrapped import method, a valid crypto login object must be provided in order to create and query wrapped Data Encryption Keys (DEKs).
A valid crypto login object is necessary only to create and query wrapped DEKs. Existing DEKs that were previously created don’t need a valid crypto login object in order to be used (in MKey or during traffic).
mlx5dv_crypto_login_create() creates and returns a crypto login object with the credential given in login_attr. Only one crypto login object can be created per device context. The created crypto login object must be provided to mlx5dv_dek_create() in order to create wrapped DEKs.
mlx5dv_crypto_login_query() queries the crypto login object crypto_login and returns the queried attributes in query_attr.
mlx5dv_crypto_login_destroy() destroys the given crypto login object.
The device context that will be associated with the crypto login object.
Crypto extended login attributes specify the credential to login with and the import KEK to be used for secured communications done with the crypto login object.
struct mlx5dv_crypto_login_attr_ex {
uint32_t credential_id;
uint32_t import_kek_id;
const void *credential;
size_t credential_len;
uint64_t comp_mask;
};
Crypto login attributes to be populated when querying a crypto login
object.
struct mlx5dv_crypto_login_query_attr {
enum mlx5dv_crypto_login_state state;
uint64_t comp_mask;
};
mlx5dv_crypto_login_create() returns a pointer to a new valid struct mlx5dv_crypto_login_obj on success. On error NULL is returned and errno is set.
mlx5dv_crypto_login_query() returns 0 on success and fills query_attr with the queried attributes. On error, errno is returned.
mlx5dv_crypto_login_destroy() returns 0 on success and errno on error.
mlx5dv_dek_create(3), mlx5dv_query_device(3)
Avihai Horon <avihaih@nvidia.com>