Hi,
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?

<crypto/gcm.c>
Code:
static struct aead_request *crypto_rfc4543_crypt(struct aead_request *req,
						 int enc)
{
.....
sg_init_table(assoc, 2);
sg_set_page(assoc, sg_page(req->assoc), req->assoc->length,
		    req->assoc->offset);
crypto_rfc4543_chain(assoc, payload, 0);
.....
}
I'm assuming that assoc variable contains is the packet data and IV.

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?

Thanks