private void generateSubKeys() throws GeneralSecurityException {
    Cipher aes = instance();
    aes.init(Cipher.ENCRYPT_MODE, keySpec);
    byte[] zeroes = new byte[AesUtil.BLOCK_SIZE];
    byte[] l = aes.doFinal(zeroes);
    subKey1 = AesUtil.dbl(l);
    subKey2 = AesUtil.dbl(subKey1);
  }
An implementation of CMAC following <a href="https://tools.ietf.org/html/rfc4493">RFC 4493</a>.
java_src/src/main/java/com/google/crypto/tink/subtle/PrfAesCmac.java