AES-GMAC for AH
I am trying to implement AES-GMAC (RFC 4543) for AH mode in ipsec, say transport mode.
I saw an implementation for aes-gmac in the kernel in crypto/gcm.c
One thing I don't understand is why the following variable "assoc" of constant length?
I'm assuming that assoc variable contains is the packet data and IV.
static struct aead_request *crypto_rfc4543_crypt(struct aead_request *req,
sg_set_page(assoc, sg_page(req->assoc), req->assoc->length,
crypto_rfc4543_chain(assoc, payload, 0);
Suppose I want to apply aes gmac over a big packet such that it is made of multiple fragments( produced using skb_to_sgvec() ) -- how could I change this to work with such a case?