linux/crypto/xts.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* XTS: as defined in IEEE1619/D16
 *	http://grouper.ieee.org/groups/1619/email/pdf00086.pdf
 *
 * Copyright (c) 2007 Rik Snel <[email protected]>
 *
 * Based on ecb.c
 * Copyright (c) 2006 Herbert Xu <[email protected]>
 */
#include <crypto/internal/cipher.h>
#include <crypto/internal/skcipher.h>
#include <crypto/scatterwalk.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>

#include <crypto/xts.h>
#include <crypto/b128ops.h>
#include <crypto/gf128mul.h>

struct xts_tfm_ctx {};

struct xts_instance_ctx {};

struct xts_request_ctx {};

static int xts_setkey(struct crypto_skcipher *parent, const u8 *key,
		      unsigned int keylen)
{}

/*
 * We compute the tweak masks twice (both before and after the ECB encryption or
 * decryption) to avoid having to allocate a temporary buffer and/or make
 * mutliple calls to the 'ecb(..)' instance, which usually would be slower than
 * just doing the gf128mul_x_ble() calls again.
 */
static int xts_xor_tweak(struct skcipher_request *req, bool second_pass,
			 bool enc)
{}

static int xts_xor_tweak_pre(struct skcipher_request *req, bool enc)
{}

static int xts_xor_tweak_post(struct skcipher_request *req, bool enc)
{}

static void xts_cts_done(void *data, int err)
{}

static int xts_cts_final(struct skcipher_request *req,
			 int (*crypt)(struct skcipher_request *req))
{}

static void xts_encrypt_done(void *data, int err)
{}

static void xts_decrypt_done(void *data, int err)
{}

static int xts_init_crypt(struct skcipher_request *req,
			  crypto_completion_t compl)
{}

static int xts_encrypt(struct skcipher_request *req)
{}

static int xts_decrypt(struct skcipher_request *req)
{}

static int xts_init_tfm(struct crypto_skcipher *tfm)
{}

static void xts_exit_tfm(struct crypto_skcipher *tfm)
{}

static void xts_free_instance(struct skcipher_instance *inst)
{}

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

static struct crypto_template xts_tmpl =;

static int __init xts_module_init(void)
{}

static void __exit xts_module_exit(void)
{}

subsys_initcall(xts_module_init);
module_exit(xts_module_exit);

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