• Home
  • Raw
  • Download

Lines Matching refs:tfm

283 aesni_rfc4106_gcm_ctx *aesni_rfc4106_gcm_ctx_get(struct crypto_aead *tfm)  in aesni_rfc4106_gcm_ctx_get()  argument
288 crypto_tfm_ctx(crypto_aead_tfm(tfm)), AESNI_ALIGN); in aesni_rfc4106_gcm_ctx_get()
302 static int aes_set_key_common(struct crypto_tfm *tfm, void *raw_ctx, in aes_set_key_common() argument
306 u32 *flags = &tfm->crt_flags; in aes_set_key_common()
326 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
329 return aes_set_key_common(tfm, crypto_tfm_ctx(tfm), in_key, key_len); in aes_set_key()
332 static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_encrypt() argument
334 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in aes_encrypt()
345 static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_decrypt() argument
347 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in aes_decrypt()
358 static void __aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in __aes_encrypt() argument
360 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in __aes_encrypt()
365 static void __aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in __aes_decrypt() argument
367 struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); in __aes_decrypt()
376 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in ecb_encrypt()
400 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in ecb_decrypt()
424 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in cbc_encrypt()
448 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in cbc_decrypt()
507 struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); in ctr_crypt()
532 static int ablk_ecb_init(struct crypto_tfm *tfm) in ablk_ecb_init() argument
534 return ablk_init_common(tfm, "__driver-ecb-aes-aesni"); in ablk_ecb_init()
537 static int ablk_cbc_init(struct crypto_tfm *tfm) in ablk_cbc_init() argument
539 return ablk_init_common(tfm, "__driver-cbc-aes-aesni"); in ablk_cbc_init()
543 static int ablk_ctr_init(struct crypto_tfm *tfm) in ablk_ctr_init() argument
545 return ablk_init_common(tfm, "__driver-ctr-aes-aesni"); in ablk_ctr_init()
551 static int ablk_pcbc_init(struct crypto_tfm *tfm) in ablk_pcbc_init() argument
553 return ablk_init_common(tfm, "fpu(pcbc(__driver-aes-aesni))"); in ablk_pcbc_init()
567 static int lrw_aesni_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_aesni_setkey() argument
570 struct aesni_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_aesni_setkey()
573 err = aes_set_key_common(tfm, ctx->raw_aes_ctx, key, in lrw_aesni_setkey()
581 static void lrw_aesni_exit_tfm(struct crypto_tfm *tfm) in lrw_aesni_exit_tfm() argument
583 struct aesni_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_aesni_exit_tfm()
591 struct aesni_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt()
615 struct aesni_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt()
636 static int xts_aesni_setkey(struct crypto_tfm *tfm, const u8 *key, in xts_aesni_setkey() argument
639 struct aesni_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_aesni_setkey()
640 u32 *flags = &tfm->crt_flags; in xts_aesni_setkey()
652 err = aes_set_key_common(tfm, ctx->raw_crypt_ctx, key, keylen / 2); in xts_aesni_setkey()
657 return aes_set_key_common(tfm, ctx->raw_tweak_ctx, key + keylen / 2, in xts_aesni_setkey()
718 struct aesni_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_encrypt()
729 struct aesni_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_decrypt()
742 struct aesni_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_encrypt()
767 struct aesni_xts_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in xts_decrypt()
792 static int rfc4106_init(struct crypto_tfm *tfm) in rfc4106_init() argument
796 PTR_ALIGN((u8 *)crypto_tfm_ctx(tfm), AESNI_ALIGN); in rfc4106_init()
807 tfm->crt_aead.reqsize = sizeof(struct aead_request) in rfc4106_init()
812 static void rfc4106_exit(struct crypto_tfm *tfm) in rfc4106_exit() argument
816 PTR_ALIGN((u8 *)crypto_tfm_ctx(tfm), AESNI_ALIGN); in rfc4106_exit()
896 struct crypto_tfm *tfm = crypto_aead_tfm(parent); in rfc4106_set_key() local
904 crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in rfc4106_set_key()
910 crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in rfc4106_set_key()
974 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in rfc4106_encrypt() local
975 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); in rfc4106_encrypt()
995 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in rfc4106_decrypt() local
996 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); in rfc4106_decrypt()
1018 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in __driver_rfc4106_encrypt() local
1019 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); in __driver_rfc4106_encrypt()
1021 unsigned long auth_tag_len = crypto_aead_authsize(tfm); in __driver_rfc4106_encrypt()
1096 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in __driver_rfc4106_decrypt() local
1097 struct aesni_rfc4106_gcm_ctx *ctx = aesni_rfc4106_gcm_ctx_get(tfm); in __driver_rfc4106_decrypt()
1099 unsigned long auth_tag_len = crypto_aead_authsize(tfm); in __driver_rfc4106_decrypt()