• Home
  • Raw
  • Download

Lines Matching refs:tfm

161 	struct crypto_tfm *tfm;  member
180 struct crypto_blkcipher *tfm; member
233 int (*setkey)(struct crypto_ablkcipher *tfm, const u8 *key,
255 int (*setkey)(struct crypto_tfm *tfm, const u8 *key,
319 int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key,
321 void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
322 void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
337 int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
339 int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src,
574 int (*cra_init)(struct crypto_tfm *tfm);
575 void (*cra_exit)(struct crypto_tfm *tfm);
719 int (*setkey)(struct crypto_ablkcipher *tfm, const u8 *key,
732 int (*setkey)(struct crypto_tfm *tfm, const u8 *key,
741 int (*cit_setkey)(struct crypto_tfm *tfm,
743 void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
744 void (*cit_decrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
748 int (*cot_compress)(struct crypto_tfm *tfm,
751 int (*cot_decompress)(struct crypto_tfm *tfm,
772 void (*exit)(struct crypto_tfm *tfm);
826 void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm);
828 static inline void crypto_free_tfm(struct crypto_tfm *tfm) in crypto_free_tfm() argument
830 return crypto_destroy_tfm(tfm, tfm); in crypto_free_tfm()
838 static inline const char *crypto_tfm_alg_name(struct crypto_tfm *tfm) in crypto_tfm_alg_name() argument
840 return tfm->__crt_alg->cra_name; in crypto_tfm_alg_name()
843 static inline const char *crypto_tfm_alg_driver_name(struct crypto_tfm *tfm) in crypto_tfm_alg_driver_name() argument
845 return tfm->__crt_alg->cra_driver_name; in crypto_tfm_alg_driver_name()
848 static inline int crypto_tfm_alg_priority(struct crypto_tfm *tfm) in crypto_tfm_alg_priority() argument
850 return tfm->__crt_alg->cra_priority; in crypto_tfm_alg_priority()
853 static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) in crypto_tfm_alg_type() argument
855 return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; in crypto_tfm_alg_type()
858 static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) in crypto_tfm_alg_blocksize() argument
860 return tfm->__crt_alg->cra_blocksize; in crypto_tfm_alg_blocksize()
863 static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) in crypto_tfm_alg_alignmask() argument
865 return tfm->__crt_alg->cra_alignmask; in crypto_tfm_alg_alignmask()
868 static inline u32 crypto_tfm_get_flags(struct crypto_tfm *tfm) in crypto_tfm_get_flags() argument
870 return tfm->crt_flags; in crypto_tfm_get_flags()
873 static inline void crypto_tfm_set_flags(struct crypto_tfm *tfm, u32 flags) in crypto_tfm_set_flags() argument
875 tfm->crt_flags |= flags; in crypto_tfm_set_flags()
878 static inline void crypto_tfm_clear_flags(struct crypto_tfm *tfm, u32 flags) in crypto_tfm_clear_flags() argument
880 tfm->crt_flags &= ~flags; in crypto_tfm_clear_flags()
883 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm) in crypto_tfm_ctx() argument
885 return tfm->__crt_ctx; in crypto_tfm_ctx()
890 struct crypto_tfm *tfm; in crypto_tfm_ctx_alignment() local
891 return __alignof__(tfm->__crt_ctx); in crypto_tfm_ctx_alignment()
898 struct crypto_tfm *tfm) in __crypto_ablkcipher_cast() argument
900 return (struct crypto_ablkcipher *)tfm; in __crypto_ablkcipher_cast()
948 struct crypto_ablkcipher *tfm) in crypto_ablkcipher_tfm() argument
950 return &tfm->base; in crypto_ablkcipher_tfm()
957 static inline void crypto_free_ablkcipher(struct crypto_ablkcipher *tfm) in crypto_free_ablkcipher() argument
959 crypto_free_tfm(crypto_ablkcipher_tfm(tfm)); in crypto_free_ablkcipher()
980 struct crypto_ablkcipher *tfm) in crypto_ablkcipher_crt() argument
982 return &crypto_ablkcipher_tfm(tfm)->crt_ablkcipher; in crypto_ablkcipher_crt()
995 struct crypto_ablkcipher *tfm) in crypto_ablkcipher_ivsize() argument
997 return crypto_ablkcipher_crt(tfm)->ivsize; in crypto_ablkcipher_ivsize()
1011 struct crypto_ablkcipher *tfm) in crypto_ablkcipher_blocksize() argument
1013 return crypto_tfm_alg_blocksize(crypto_ablkcipher_tfm(tfm)); in crypto_ablkcipher_blocksize()
1017 struct crypto_ablkcipher *tfm) in crypto_ablkcipher_alignmask() argument
1019 return crypto_tfm_alg_alignmask(crypto_ablkcipher_tfm(tfm)); in crypto_ablkcipher_alignmask()
1022 static inline u32 crypto_ablkcipher_get_flags(struct crypto_ablkcipher *tfm) in crypto_ablkcipher_get_flags() argument
1024 return crypto_tfm_get_flags(crypto_ablkcipher_tfm(tfm)); in crypto_ablkcipher_get_flags()
1027 static inline void crypto_ablkcipher_set_flags(struct crypto_ablkcipher *tfm, in crypto_ablkcipher_set_flags() argument
1030 crypto_tfm_set_flags(crypto_ablkcipher_tfm(tfm), flags); in crypto_ablkcipher_set_flags()
1033 static inline void crypto_ablkcipher_clear_flags(struct crypto_ablkcipher *tfm, in crypto_ablkcipher_clear_flags() argument
1036 crypto_tfm_clear_flags(crypto_ablkcipher_tfm(tfm), flags); in crypto_ablkcipher_clear_flags()
1055 static inline int crypto_ablkcipher_setkey(struct crypto_ablkcipher *tfm, in crypto_ablkcipher_setkey() argument
1058 struct ablkcipher_tfm *crt = crypto_ablkcipher_crt(tfm); in crypto_ablkcipher_setkey()
1075 return __crypto_ablkcipher_cast(req->base.tfm); in crypto_ablkcipher_reqtfm()
1146 struct crypto_ablkcipher *tfm) in crypto_ablkcipher_reqsize() argument
1148 return crypto_ablkcipher_crt(tfm)->reqsize; in crypto_ablkcipher_reqsize()
1160 struct ablkcipher_request *req, struct crypto_ablkcipher *tfm) in ablkcipher_request_set_tfm() argument
1162 req->base.tfm = crypto_ablkcipher_tfm(crypto_ablkcipher_crt(tfm)->base); in ablkcipher_request_set_tfm()
1183 struct crypto_ablkcipher *tfm, gfp_t gfp) in ablkcipher_request_alloc() argument
1188 crypto_ablkcipher_reqsize(tfm), gfp); in ablkcipher_request_alloc()
1191 ablkcipher_request_set_tfm(req, tfm); in ablkcipher_request_alloc()
1297 struct crypto_tfm *tfm) in __crypto_blkcipher_cast() argument
1299 return (struct crypto_blkcipher *)tfm; in __crypto_blkcipher_cast()
1303 struct crypto_tfm *tfm) in crypto_blkcipher_cast() argument
1305 BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_BLKCIPHER); in crypto_blkcipher_cast()
1306 return __crypto_blkcipher_cast(tfm); in crypto_blkcipher_cast()
1334 struct crypto_blkcipher *tfm) in crypto_blkcipher_tfm() argument
1336 return &tfm->base; in crypto_blkcipher_tfm()
1343 static inline void crypto_free_blkcipher(struct crypto_blkcipher *tfm) in crypto_free_blkcipher() argument
1345 crypto_free_tfm(crypto_blkcipher_tfm(tfm)); in crypto_free_blkcipher()
1373 static inline const char *crypto_blkcipher_name(struct crypto_blkcipher *tfm) in crypto_blkcipher_name() argument
1375 return crypto_tfm_alg_name(crypto_blkcipher_tfm(tfm)); in crypto_blkcipher_name()
1379 struct crypto_blkcipher *tfm) in crypto_blkcipher_crt() argument
1381 return &crypto_blkcipher_tfm(tfm)->crt_blkcipher; in crypto_blkcipher_crt()
1385 struct crypto_blkcipher *tfm) in crypto_blkcipher_alg() argument
1387 return &crypto_blkcipher_tfm(tfm)->__crt_alg->cra_blkcipher; in crypto_blkcipher_alg()
1399 static inline unsigned int crypto_blkcipher_ivsize(struct crypto_blkcipher *tfm) in crypto_blkcipher_ivsize() argument
1401 return crypto_blkcipher_alg(tfm)->ivsize; in crypto_blkcipher_ivsize()
1415 struct crypto_blkcipher *tfm) in crypto_blkcipher_blocksize() argument
1417 return crypto_tfm_alg_blocksize(crypto_blkcipher_tfm(tfm)); in crypto_blkcipher_blocksize()
1421 struct crypto_blkcipher *tfm) in crypto_blkcipher_alignmask() argument
1423 return crypto_tfm_alg_alignmask(crypto_blkcipher_tfm(tfm)); in crypto_blkcipher_alignmask()
1426 static inline u32 crypto_blkcipher_get_flags(struct crypto_blkcipher *tfm) in crypto_blkcipher_get_flags() argument
1428 return crypto_tfm_get_flags(crypto_blkcipher_tfm(tfm)); in crypto_blkcipher_get_flags()
1431 static inline void crypto_blkcipher_set_flags(struct crypto_blkcipher *tfm, in crypto_blkcipher_set_flags() argument
1434 crypto_tfm_set_flags(crypto_blkcipher_tfm(tfm), flags); in crypto_blkcipher_set_flags()
1437 static inline void crypto_blkcipher_clear_flags(struct crypto_blkcipher *tfm, in crypto_blkcipher_clear_flags() argument
1440 crypto_tfm_clear_flags(crypto_blkcipher_tfm(tfm), flags); in crypto_blkcipher_clear_flags()
1459 static inline int crypto_blkcipher_setkey(struct crypto_blkcipher *tfm, in crypto_blkcipher_setkey() argument
1462 return crypto_blkcipher_crt(tfm)->setkey(crypto_blkcipher_tfm(tfm), in crypto_blkcipher_setkey()
1489 desc->info = crypto_blkcipher_crt(desc->tfm)->iv; in crypto_blkcipher_encrypt()
1490 return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes); in crypto_blkcipher_encrypt()
1517 return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes); in crypto_blkcipher_encrypt_iv()
1542 desc->info = crypto_blkcipher_crt(desc->tfm)->iv; in crypto_blkcipher_decrypt()
1543 return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes); in crypto_blkcipher_decrypt()
1567 return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes); in crypto_blkcipher_decrypt_iv()
1579 static inline void crypto_blkcipher_set_iv(struct crypto_blkcipher *tfm, in crypto_blkcipher_set_iv() argument
1582 memcpy(crypto_blkcipher_crt(tfm)->iv, src, len); in crypto_blkcipher_set_iv()
1595 static inline void crypto_blkcipher_get_iv(struct crypto_blkcipher *tfm, in crypto_blkcipher_get_iv() argument
1598 memcpy(dst, crypto_blkcipher_crt(tfm)->iv, len); in crypto_blkcipher_get_iv()
1618 static inline struct crypto_cipher *__crypto_cipher_cast(struct crypto_tfm *tfm) in __crypto_cipher_cast() argument
1620 return (struct crypto_cipher *)tfm; in __crypto_cipher_cast()
1623 static inline struct crypto_cipher *crypto_cipher_cast(struct crypto_tfm *tfm) in crypto_cipher_cast() argument
1625 BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); in crypto_cipher_cast()
1626 return __crypto_cipher_cast(tfm); in crypto_cipher_cast()
1653 static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) in crypto_cipher_tfm() argument
1655 return &tfm->base; in crypto_cipher_tfm()
1662 static inline void crypto_free_cipher(struct crypto_cipher *tfm) in crypto_free_cipher() argument
1664 crypto_free_tfm(crypto_cipher_tfm(tfm)); in crypto_free_cipher()
1686 static inline struct cipher_tfm *crypto_cipher_crt(struct crypto_cipher *tfm) in crypto_cipher_crt() argument
1688 return &crypto_cipher_tfm(tfm)->crt_cipher; in crypto_cipher_crt()
1701 static inline unsigned int crypto_cipher_blocksize(struct crypto_cipher *tfm) in crypto_cipher_blocksize() argument
1703 return crypto_tfm_alg_blocksize(crypto_cipher_tfm(tfm)); in crypto_cipher_blocksize()
1706 static inline unsigned int crypto_cipher_alignmask(struct crypto_cipher *tfm) in crypto_cipher_alignmask() argument
1708 return crypto_tfm_alg_alignmask(crypto_cipher_tfm(tfm)); in crypto_cipher_alignmask()
1711 static inline u32 crypto_cipher_get_flags(struct crypto_cipher *tfm) in crypto_cipher_get_flags() argument
1713 return crypto_tfm_get_flags(crypto_cipher_tfm(tfm)); in crypto_cipher_get_flags()
1716 static inline void crypto_cipher_set_flags(struct crypto_cipher *tfm, in crypto_cipher_set_flags() argument
1719 crypto_tfm_set_flags(crypto_cipher_tfm(tfm), flags); in crypto_cipher_set_flags()
1722 static inline void crypto_cipher_clear_flags(struct crypto_cipher *tfm, in crypto_cipher_clear_flags() argument
1725 crypto_tfm_clear_flags(crypto_cipher_tfm(tfm), flags); in crypto_cipher_clear_flags()
1744 static inline int crypto_cipher_setkey(struct crypto_cipher *tfm, in crypto_cipher_setkey() argument
1747 return crypto_cipher_crt(tfm)->cit_setkey(crypto_cipher_tfm(tfm), in crypto_cipher_setkey()
1760 static inline void crypto_cipher_encrypt_one(struct crypto_cipher *tfm, in crypto_cipher_encrypt_one() argument
1763 crypto_cipher_crt(tfm)->cit_encrypt_one(crypto_cipher_tfm(tfm), in crypto_cipher_encrypt_one()
1776 static inline void crypto_cipher_decrypt_one(struct crypto_cipher *tfm, in crypto_cipher_decrypt_one() argument
1779 crypto_cipher_crt(tfm)->cit_decrypt_one(crypto_cipher_tfm(tfm), in crypto_cipher_decrypt_one()
1783 static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) in __crypto_comp_cast() argument
1785 return (struct crypto_comp *)tfm; in __crypto_comp_cast()
1788 static inline struct crypto_comp *crypto_comp_cast(struct crypto_tfm *tfm) in crypto_comp_cast() argument
1790 BUG_ON((crypto_tfm_alg_type(tfm) ^ CRYPTO_ALG_TYPE_COMPRESS) & in crypto_comp_cast()
1792 return __crypto_comp_cast(tfm); in crypto_comp_cast()
1805 static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) in crypto_comp_tfm() argument
1807 return &tfm->base; in crypto_comp_tfm()
1810 static inline void crypto_free_comp(struct crypto_comp *tfm) in crypto_free_comp() argument
1812 crypto_free_tfm(crypto_comp_tfm(tfm)); in crypto_free_comp()
1824 static inline const char *crypto_comp_name(struct crypto_comp *tfm) in crypto_comp_name() argument
1826 return crypto_tfm_alg_name(crypto_comp_tfm(tfm)); in crypto_comp_name()
1829 static inline struct compress_tfm *crypto_comp_crt(struct crypto_comp *tfm) in crypto_comp_crt() argument
1831 return &crypto_comp_tfm(tfm)->crt_compress; in crypto_comp_crt()
1834 static inline int crypto_comp_compress(struct crypto_comp *tfm, in crypto_comp_compress() argument
1838 return crypto_comp_crt(tfm)->cot_compress(crypto_comp_tfm(tfm), in crypto_comp_compress()
1842 static inline int crypto_comp_decompress(struct crypto_comp *tfm, in crypto_comp_decompress() argument
1846 return crypto_comp_crt(tfm)->cot_decompress(crypto_comp_tfm(tfm), in crypto_comp_decompress()