Lines Matching refs:authlen
633 llsec_tfm_by_len(struct mac802154_llsec_key *key, int authlen) in llsec_tfm_by_len() argument
638 if (crypto_aead_authsize(key->tfm[i]) == authlen) in llsec_tfm_by_len()
651 int authlen, assoclen, datalen, rc; in llsec_do_encrypt_auth() local
655 authlen = ieee802154_sechdr_authtag_len(&hdr->sec); in llsec_do_encrypt_auth()
658 req = aead_request_alloc(llsec_tfm_by_len(key, authlen), GFP_ATOMIC); in llsec_do_encrypt_auth()
681 sg_set_buf(&dst[1], skb_put(skb, authlen), authlen); in llsec_do_encrypt_auth()
708 int rc, authlen, hlen; in mac802154_llsec_encrypt() local
722 authlen = ieee802154_sechdr_authtag_len(&hdr.sec); in mac802154_llsec_encrypt()
724 if (skb->len + hlen + authlen + IEEE802154_MFR_SIZE > IEEE802154_MTU) in mac802154_llsec_encrypt()
860 int authlen, datalen, assoclen, rc; in llsec_do_decrypt_auth() local
864 authlen = ieee802154_sechdr_authtag_len(&hdr->sec); in llsec_do_decrypt_auth()
867 req = aead_request_alloc(llsec_tfm_by_len(key, authlen), GFP_ATOMIC); in llsec_do_decrypt_auth()
881 sg_set_buf(&assoc[1], data, datalen - authlen); in llsec_do_decrypt_auth()
882 assoclen += datalen - authlen; in llsec_do_decrypt_auth()
883 data += datalen - authlen; in llsec_do_decrypt_auth()
884 datalen = authlen; in llsec_do_decrypt_auth()
896 skb_trim(skb, skb->len - authlen); in llsec_do_decrypt_auth()