Searched refs:tfm (Results 51 - 75 of 477) sorted by relevance

1234567891011>>

/linux-master/arch/powerpc/crypto/
H A Daes_cbc.c24 static int p8_aes_cbc_init(struct crypto_skcipher *tfm) argument
26 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
38 crypto_skcipher_set_reqsize(tfm, sizeof(struct skcipher_request) +
44 static void p8_aes_cbc_exit(struct crypto_skcipher *tfm) argument
46 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
51 static int p8_aes_cbc_setkey(struct crypto_skcipher *tfm, const u8 *key, argument
54 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
73 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
74 const struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
/linux-master/fs/smb/server/
H A Dcrypto_ctx.h45 #define CRYPTO_HMACMD5_TFM(c) ((c)->desc[CRYPTO_SHASH_HMACMD5]->tfm)
47 ((c)->desc[CRYPTO_SHASH_HMACSHA256]->tfm)
48 #define CRYPTO_CMACAES_TFM(c) ((c)->desc[CRYPTO_SHASH_CMACAES]->tfm)
49 #define CRYPTO_SHA256_TFM(c) ((c)->desc[CRYPTO_SHASH_SHA256]->tfm)
50 #define CRYPTO_SHA512_TFM(c) ((c)->desc[CRYPTO_SHASH_SHA512]->tfm)
H A Dcrypto_ctx.c34 crypto_free_shash(shash->tfm);
41 struct crypto_aead *tfm = NULL; local
45 tfm = crypto_alloc_aead("gcm(aes)", 0, 0);
48 tfm = crypto_alloc_aead("ccm(aes)", 0, 0);
55 if (IS_ERR(tfm)) {
56 pr_err("Failed to alloc encrypt aead : %ld\n", PTR_ERR(tfm));
60 return tfm;
65 struct crypto_shash *tfm = NULL; local
70 tfm = crypto_alloc_shash("hmac(md5)", 0, 0);
73 tfm
[all...]
/linux-master/crypto/
H A Dlskcipher.c21 struct crypto_tfm *tfm)
23 return container_of(tfm, struct crypto_lskcipher, base);
32 static int lskcipher_setkey_unaligned(struct crypto_lskcipher *tfm, argument
35 unsigned long alignmask = crypto_lskcipher_alignmask(tfm);
36 struct lskcipher_alg *cipher = crypto_lskcipher_alg(tfm);
48 ret = cipher->setkey(tfm, alignbuffer, keylen);
53 int crypto_lskcipher_setkey(struct crypto_lskcipher *tfm, const u8 *key, argument
56 unsigned long alignmask = crypto_lskcipher_alignmask(tfm);
57 struct lskcipher_alg *cipher = crypto_lskcipher_alg(tfm);
63 return lskcipher_setkey_unaligned(tfm, ke
20 __crypto_lskcipher_cast( struct crypto_tfm *tfm) argument
69 crypto_lskcipher_crypt_unaligned( struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv, int (*crypt)(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv, u32 flags)) argument
123 crypto_lskcipher_crypt(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv, int (*crypt)(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv, u32 flags)) argument
140 crypto_lskcipher_encrypt(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv) argument
149 crypto_lskcipher_decrypt(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv) argument
158 crypto_lskcipher_crypt_sg(struct skcipher_request *req, int (*crypt)(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *ivs, u32 flags)) argument
167 struct crypto_lskcipher *tfm = *ctx; local
219 crypto_lskcipher_exit_tfm(struct crypto_tfm *tfm) argument
227 crypto_lskcipher_init_tfm(struct crypto_tfm *tfm) argument
299 crypto_lskcipher_exit_tfm_sg(struct crypto_tfm *tfm) argument
306 crypto_init_lskcipher_ops_sg(struct crypto_tfm *tfm) argument
425 lskcipher_setkey_simple(struct crypto_lskcipher *tfm, const u8 *key, unsigned int keylen) argument
436 lskcipher_init_tfm_simple(struct crypto_lskcipher *tfm) argument
452 lskcipher_exit_tfm_simple(struct crypto_lskcipher *tfm) argument
[all...]
H A Dapi.c348 static void crypto_exit_ops(struct crypto_tfm *tfm) argument
350 const struct crypto_type *type = tfm->__crt_alg->cra_type;
352 if (type && tfm->exit)
353 tfm->exit(tfm);
392 struct crypto_tfm *tfm; local
396 tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, type, mask);
397 tfm = kzalloc(tfm_size, gfp);
398 if (tfm == NULL)
401 tfm
452 struct crypto_tfm *tfm; local
488 struct crypto_tfm *tfm; local
512 struct crypto_tfm *tfm; local
547 struct crypto_tfm *tfm; local
611 void *tfm; local
651 crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm) argument
[all...]
H A Dakcipher.c44 static void crypto_akcipher_exit_tfm(struct crypto_tfm *tfm) argument
46 struct crypto_akcipher *akcipher = __crypto_akcipher_tfm(tfm);
52 static int crypto_akcipher_init_tfm(struct crypto_tfm *tfm) argument
54 struct crypto_akcipher *akcipher = __crypto_akcipher_tfm(tfm);
119 static int akcipher_default_set_key(struct crypto_akcipher *tfm, argument
163 unsigned int reqsize = crypto_akcipher_reqsize(data->tfm);
184 akcipher_request_set_tfm(req, data->tfm);
214 int crypto_akcipher_sync_encrypt(struct crypto_akcipher *tfm, argument
219 .tfm = tfm,
232 crypto_akcipher_sync_decrypt(struct crypto_akcipher *tfm, const void *src, unsigned int slen, void *dst, unsigned int dlen) argument
251 crypto_exit_akcipher_ops_sig(struct crypto_tfm *tfm) argument
258 crypto_init_akcipher_ops_sig(struct crypto_tfm *tfm) argument
[all...]
H A Dcrypto_null.c27 static int null_compress(struct crypto_tfm *tfm, const u8 *src, argument
59 static int null_hash_setkey(struct crypto_shash *tfm, const u8 *key, argument
63 static int null_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, argument
67 static int null_setkey(struct crypto_tfm *tfm, const u8 *key, argument
71 static void null_crypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
155 struct crypto_sync_skcipher *tfm; local
158 tfm = crypto_default_null_skcipher;
160 if (!tfm) {
161 tfm = crypto_alloc_sync_skcipher("ecb(cipher_null)", 0, 0);
162 if (IS_ERR(tfm))
[all...]
H A Dcryptd.c141 refcnt = crypto_tfm_ctx(request->tfm);
187 static inline struct cryptd_queue *cryptd_get_queue(struct crypto_tfm *tfm) argument
189 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm);
270 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
271 struct cryptd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm);
285 crypto_free_skcipher(tfm);
316 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
320 queue = cryptd_get_queue(crypto_skcipher_tfm(tfm));
339 static int cryptd_skcipher_init_tfm(struct crypto_skcipher *tfm) argument
341 struct skcipher_instance *inst = skcipher_alg_instance(tfm);
358 cryptd_skcipher_exit_tfm(struct crypto_skcipher *tfm) argument
430 cryptd_hash_init_tfm(struct crypto_ahash *tfm) argument
449 cryptd_hash_clone_tfm(struct crypto_ahash *ntfm, struct crypto_ahash *tfm) argument
464 cryptd_hash_exit_tfm(struct crypto_ahash *tfm) argument
487 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
516 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
534 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
610 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
641 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
745 struct crypto_aead *tfm; local
812 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local
833 cryptd_aead_init_tfm(struct crypto_aead *tfm) argument
852 cryptd_aead_exit_tfm(struct crypto_aead *tfm) argument
954 struct crypto_skcipher *tfm; local
976 cryptd_skcipher_child(struct cryptd_skcipher *tfm) argument
984 cryptd_skcipher_queued(struct cryptd_skcipher *tfm) argument
992 cryptd_free_skcipher(struct cryptd_skcipher *tfm) argument
1006 struct crypto_ahash *tfm; local
1026 cryptd_ahash_child(struct cryptd_ahash *tfm) argument
1041 cryptd_ahash_queued(struct cryptd_ahash *tfm) argument
1049 cryptd_free_ahash(struct cryptd_ahash *tfm) argument
1063 struct crypto_aead *tfm; local
1083 cryptd_aead_child(struct cryptd_aead *tfm) argument
1091 cryptd_aead_queued(struct cryptd_aead *tfm) argument
1099 cryptd_free_aead(struct cryptd_aead *tfm) argument
[all...]
H A Dlz4hc.c18 static void *lz4hc_alloc_ctx(struct crypto_scomp *tfm) argument
29 static int lz4hc_init(struct crypto_tfm *tfm) argument
31 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm);
40 static void lz4hc_free_ctx(struct crypto_scomp *tfm, void *ctx) argument
45 static void lz4hc_exit(struct crypto_tfm *tfm) argument
47 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm);
65 static int lz4hc_scompress(struct crypto_scomp *tfm, const u8 *src, argument
72 static int lz4hc_compress_crypto(struct crypto_tfm *tfm, const u8 *src, argument
76 struct lz4hc_ctx *ctx = crypto_tfm_ctx(tfm);
94 static int lz4hc_sdecompress(struct crypto_scomp *tfm, cons argument
101 lz4hc_decompress_crypto(struct crypto_tfm *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int *dlen) argument
[all...]
H A Dlz4.c19 static void *lz4_alloc_ctx(struct crypto_scomp *tfm) argument
30 static int lz4_init(struct crypto_tfm *tfm) argument
32 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm);
41 static void lz4_free_ctx(struct crypto_scomp *tfm, void *ctx) argument
46 static void lz4_exit(struct crypto_tfm *tfm) argument
48 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm);
66 static int lz4_scompress(struct crypto_scomp *tfm, const u8 *src, argument
73 static int lz4_compress_crypto(struct crypto_tfm *tfm, const u8 *src, argument
76 struct lz4_ctx *ctx = crypto_tfm_ctx(tfm);
93 static int lz4_sdecompress(struct crypto_scomp *tfm, cons argument
100 lz4_decompress_crypto(struct crypto_tfm *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int *dlen) argument
[all...]
H A Dlzo-rle.c18 static void *lzorle_alloc_ctx(struct crypto_scomp *tfm) argument
29 static int lzorle_init(struct crypto_tfm *tfm) argument
31 struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm);
40 static void lzorle_free_ctx(struct crypto_scomp *tfm, void *ctx) argument
45 static void lzorle_exit(struct crypto_tfm *tfm) argument
47 struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm);
67 static int lzorle_compress(struct crypto_tfm *tfm, const u8 *src, argument
70 struct lzorle_ctx *ctx = crypto_tfm_ctx(tfm);
75 static int lzorle_scompress(struct crypto_scomp *tfm, const u8 *src, argument
97 static int lzorle_decompress(struct crypto_tfm *tfm, cons argument
103 lzorle_sdecompress(struct crypto_scomp *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int *dlen, void *ctx) argument
[all...]
H A Dlzo.c18 static void *lzo_alloc_ctx(struct crypto_scomp *tfm) argument
29 static int lzo_init(struct crypto_tfm *tfm) argument
31 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm);
40 static void lzo_free_ctx(struct crypto_scomp *tfm, void *ctx) argument
45 static void lzo_exit(struct crypto_tfm *tfm) argument
47 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm);
67 static int lzo_compress(struct crypto_tfm *tfm, const u8 *src, argument
70 struct lzo_ctx *ctx = crypto_tfm_ctx(tfm);
75 static int lzo_scompress(struct crypto_scomp *tfm, const u8 *src, argument
97 static int lzo_decompress(struct crypto_tfm *tfm, cons argument
103 lzo_sdecompress(struct crypto_scomp *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int *dlen, void *ctx) argument
[all...]
H A Dskcipher.c450 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
451 struct skcipher_alg *alg = crypto_skcipher_alg(tfm);
468 walk->blocksize = crypto_skcipher_blocksize(tfm);
469 walk->ivsize = crypto_skcipher_ivsize(tfm);
470 walk->alignmask = crypto_skcipher_alignmask(tfm);
511 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local
537 walk->blocksize = crypto_aead_blocksize(tfm);
538 walk->stride = crypto_aead_chunksize(tfm);
539 walk->ivsize = crypto_aead_ivsize(tfm);
540 walk->alignmask = crypto_aead_alignmask(tfm);
562 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local
570 skcipher_set_needkey(struct crypto_skcipher *tfm) argument
576 skcipher_setkey_unaligned(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument
597 crypto_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument
636 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
649 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
662 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
675 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
698 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
709 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
718 crypto_skcipher_exit_tfm(struct crypto_tfm *tfm) argument
726 crypto_skcipher_init_tfm(struct crypto_tfm *tfm) argument
843 struct crypto_skcipher *tfm; local
978 skcipher_setkey_simple(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument
989 skcipher_init_tfm_simple(struct crypto_skcipher *tfm) argument
1004 skcipher_exit_tfm_simple(struct crypto_skcipher *tfm) argument
[all...]
H A Dansi_cprng.c47 struct crypto_cipher *tfm; member in struct:prng_context
156 crypto_cipher_encrypt_one(ctx->tfm, output, tmp);
273 crypto_free_cipher(ctx->tfm);
306 ret = crypto_cipher_setkey(ctx->tfm, prng_key, klen);
309 crypto_cipher_get_flags(ctx->tfm));
320 static int cprng_init(struct crypto_tfm *tfm) argument
322 struct prng_context *ctx = crypto_tfm_ctx(tfm);
325 ctx->tfm = crypto_alloc_cipher("aes", 0, 0);
326 if (IS_ERR(ctx->tfm)) {
327 dbgprint(KERN_CRIT "Failed to alloc tfm fo
344 cprng_exit(struct crypto_tfm *tfm) argument
349 cprng_get_random(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *rdata, unsigned int dlen) argument
364 cprng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) argument
385 fips_cprng_get_random(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *rdata, unsigned int dlen) argument
394 fips_cprng_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) argument
[all...]
/linux-master/arch/arm64/crypto/
H A Dsm4-ce-cipher-glue.c20 static int sm4_ce_setkey(struct crypto_tfm *tfm, const u8 *key, argument
23 struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
28 static void sm4_ce_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
30 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
41 static void sm4_ce_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
43 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
H A Daes-cipher-glue.c15 static void aes_arm64_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
17 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
23 static void aes_arm64_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
25 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
/linux-master/include/crypto/internal/
H A Dkpp.h76 static inline void *kpp_tfm_ctx(struct crypto_kpp *tfm) argument
78 return crypto_tfm_ctx(&tfm->base);
81 static inline void *kpp_tfm_ctx_dma(struct crypto_kpp *tfm) argument
83 return crypto_tfm_ctx_dma(&tfm->base);
91 static inline const char *kpp_alg_name(struct crypto_kpp *tfm) argument
93 return crypto_kpp_tfm(tfm)->__crt_alg->cra_name;
H A Dakcipher.h59 static inline void *akcipher_tfm_ctx(struct crypto_akcipher *tfm) argument
61 return crypto_tfm_ctx(&tfm->base);
64 static inline void *akcipher_tfm_ctx_dma(struct crypto_akcipher *tfm) argument
66 return crypto_tfm_ctx_dma(&tfm->base);
75 static inline const char *akcipher_alg_name(struct crypto_akcipher *tfm) argument
77 return crypto_akcipher_tfm(tfm)->__crt_alg->cra_name;
/linux-master/arch/riscv/crypto/
H A Dsm4-riscv64-glue.c27 static int riscv64_sm4_setkey(struct crypto_tfm *tfm, const u8 *key, argument
30 struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
43 static void riscv64_sm4_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
45 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
56 static void riscv64_sm4_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
58 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
/linux-master/drivers/crypto/qce/
H A Dcipher.h48 static inline struct qce_alg_template *to_cipher_tmpl(struct crypto_skcipher *tfm) argument
50 struct skcipher_alg *alg = crypto_skcipher_alg(tfm);
/linux-master/arch/x86/crypto/
H A Dghash-clmulni-intel_glue.c54 static int ghash_setkey(struct crypto_shash *tfm, argument
57 struct ghash_ctx *ctx = crypto_shash_ctx(tfm);
99 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
152 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
181 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
182 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm);
188 desc->tfm = child;
195 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
196 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm);
213 struct crypto_ahash *tfm local
253 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
272 ghash_async_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument
284 ghash_async_init_tfm(struct crypto_tfm *tfm) argument
302 ghash_async_exit_tfm(struct crypto_tfm *tfm) argument
[all...]
H A Dtwofish_glue.c54 static void twofish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
56 twofish_enc_blk(crypto_tfm_ctx(tfm), dst, src);
59 static void twofish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
61 twofish_dec_blk(crypto_tfm_ctx(tfm), dst, src);
/linux-master/include/crypto/
H A Dblowfish.h21 int blowfish_setkey(struct crypto_tfm *tfm, const u8 *key,
H A Dtwofish.h23 int twofish_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int key_len);
/linux-master/arch/arm/crypto/
H A Daes-cipher-glue.c16 static void aes_arm_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
18 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
24 static void aes_arm_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
26 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);

Completed in 476 milliseconds

1234567891011>>