• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/include/linux/

Lines Matching refs:tfm

106 	struct crypto_tfm *tfm;
125 struct crypto_blkcipher *tfm;
131 struct crypto_tfm *tfm;
132 void (*crfn)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
139 struct crypto_hash *tfm;
148 int (*setkey)(struct crypto_ablkcipher *tfm, const u8 *key,
161 int (*setkey)(struct crypto_tfm *tfm, const u8 *key,
178 int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key,
180 void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
181 void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
186 void (*dia_init)(struct crypto_tfm *tfm);
187 void (*dia_update)(struct crypto_tfm *tfm, const u8 *data,
189 void (*dia_final)(struct crypto_tfm *tfm, u8 *out);
190 int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key,
201 int (*setkey)(struct crypto_hash *tfm, const u8 *key,
208 int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
210 int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src,
247 int (*cra_init)(struct crypto_tfm *tfm);
248 void (*cra_exit)(struct crypto_tfm *tfm);
279 int (*setkey)(struct crypto_ablkcipher *tfm, const u8 *key,
289 int (*setkey)(struct crypto_tfm *tfm, const u8 *key,
301 int (*cit_setkey)(struct crypto_tfm *tfm,
303 int (*cit_encrypt)(struct crypto_tfm *tfm,
307 int (*cit_encrypt_iv)(struct crypto_tfm *tfm,
311 int (*cit_decrypt)(struct crypto_tfm *tfm,
315 int (*cit_decrypt_iv)(struct crypto_tfm *tfm,
320 void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
321 void (*cit_decrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
331 int (*setkey)(struct crypto_hash *tfm, const u8 *key,
337 int (*cot_compress)(struct crypto_tfm *tfm,
340 int (*cot_decompress)(struct crypto_tfm *tfm,
412 void crypto_free_tfm(struct crypto_tfm *tfm);
417 static inline const char *crypto_tfm_alg_name(struct crypto_tfm *tfm)
419 return tfm->__crt_alg->cra_name;
422 static inline const char *crypto_tfm_alg_driver_name(struct crypto_tfm *tfm)
424 return tfm->__crt_alg->cra_driver_name;
427 static inline int crypto_tfm_alg_priority(struct crypto_tfm *tfm)
429 return tfm->__crt_alg->cra_priority;
432 static inline const char *crypto_tfm_alg_modname(struct crypto_tfm *tfm)
434 return module_name(tfm->__crt_alg->cra_module);
437 static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)
439 return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
442 static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm)
444 return tfm->__crt_alg->cra_blocksize;
447 static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm)
449 return tfm->__crt_alg->cra_alignmask;
452 static inline u32 crypto_tfm_get_flags(struct crypto_tfm *tfm)
454 return tfm->crt_flags;
457 static inline void crypto_tfm_set_flags(struct crypto_tfm *tfm, u32 flags)
459 tfm->crt_flags |= flags;
462 static inline void crypto_tfm_clear_flags(struct crypto_tfm *tfm, u32 flags)
464 tfm->crt_flags &= ~flags;
467 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm)
469 return tfm->__crt_ctx;
474 struct crypto_tfm *tfm;
475 return __alignof__(tfm->__crt_ctx);
482 struct crypto_tfm *tfm)
484 return (struct crypto_ablkcipher *)tfm;
499 struct crypto_ablkcipher *tfm)
501 return &tfm->base;
504 static inline void crypto_free_ablkcipher(struct crypto_ablkcipher *tfm)
506 crypto_free_tfm(crypto_ablkcipher_tfm(tfm));
520 struct crypto_ablkcipher *tfm)
522 return &crypto_ablkcipher_tfm(tfm)->crt_ablkcipher;
526 struct crypto_ablkcipher *tfm)
528 return crypto_ablkcipher_crt(tfm)->ivsize;
532 struct crypto_ablkcipher *tfm)
534 return crypto_tfm_alg_blocksize(crypto_ablkcipher_tfm(tfm));
538 struct crypto_ablkcipher *tfm)
540 return crypto_tfm_alg_alignmask(crypto_ablkcipher_tfm(tfm));
543 static inline u32 crypto_ablkcipher_get_flags(struct crypto_ablkcipher *tfm)
545 return crypto_tfm_get_flags(crypto_ablkcipher_tfm(tfm));
548 static inline void crypto_ablkcipher_set_flags(struct crypto_ablkcipher *tfm,
551 crypto_tfm_set_flags(crypto_ablkcipher_tfm(tfm), flags);
554 static inline void crypto_ablkcipher_clear_flags(struct crypto_ablkcipher *tfm,
557 crypto_tfm_clear_flags(crypto_ablkcipher_tfm(tfm), flags);
560 static inline int crypto_ablkcipher_setkey(struct crypto_ablkcipher *tfm,
563 return crypto_ablkcipher_crt(tfm)->setkey(tfm, key, keylen);
569 return __crypto_ablkcipher_cast(req->base.tfm);
586 static inline int crypto_ablkcipher_reqsize(struct crypto_ablkcipher *tfm)
588 return crypto_ablkcipher_crt(tfm)->reqsize;
592 struct ablkcipher_request *req, struct crypto_ablkcipher *tfm)
594 req->base.tfm = crypto_ablkcipher_tfm(tfm);
604 struct crypto_ablkcipher *tfm, gfp_t gfp)
609 crypto_ablkcipher_reqsize(tfm), gfp);
612 ablkcipher_request_set_tfm(req, tfm);
643 struct crypto_tfm *tfm)
645 return (struct crypto_blkcipher *)tfm;
649 struct crypto_tfm *tfm)
651 BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_BLKCIPHER);
652 return __crypto_blkcipher_cast(tfm);
666 struct crypto_blkcipher *tfm)
668 return &tfm->base;
671 static inline void crypto_free_blkcipher(struct crypto_blkcipher *tfm)
673 crypto_free_tfm(crypto_blkcipher_tfm(tfm));
685 static inline const char *crypto_blkcipher_name(struct crypto_blkcipher *tfm)
687 return crypto_tfm_alg_name(crypto_blkcipher_tfm(tfm));
691 struct crypto_blkcipher *tfm)
693 return &crypto_blkcipher_tfm(tfm)->crt_blkcipher;
697 struct crypto_blkcipher *tfm)
699 return &crypto_blkcipher_tfm(tfm)->__crt_alg->cra_blkcipher;
702 static inline unsigned int crypto_blkcipher_ivsize(struct crypto_blkcipher *tfm)
704 return crypto_blkcipher_alg(tfm)->ivsize;
708 struct crypto_blkcipher *tfm)
710 return crypto_tfm_alg_blocksize(crypto_blkcipher_tfm(tfm));
714 struct crypto_blkcipher *tfm)
716 return crypto_tfm_alg_alignmask(crypto_blkcipher_tfm(tfm));
719 static inline u32 crypto_blkcipher_get_flags(struct crypto_blkcipher *tfm)
721 return crypto_tfm_get_flags(crypto_blkcipher_tfm(tfm));
724 static inline void crypto_blkcipher_set_flags(struct crypto_blkcipher *tfm,
727 crypto_tfm_set_flags(crypto_blkcipher_tfm(tfm), flags);
730 static inline void crypto_blkcipher_clear_flags(struct crypto_blkcipher *tfm,
733 crypto_tfm_clear_flags(crypto_blkcipher_tfm(tfm), flags);
736 static inline int crypto_blkcipher_setkey(struct crypto_blkcipher *tfm,
739 return crypto_blkcipher_crt(tfm)->setkey(crypto_blkcipher_tfm(tfm),
748 desc->info = crypto_blkcipher_crt(desc->tfm)->iv;
749 return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes);
757 return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes);
765 desc->info = crypto_blkcipher_crt(desc->tfm)->iv;
766 return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes);
774 return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes);
777 static inline void crypto_blkcipher_set_iv(struct crypto_blkcipher *tfm,
780 memcpy(crypto_blkcipher_crt(tfm)->iv, src, len);
783 static inline void crypto_blkcipher_get_iv(struct crypto_blkcipher *tfm,
786 memcpy(dst, crypto_blkcipher_crt(tfm)->iv, len);
789 static inline struct crypto_cipher *__crypto_cipher_cast(struct crypto_tfm *tfm)
791 return (struct crypto_cipher *)tfm;
794 static inline struct crypto_cipher *crypto_cipher_cast(struct crypto_tfm *tfm)
796 BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
797 return __crypto_cipher_cast(tfm);
810 static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm)
812 return &tfm->base;
815 static inline void crypto_free_cipher(struct crypto_cipher *tfm)
817 crypto_free_tfm(crypto_cipher_tfm(tfm));
829 static inline struct cipher_tfm *crypto_cipher_crt(struct crypto_cipher *tfm)
831 return &crypto_cipher_tfm(tfm)->crt_cipher;
834 static inline unsigned int crypto_cipher_blocksize(struct crypto_cipher *tfm)
836 return crypto_tfm_alg_blocksize(crypto_cipher_tfm(tfm));
839 static inline unsigned int crypto_cipher_alignmask(struct crypto_cipher *tfm)
841 return crypto_tfm_alg_alignmask(crypto_cipher_tfm(tfm));
844 static inline u32 crypto_cipher_get_flags(struct crypto_cipher *tfm)
846 return crypto_tfm_get_flags(crypto_cipher_tfm(tfm));
849 static inline void crypto_cipher_set_flags(struct crypto_cipher *tfm,
852 crypto_tfm_set_flags(crypto_cipher_tfm(tfm), flags);
855 static inline void crypto_cipher_clear_flags(struct crypto_cipher *tfm,
858 crypto_tfm_clear_flags(crypto_cipher_tfm(tfm), flags);
861 static inline int crypto_cipher_setkey(struct crypto_cipher *tfm,
864 return crypto_cipher_crt(tfm)->cit_setkey(crypto_cipher_tfm(tfm),
868 static inline void crypto_cipher_encrypt_one(struct crypto_cipher *tfm,
871 crypto_cipher_crt(tfm)->cit_encrypt_one(crypto_cipher_tfm(tfm),
875 static inline void crypto_cipher_decrypt_one(struct crypto_cipher *tfm,
878 crypto_cipher_crt(tfm)->cit_decrypt_one(crypto_cipher_tfm(tfm),
882 static inline struct crypto_hash *__crypto_hash_cast(struct crypto_tfm *tfm)
884 return (struct crypto_hash *)tfm;
887 static inline struct crypto_hash *crypto_hash_cast(struct crypto_tfm *tfm)
889 BUG_ON((crypto_tfm_alg_type(tfm) ^ CRYPTO_ALG_TYPE_HASH) &
891 return __crypto_hash_cast(tfm);
904 static inline struct crypto_tfm *crypto_hash_tfm(struct crypto_hash *tfm)
906 return &tfm->base;
909 static inline void crypto_free_hash(struct crypto_hash *tfm)
911 crypto_free_tfm(crypto_hash_tfm(tfm));
923 static inline struct hash_tfm *crypto_hash_crt(struct crypto_hash *tfm)
925 return &crypto_hash_tfm(tfm)->crt_hash;
928 static inline unsigned int crypto_hash_blocksize(struct crypto_hash *tfm)
930 return crypto_tfm_alg_blocksize(crypto_hash_tfm(tfm));
933 static inline unsigned int crypto_hash_alignmask(struct crypto_hash *tfm)
935 return crypto_tfm_alg_alignmask(crypto_hash_tfm(tfm));
938 static inline unsigned int crypto_hash_digestsize(struct crypto_hash *tfm)
940 return crypto_hash_crt(tfm)->digestsize;
943 static inline u32 crypto_hash_get_flags(struct crypto_hash *tfm)
945 return crypto_tfm_get_flags(crypto_hash_tfm(tfm));
948 static inline void crypto_hash_set_flags(struct crypto_hash *tfm, u32 flags)
950 crypto_tfm_set_flags(crypto_hash_tfm(tfm), flags);
953 static inline void crypto_hash_clear_flags(struct crypto_hash *tfm, u32 flags)
955 crypto_tfm_clear_flags(crypto_hash_tfm(tfm), flags);
960 return crypto_hash_crt(desc->tfm)->init(desc);
967 return crypto_hash_crt(desc->tfm)->update(desc, sg, nbytes);
972 return crypto_hash_crt(desc->tfm)->final(desc, out);
979 return crypto_hash_crt(desc->tfm)->digest(desc, sg, nbytes, out);
988 static inline struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm)
990 return (struct crypto_comp *)tfm;
993 static inline struct crypto_comp *crypto_comp_cast(struct crypto_tfm *tfm)
995 BUG_ON((crypto_tfm_alg_type(tfm) ^ CRYPTO_ALG_TYPE_COMPRESS) &
997 return __crypto_comp_cast(tfm);
1010 static inline struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm)
1012 return &tfm->base;
1015 static inline void crypto_free_comp(struct crypto_comp *tfm)
1017 crypto_free_tfm(crypto_comp_tfm(tfm));
1029 static inline const char *crypto_comp_name(struct crypto_comp *tfm)
1031 return crypto_tfm_alg_name(crypto_comp_tfm(tfm));
1034 static inline struct compress_tfm *crypto_comp_crt(struct crypto_comp *tfm)
1036 return &crypto_comp_tfm(tfm)->crt_compress;
1039 static inline int crypto_comp_compress(struct crypto_comp *tfm,
1043 return crypto_comp_crt(tfm)->cot_compress(crypto_comp_tfm(tfm),
1047 static inline int crypto_comp_decompress(struct crypto_comp *tfm,
1051 return crypto_comp_crt(tfm)->cot_decompress(crypto_comp_tfm(tfm),