linux/crypto/cmac.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * CMAC: Cipher Block Mode for Authentication
 *
 * Copyright © 2013 Jussi Kivilinna <[email protected]>
 *
 * Based on work by:
 *  Copyright © 2013 Tom St Denis <[email protected]>
 * Based on crypto/xcbc.c:
 *  Copyright © 2006 USAGI/WIDE Project,
 *   Author: Kazunori Miyazawa <[email protected]>
 */

#include <crypto/internal/cipher.h>
#include <crypto/internal/hash.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/module.h>

/*
 * +------------------------
 * | <parent tfm>
 * +------------------------
 * | cmac_tfm_ctx
 * +------------------------
 * | consts (block size * 2)
 * +------------------------
 */
struct cmac_tfm_ctx {};

/*
 * +------------------------
 * | <shash desc>
 * +------------------------
 * | cmac_desc_ctx
 * +------------------------
 * | odds (block size)
 * +------------------------
 * | prev (block size)
 * +------------------------
 */
struct cmac_desc_ctx {};

static int crypto_cmac_digest_setkey(struct crypto_shash *parent,
				     const u8 *inkey, unsigned int keylen)
{}

static int crypto_cmac_digest_init(struct shash_desc *pdesc)
{}

static int crypto_cmac_digest_update(struct shash_desc *pdesc, const u8 *p,
				     unsigned int len)
{}

static int crypto_cmac_digest_final(struct shash_desc *pdesc, u8 *out)
{}

static int cmac_init_tfm(struct crypto_shash *tfm)
{}

static int cmac_clone_tfm(struct crypto_shash *tfm, struct crypto_shash *otfm)
{}

static void cmac_exit_tfm(struct crypto_shash *tfm)
{}

static int cmac_create(struct crypto_template *tmpl, struct rtattr **tb)
{}

static struct crypto_template crypto_cmac_tmpl =;

static int __init crypto_cmac_module_init(void)
{}

static void __exit crypto_cmac_module_exit(void)
{}

subsys_initcall(crypto_cmac_module_init);
module_exit(crypto_cmac_module_exit);

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_ALIAS_CRYPTO();
MODULE_IMPORT_NS();