Lines Matching refs:hmac
417 struct nvme_auth_hmac_ctx hmac; in nvme_auth_dhchap_setup_host_response() local
437 ret = nvme_auth_hmac_init(&hmac, chap->hash_id, in nvme_auth_dhchap_setup_host_response()
458 nvme_auth_hmac_update(&hmac, challenge, chap->hash_len); in nvme_auth_dhchap_setup_host_response()
461 nvme_auth_hmac_update(&hmac, buf, 4); in nvme_auth_dhchap_setup_host_response()
464 nvme_auth_hmac_update(&hmac, buf, 2); in nvme_auth_dhchap_setup_host_response()
467 nvme_auth_hmac_update(&hmac, buf, 1); in nvme_auth_dhchap_setup_host_response()
468 nvme_auth_hmac_update(&hmac, "HostHost", 8); in nvme_auth_dhchap_setup_host_response()
469 nvme_auth_hmac_update(&hmac, ctrl->opts->host->nqn, in nvme_auth_dhchap_setup_host_response()
472 nvme_auth_hmac_update(&hmac, buf, 1); in nvme_auth_dhchap_setup_host_response()
473 nvme_auth_hmac_update(&hmac, ctrl->opts->subsysnqn, in nvme_auth_dhchap_setup_host_response()
475 nvme_auth_hmac_final(&hmac, chap->response); in nvme_auth_dhchap_setup_host_response()
480 memzero_explicit(&hmac, sizeof(hmac)); in nvme_auth_dhchap_setup_host_response()
487 struct nvme_auth_hmac_ctx hmac; in nvme_auth_dhchap_setup_ctrl_response() local
499 ret = nvme_auth_hmac_init(&hmac, chap->hash_id, transformed_key->key, in nvme_auth_dhchap_setup_ctrl_response()
530 nvme_auth_hmac_update(&hmac, challenge, chap->hash_len); in nvme_auth_dhchap_setup_ctrl_response()
533 nvme_auth_hmac_update(&hmac, buf, 4); in nvme_auth_dhchap_setup_ctrl_response()
536 nvme_auth_hmac_update(&hmac, buf, 2); in nvme_auth_dhchap_setup_ctrl_response()
539 nvme_auth_hmac_update(&hmac, buf, 1); in nvme_auth_dhchap_setup_ctrl_response()
540 nvme_auth_hmac_update(&hmac, "Controller", 10); in nvme_auth_dhchap_setup_ctrl_response()
541 nvme_auth_hmac_update(&hmac, ctrl->opts->subsysnqn, in nvme_auth_dhchap_setup_ctrl_response()
544 nvme_auth_hmac_update(&hmac, buf, 1); in nvme_auth_dhchap_setup_ctrl_response()
545 nvme_auth_hmac_update(&hmac, ctrl->opts->host->nqn, in nvme_auth_dhchap_setup_ctrl_response()
547 nvme_auth_hmac_final(&hmac, chap->response); in nvme_auth_dhchap_setup_ctrl_response()
552 memzero_explicit(&hmac, sizeof(hmac)); in nvme_auth_dhchap_setup_ctrl_response()