Lines Matching refs:tfm
284 aesni_rfc4106_gcm_ctx *aesni_rfc4106_gcm_ctx_get(struct crypto_aead *tfm) in aesni_rfc4106_gcm_ctx_get() argument
290 return PTR_ALIGN(crypto_aead_ctx(tfm), align); in aesni_rfc4106_gcm_ctx_get()
304 static int aes_set_key_common(struct crypto_tfm *tfm, void *raw_ctx, in aes_set_key_common() argument
308 u32 *flags = &tfm->crt_flags; in aes_set_key_common()
328 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
331 return aes_set_key_common(tfm, crypto_tfm_ctx(tfm), in_key, key_len); in aes_set_key()
334 static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_encrypt() argument
336 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in aes_encrypt()
347 static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_decrypt() argument
349 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in aes_decrypt()
360 static void __aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in __aes_encrypt() argument
362 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in __aes_encrypt()
367 static void __aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in __aes_decrypt() argument
369 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in __aes_decrypt()
378 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in ecb_encrypt()
402 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in ecb_decrypt()
426 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in cbc_encrypt()
450 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in cbc_decrypt()
509 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in ctr_crypt()
534 static int ablk_ecb_init(struct crypto_tfm *tfm) in ablk_ecb_init() argument
536 return ablk_init_common(tfm, "__driver-ecb-aes-aesni"); in ablk_ecb_init()
539 static int ablk_cbc_init(struct crypto_tfm *tfm) in ablk_cbc_init() argument
541 return ablk_init_common(tfm, "__driver-cbc-aes-aesni"); in ablk_cbc_init()
545 static int ablk_ctr_init(struct crypto_tfm *tfm) in ablk_ctr_init() argument
547 return ablk_init_common(tfm, "__driver-ctr-aes-aesni"); in ablk_ctr_init()
553 static int ablk_pcbc_init(struct crypto_tfm *tfm) in ablk_pcbc_init() argument
555 return ablk_init_common(tfm, "fpu(pcbc(__driver-aes-aesni))"); in ablk_pcbc_init()
569 static int lrw_aesni_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_aesni_setkey() argument
572 struct aesni_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_aesni_setkey()
575 err = aes_set_key_common(tfm, ctx->raw_aes_ctx, key, in lrw_aesni_setkey()
583 static void lrw_aesni_exit_tfm(struct crypto_tfm *tfm) in lrw_aesni_exit_tfm() argument
585 struct aesni_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_aesni_exit_tfm()
593 struct aesni_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt()
617 struct aesni_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt()
638 static int xts_aesni_setkey(struct crypto_tfm *tfm, const u8 *key, in xts_aesni_setkey() argument
641 struct aesni_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_aesni_setkey()
642 u32 *flags = &tfm->crt_flags; in xts_aesni_setkey()
654 err = aes_set_key_common(tfm, ctx->raw_crypt_ctx, key, keylen / 2); in xts_aesni_setkey()
659 return aes_set_key_common(tfm, ctx->raw_tweak_ctx, key + keylen / 2, in xts_aesni_setkey()
720 struct aesni_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_encrypt()
731 struct aesni_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_decrypt()
744 struct aesni_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_encrypt()
769 struct aesni_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_decrypt()
944 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in helper_rfc4106_encrypt() local
945 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); in helper_rfc4106_encrypt()
947 unsigned long auth_tag_len = crypto_aead_authsize(tfm); in helper_rfc4106_encrypt()
1023 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in helper_rfc4106_decrypt() local
1024 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); in helper_rfc4106_decrypt()
1026 unsigned long auth_tag_len = crypto_aead_authsize(tfm); in helper_rfc4106_decrypt()
1102 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in rfc4106_encrypt() local
1103 struct cryptd_aead **ctx = crypto_aead_ctx(tfm); in rfc4106_encrypt()
1115 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in rfc4106_decrypt() local
1116 struct cryptd_aead **ctx = crypto_aead_ctx(tfm); in rfc4106_decrypt()