Home
last modified time | relevance | path

Searched refs:hmac_id (Results 1 – 8 of 8) sorted by relevance

/linux/drivers/nvme/common/
H A Dauth.c107 const char *nvme_auth_hmac_name(u8 hmac_id) in nvme_auth_hmac_name() argument
109 if (hmac_id >= ARRAY_SIZE(hash_map)) in nvme_auth_hmac_name()
111 return hash_map[hmac_id].hmac; in nvme_auth_hmac_name()
133 size_t nvme_auth_hmac_hash_len(u8 hmac_id) in nvme_auth_hmac_hash_len() argument
135 if (hmac_id >= ARRAY_SIZE(hash_map)) in nvme_auth_hmac_hash_len()
137 return hash_map[hmac_id].len; in nvme_auth_hmac_hash_len()
231 int nvme_auth_hmac_init(struct nvme_auth_hmac_ctx *hmac, u8 hmac_id, in nvme_auth_hmac_init() argument
234 hmac->hmac_id = hmac_id; in nvme_auth_hmac_init()
235 switch (hmac_id) { in nvme_auth_hmac_init()
246 pr_warn("%s: invalid hash algorithm %d\n", __func__, hmac_id); in nvme_auth_hmac_init()
[all …]
H A Dkeyring.c143 const char *hostnqn, const char *subnqn, u8 hmac_id, in nvme_tls_psk_refresh() argument
159 hmac_id, hostnqn, subnqn, digest); in nvme_tls_psk_refresh()
/linux/include/linux/
H A Dnvme-auth.h23 const char *nvme_auth_hmac_name(u8 hmac_id);
24 size_t nvme_auth_hmac_hash_len(u8 hmac_id);
27 u8 hmac_id; member
34 int nvme_auth_hmac_init(struct nvme_auth_hmac_ctx *hmac, u8 hmac_id,
47 int nvme_auth_augmented_challenge(u8 hmac_id, const u8 *skey, size_t skey_len,
55 int nvme_auth_generate_psk(u8 hmac_id, const u8 *skey, size_t skey_len,
58 int nvme_auth_generate_digest(u8 hmac_id, const u8 *psk, size_t psk_len,
61 int nvme_auth_derive_tls_psk(int hmac_id, const u8 *psk, size_t psk_len,
H A Dnvme-keyring.h14 const char *hostnqn, const char *subnqn, u8 hmac_id,
23 const char *hostnqn, char *subnqn, u8 hmac_id, in nvme_tls_psk_refresh() argument
H A Dsctp.h727 __be16 hmac_id; member
/linux/net/sctp/
H A Dauth.c25 .hmac_id = SCTP_AUTH_HMAC_ID_RESERVED_0,
28 .hmac_id = SCTP_AUTH_HMAC_ID_SHA1,
33 .hmac_id = SCTP_AUTH_HMAC_ID_RESERVED_2,
36 .hmac_id = SCTP_AUTH_HMAC_ID_SHA256,
41 static bool sctp_hmac_supported(__u16 hmac_id) in sctp_hmac_supported() argument
43 return hmac_id < ARRAY_SIZE(sctp_hmac_list) && in sctp_hmac_supported()
44 sctp_hmac_list[hmac_id].hmac_len != 0; in sctp_hmac_supported()
448 const struct sctp_hmac *sctp_auth_get_hmac(__u16 hmac_id) in sctp_auth_get_hmac() argument
450 return &sctp_hmac_list[hmac_id]; in sctp_auth_get_hmac()
485 static int __sctp_auth_find_hmacid(__be16 *hmacs, int n_elts, __be16 hmac_id) in __sctp_auth_find_hmacid() argument
[all …]
H A Dsm_statefuns.c4384 if (!sctp_auth_asoc_verify_hmac_id(asoc, auth_hdr->hmac_id)) in sctp_sf_authenticate()
4402 hmac = sctp_auth_get_hmac(ntohs(auth_hdr->hmac_id)); in sctp_sf_authenticate()
4475 &auth_hdr->hmac_id, in sctp_sf_eat_auth()
/linux/drivers/nvme/target/
H A Dconfigfs.c2205 u8 hmac_id; in nvmet_host_dhchap_hash_store() local
2207 hmac_id = nvme_auth_hmac_id(page); in nvmet_host_dhchap_hash_store()
2208 if (hmac_id == NVME_AUTH_HASH_INVALID) in nvmet_host_dhchap_hash_store()
2210 host->dhchap_hash_id = hmac_id; in nvmet_host_dhchap_hash_store()