#include <crypto/internal/cipher.h>
#include <crypto/internal/hash.h>
#include <crypto/internal/skcipher.h>
#include <crypto/polyval.h>
#include <crypto/scatterwalk.h>
#include <linux/module.h>
#define BLOCKCIPHER_BLOCK_SIZE …
#define TWEAK_SIZE …
struct hctr2_instance_ctx { … };
struct hctr2_tfm_ctx { … };
struct hctr2_request_ctx { … };
static inline u8 *hctr2_hashed_tweaklen(const struct hctr2_tfm_ctx *tctx,
bool has_remainder)
{ … }
static inline u8 *hctr2_hashed_tweak(const struct hctr2_tfm_ctx *tctx,
struct hctr2_request_ctx *rctx)
{ … }
static int hctr2_hash_tweaklen(struct hctr2_tfm_ctx *tctx, bool has_remainder)
{ … }
static int hctr2_setkey(struct crypto_skcipher *tfm, const u8 *key,
unsigned int keylen)
{ … }
static int hctr2_hash_tweak(struct skcipher_request *req)
{ … }
static int hctr2_hash_message(struct skcipher_request *req,
struct scatterlist *sgl,
u8 digest[POLYVAL_DIGEST_SIZE])
{ … }
static int hctr2_finish(struct skcipher_request *req)
{ … }
static void hctr2_xctr_done(void *data, int err)
{ … }
static int hctr2_crypt(struct skcipher_request *req, bool enc)
{ … }
static int hctr2_encrypt(struct skcipher_request *req)
{ … }
static int hctr2_decrypt(struct skcipher_request *req)
{ … }
static int hctr2_init_tfm(struct crypto_skcipher *tfm)
{ … }
static void hctr2_exit_tfm(struct crypto_skcipher *tfm)
{ … }
static void hctr2_free_instance(struct skcipher_instance *inst)
{ … }
static int hctr2_create_common(struct crypto_template *tmpl,
struct rtattr **tb,
const char *xctr_name,
const char *polyval_name)
{ … }
static int hctr2_create_base(struct crypto_template *tmpl, struct rtattr **tb)
{ … }
static int hctr2_create(struct crypto_template *tmpl, struct rtattr **tb)
{ … }
static struct crypto_template hctr2_tmpls[] = …;
static int __init hctr2_module_init(void)
{ … }
static void __exit hctr2_module_exit(void)
{ … }
subsys_initcall(hctr2_module_init);
module_exit(hctr2_module_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_IMPORT_NS(…);