Yes, it seems you can find it in gcrypt.h
:
GCRY_MAC_CMAC_AES = 201,
and in the documentation here. You can create a MAC context by using gcry_mac_open
(see gcrypt.pdf for details).
In cipher.h
you can also find the functions you are looking for, but it is undoubtedly better to create a MAC context instead using the constant above (instead of a cipher in a particular mode).
Internal hazmat:
/*-- cipher-cmac.c --*/
gcry_err_code_t _gcry_cmac_generate_subkeys
/* */ (gcry_cipher_hd_t c, gcry_cmac_context_t *ctx);
gcry_err_code_t _gcry_cmac_write
/* */ (gcry_cipher_hd_t c, gcry_cmac_context_t *ctx,
const byte * inbuf, size_t inlen);
gcry_err_code_t _gcry_cmac_final
/* */ (gcry_cipher_hd_t c, gcry_cmac_context_t *ctx);
void _gcry_cmac_reset (gcry_cmac_context_t *ctx);
I guess what happened is that libgcrypt started off just with CBC-MAC as a special cipher mode, after which the other MAC's were added using a separate context.
Note that GCM is an authenticated mode that uses GMAC, which is faster than CMAC, so using GCM and CMAC to authenticate the ciphertext (again) makes little sense. If you want to rely on CMAC (arguments can be made that it is more secure) then you could opt for AES-EAX mode as well; it was build using AES-CTR and AES-CMAC as primitives.
In short GCRY_CIPHER_CBC_MAC
isn't required and should probably not be used; if you have an authenticated cipher then message integrity / authenticity is already provided.