#include <crypto/gf128mul.h>
#include <crypto/internal/aead.h>
#include <crypto/internal/skcipher.h>
#include <crypto/internal/hash.h>
#include <crypto/null.h>
#include <crypto/scatterwalk.h>
#include <crypto/gcm.h>
#include <crypto/hash.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
struct gcm_instance_ctx { … };
struct crypto_gcm_ctx { … };
struct crypto_rfc4106_ctx { … };
struct crypto_rfc4106_req_ctx { … };
struct crypto_rfc4543_instance_ctx { … };
struct crypto_rfc4543_ctx { … };
struct crypto_rfc4543_req_ctx { … };
struct crypto_gcm_ghash_ctx { … };
struct crypto_gcm_req_priv_ctx { … };
static struct { … } *gcm_zeroes;
static int crypto_rfc4543_copy_src_to_dst(struct aead_request *req, bool enc);
static inline struct crypto_gcm_req_priv_ctx *crypto_gcm_reqctx(
struct aead_request *req)
{ … }
static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key,
unsigned int keylen)
{ … }
static int crypto_gcm_setauthsize(struct crypto_aead *tfm,
unsigned int authsize)
{ … }
static void crypto_gcm_init_common(struct aead_request *req)
{ … }
static void crypto_gcm_init_crypt(struct aead_request *req,
unsigned int cryptlen)
{ … }
static inline unsigned int gcm_remain(unsigned int len)
{ … }
static void gcm_hash_len_done(void *data, int err);
static int gcm_hash_update(struct aead_request *req,
crypto_completion_t compl,
struct scatterlist *src,
unsigned int len, u32 flags)
{ … }
static int gcm_hash_remain(struct aead_request *req,
unsigned int remain,
crypto_completion_t compl, u32 flags)
{ … }
static int gcm_hash_len(struct aead_request *req, u32 flags)
{ … }
static int gcm_hash_len_continue(struct aead_request *req, u32 flags)
{ … }
static void gcm_hash_len_done(void *data, int err)
{ … }
static int gcm_hash_crypt_remain_continue(struct aead_request *req, u32 flags)
{ … }
static void gcm_hash_crypt_remain_done(void *data, int err)
{ … }
static int gcm_hash_crypt_continue(struct aead_request *req, u32 flags)
{ … }
static void gcm_hash_crypt_done(void *data, int err)
{ … }
static int gcm_hash_assoc_remain_continue(struct aead_request *req, u32 flags)
{ … }
static void gcm_hash_assoc_remain_done(void *data, int err)
{ … }
static int gcm_hash_assoc_continue(struct aead_request *req, u32 flags)
{ … }
static void gcm_hash_assoc_done(void *data, int err)
{ … }
static int gcm_hash_init_continue(struct aead_request *req, u32 flags)
{ … }
static void gcm_hash_init_done(void *data, int err)
{ … }
static int gcm_hash(struct aead_request *req, u32 flags)
{ … }
static int gcm_enc_copy_hash(struct aead_request *req, u32 flags)
{ … }
static int gcm_encrypt_continue(struct aead_request *req, u32 flags)
{ … }
static void gcm_encrypt_done(void *data, int err)
{ … }
static int crypto_gcm_encrypt(struct aead_request *req)
{ … }
static int crypto_gcm_verify(struct aead_request *req)
{ … }
static void gcm_decrypt_done(void *data, int err)
{ … }
static int gcm_dec_hash_continue(struct aead_request *req, u32 flags)
{ … }
static int crypto_gcm_decrypt(struct aead_request *req)
{ … }
static int crypto_gcm_init_tfm(struct crypto_aead *tfm)
{ … }
static void crypto_gcm_exit_tfm(struct crypto_aead *tfm)
{ … }
static void crypto_gcm_free(struct aead_instance *inst)
{ … }
static int crypto_gcm_create_common(struct crypto_template *tmpl,
struct rtattr **tb,
const char *ctr_name,
const char *ghash_name)
{ … }
static int crypto_gcm_create(struct crypto_template *tmpl, struct rtattr **tb)
{ … }
static int crypto_gcm_base_create(struct crypto_template *tmpl,
struct rtattr **tb)
{ … }
static int crypto_rfc4106_setkey(struct crypto_aead *parent, const u8 *key,
unsigned int keylen)
{ … }
static int crypto_rfc4106_setauthsize(struct crypto_aead *parent,
unsigned int authsize)
{ … }
static struct aead_request *crypto_rfc4106_crypt(struct aead_request *req)
{ … }
static int crypto_rfc4106_encrypt(struct aead_request *req)
{ … }
static int crypto_rfc4106_decrypt(struct aead_request *req)
{ … }
static int crypto_rfc4106_init_tfm(struct crypto_aead *tfm)
{ … }
static void crypto_rfc4106_exit_tfm(struct crypto_aead *tfm)
{ … }
static void crypto_rfc4106_free(struct aead_instance *inst)
{ … }
static int crypto_rfc4106_create(struct crypto_template *tmpl,
struct rtattr **tb)
{ … }
static int crypto_rfc4543_setkey(struct crypto_aead *parent, const u8 *key,
unsigned int keylen)
{ … }
static int crypto_rfc4543_setauthsize(struct crypto_aead *parent,
unsigned int authsize)
{ … }
static int crypto_rfc4543_crypt(struct aead_request *req, bool enc)
{ … }
static int crypto_rfc4543_copy_src_to_dst(struct aead_request *req, bool enc)
{ … }
static int crypto_rfc4543_encrypt(struct aead_request *req)
{ … }
static int crypto_rfc4543_decrypt(struct aead_request *req)
{ … }
static int crypto_rfc4543_init_tfm(struct crypto_aead *tfm)
{ … }
static void crypto_rfc4543_exit_tfm(struct crypto_aead *tfm)
{ … }
static void crypto_rfc4543_free(struct aead_instance *inst)
{ … }
static int crypto_rfc4543_create(struct crypto_template *tmpl,
struct rtattr **tb)
{ … }
static struct crypto_template crypto_gcm_tmpls[] = …;
static int __init crypto_gcm_module_init(void)
{ … }
static void __exit crypto_gcm_module_exit(void)
{ … }
subsys_initcall(crypto_gcm_module_init);
module_exit(crypto_gcm_module_exit);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;