Lines Matching refs:hmac

283 	struct nvme_auth_hmac_ctx hmac;  in nvmet_auth_host_hash()  local
295 ret = nvme_auth_hmac_init(&hmac, ctrl->shash_id, transformed_key->key, in nvmet_auth_host_hash()
325 nvme_auth_hmac_update(&hmac, challenge, shash_len); in nvmet_auth_host_hash()
328 nvme_auth_hmac_update(&hmac, buf, 4); in nvmet_auth_host_hash()
331 nvme_auth_hmac_update(&hmac, buf, 2); in nvmet_auth_host_hash()
334 nvme_auth_hmac_update(&hmac, buf, 1); in nvmet_auth_host_hash()
335 nvme_auth_hmac_update(&hmac, "HostHost", 8); in nvmet_auth_host_hash()
337 nvme_auth_hmac_update(&hmac, ctrl->hostnqn, strlen(ctrl->hostnqn)); in nvmet_auth_host_hash()
338 nvme_auth_hmac_update(&hmac, buf, 1); in nvmet_auth_host_hash()
339 nvme_auth_hmac_update(&hmac, ctrl->subsys->subsysnqn, in nvmet_auth_host_hash()
341 nvme_auth_hmac_final(&hmac, response); in nvmet_auth_host_hash()
347 memzero_explicit(&hmac, sizeof(hmac)); in nvmet_auth_host_hash()
355 struct nvme_auth_hmac_ctx hmac; in nvmet_auth_ctrl_hash() local
367 ret = nvme_auth_hmac_init(&hmac, ctrl->shash_id, transformed_key->key, in nvmet_auth_ctrl_hash()
394 nvme_auth_hmac_update(&hmac, challenge, shash_len); in nvmet_auth_ctrl_hash()
397 nvme_auth_hmac_update(&hmac, buf, 4); in nvmet_auth_ctrl_hash()
400 nvme_auth_hmac_update(&hmac, buf, 2); in nvmet_auth_ctrl_hash()
403 nvme_auth_hmac_update(&hmac, buf, 1); in nvmet_auth_ctrl_hash()
404 nvme_auth_hmac_update(&hmac, "Controller", 10); in nvmet_auth_ctrl_hash()
405 nvme_auth_hmac_update(&hmac, ctrl->subsys->subsysnqn, in nvmet_auth_ctrl_hash()
408 nvme_auth_hmac_update(&hmac, buf, 1); in nvmet_auth_ctrl_hash()
409 nvme_auth_hmac_update(&hmac, ctrl->hostnqn, strlen(ctrl->hostnqn)); in nvmet_auth_ctrl_hash()
410 nvme_auth_hmac_final(&hmac, response); in nvmet_auth_ctrl_hash()
416 memzero_explicit(&hmac, sizeof(hmac)); in nvmet_auth_ctrl_hash()