Lines Matching full:hmac

632 	alloc_size = sizeof(*new_list) + num_hmacs * sizeof(new_list->hmac[0]);  in sctp_alloc_hmaclist()
661 "SCTP: HMAC id list full, ignoring add %u\n", hmac_id); in sctp_auth_add_hmacid()
670 if (list->hmac[i] == hmac_id) { in sctp_auth_add_hmacid()
675 SCTPDBG(SCTP_DEBUG_AUTH1, "SCTP: add HMAC id %u to list\n", hmac_id); in sctp_auth_add_hmacid()
676 list->hmac[list->num_algo++] = hmac_id; in sctp_auth_add_hmacid()
696 new_list->hmac[i] = list->hmac[i]; in sctp_copy_hmaclist()
715 * HMAC algos are listed in priority/preference order
716 * find the best HMAC id to use for the peer based on local support
728 if (peer->hmac[i] == local->hmac[j]) { in sctp_negotiate_hmacid()
731 "SCTP: negotiated peer HMAC id %u\n", in sctp_negotiate_hmacid()
732 peer->hmac[i]); in sctp_negotiate_hmacid()
733 return (peer->hmac[i]); in sctp_negotiate_hmacid()
742 * serialize the HMAC algo list and return space used
755 hmac_id = htons(list->hmac[i]); in sctp_serialize_hmaclist()
828 /* unknown HMAC algorithm: can't do anything */ in sctp_get_hmac_digest_len()
843 /* unknown HMAC algorithm: can't do anything */ in sctp_get_hmac_block_len()
860 /* unknown HMAC algorithm: can't do anything */ in sctp_hmac_init()
878 /* unknown HMAC algorithm: can't do anything */ in sctp_hmac_update()
896 /* unknown HMAC algorithm: can't do anything */ in sctp_hmac_final()
904 * Compute the HMAC digest using the desired hash key, text, and HMAC
906 * is returned, if the HMAC was performed.
925 /* can't do HMAC with empty key or text or digest store */ in sctp_hmac()
928 /* validate the hmac algo and get the digest length */ in sctp_hmac()
985 /* can't do HMAC with empty key or text or digest store */ in sctp_hmac_m()
988 /* validate the hmac algo and get the digest length */ in sctp_hmac_m()
1050 * computes the requested HMAC using a key struct (which may be modified if
1051 * the keylen exceeds the HMAC block len).
1065 /* can't do HMAC with empty key or text or digest store */ in sctp_compute_hmac()
1068 /* validate the hmac algo and get the digest length */ in sctp_compute_hmac()
1099 /* can't do HMAC with empty key or text or digest store */ in sctp_compute_hmac_m()
1102 /* validate the hmac algo and get the digest length */ in sctp_compute_hmac_m()
1129 if (list->hmac[i] == id) in sctp_auth_is_supported_hmac()
1483 /* negotiate what HMAC to use for the peer */ in sctp_auth_get_cookie_params()
1496 * compute and fill in the HMAC digest for a packet
1511 memset(auth->hmac, 0, SCTP_SIZE32(digestlen)); in sctp_fill_hmac_digest_m()
1545 m, auth_offset, auth->hmac); in sctp_fill_hmac_digest_m()
1610 "SCTP AUTH Chunk: shared key %u, HMAC id %u\n", in sctp_handle_auth()
1613 /* is the indicated HMAC supported? */ in sctp_handle_auth()
1620 "SCTP Auth: unsupported HMAC id %u\n", in sctp_handle_auth()
1623 * report this in an Error Chunk: Unsupported HMAC in sctp_handle_auth()
1679 "SCTP Auth: chunk too short for HMAC\n"); in sctp_handle_auth()
1683 memcpy(digest, auth->hmac, digestlen); in sctp_handle_auth()
1692 "SCTP Auth: HMAC digest check failed\n"); in sctp_handle_auth()
1840 /* validate the hmac list */ in sctp_validate_init_auth_params()
1843 "SCTP: invalid HMAC param\n"); in sctp_validate_init_auth_params()
1916 /* initialize hmac list from endpoint */ in sctp_initialize_auth_params()
1920 sizeof(stcb->asoc.local_hmacs->hmac[0]); in sctp_initialize_auth_params()