RFC 4493 (AES-CMAC) algorithm with 256 bit key I apologize for the newbie question. If I were to use a 256-bit key and AES256 (assuming I had the function instead of AES128, the length of the for loops in the functions xor_128, leftshift_bit, generate_subkey, etc would remain as 16 correct? Since AES256 also returns a 128-bit result

example xor_128 function

void xor_128(unsigned char *a, unsigned char *b, unsigned char *out)
 {
      int i;
      for (i=0;i&lt;16; i++)
      {
          out[i] = a[i] ^ b[i];
      }
  }


The AES-CMAC Algorithm in rfc4493
AES has 128, 192, and 256 bits key sizes and always 128-bit block size. They are usually written as AES128, AES192, and AES256. The block size is implicit since it is always 128.

The basic function xor_128 is used to support x-or operation of CBC-MAC for the message block, ciphertext blocks, and keys. The block size is always 128 regardless of the key size. 

The rfc4493 is not mentioning the AES192 or AES256. This doesn't mean that one cannot use any other than AES128. The rfc4493 only provides a test code for AES128.

The NIST provides test vectors in NIST:  Block Cipher Modes of Operation - CMAC Mode for Authentication for AES128, AES192, and AES256.

The Generate_Subkey algorithm also needs the xor-128 to derive the keys, since the keys are xored with the blocks. This can be seen from the code

  Step 4.  if flag is true                                        
           then M_last := M_n XOR K1;                             
           else M_last := padding(M_n) XOR K2;


The constants are the same and the standard can be found in  NIST 800-38B: Recommendation for Block Cipher Modes of Operation: The CMAC Mode for Authentication