Home
last modified time | relevance | path

Searched refs:tfm (Results 1 – 25 of 40) sorted by relevance

12

/arch/s390/crypto/
Daes_s390.c94 static int setkey_fallback_cip(struct crypto_tfm *tfm, const u8 *in_key, in setkey_fallback_cip() argument
97 struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); in setkey_fallback_cip()
101 sctx->fallback.cip->base.crt_flags |= (tfm->crt_flags & in setkey_fallback_cip()
106 tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK; in setkey_fallback_cip()
107 tfm->crt_flags |= (sctx->fallback.cip->base.crt_flags & in setkey_fallback_cip()
113 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
116 struct s390_aes_ctx *sctx = crypto_tfm_ctx(tfm); in aes_set_key()
117 u32 *flags = &tfm->crt_flags; in aes_set_key()
132 return setkey_fallback_cip(tfm, in_key, key_len); in aes_set_key()
135 static void aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in aes_encrypt() argument
[all …]
Ddes_s390.c35 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, in des_setkey() argument
38 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in des_setkey()
39 u32 *flags = &tfm->crt_flags; in des_setkey()
52 static void des_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in des_encrypt() argument
54 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in des_encrypt()
59 static void des_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in des_decrypt() argument
61 struct s390_des_ctx *ctx = crypto_tfm_ctx(tfm); in des_decrypt()
111 struct s390_des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_desall_crypt()
147 struct s390_des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_des_encrypt()
158 struct s390_des_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_des_decrypt()
[all …]
Dghash_s390.c32 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_init()
40 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument
43 struct ghash_ctx *ctx = crypto_shash_ctx(tfm); in ghash_setkey()
46 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ghash_setkey()
Dsha_common.c24 unsigned int bsize = crypto_shash_blocksize(desc->tfm); in s390_sha_update()
66 unsigned int bsize = crypto_shash_blocksize(desc->tfm); in s390_sha_final()
97 memcpy(out, ctx->state, crypto_shash_digestsize(desc->tfm)); in s390_sha_final()
/arch/arm/crypto/
Daes_glue.c16 static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_encrypt() argument
18 struct AES_CTX *ctx = crypto_tfm_ctx(tfm); in aes_encrypt()
22 static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_decrypt() argument
24 struct AES_CTX *ctx = crypto_tfm_ctx(tfm); in aes_decrypt()
28 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aes_set_key() argument
31 struct AES_CTX *ctx = crypto_tfm_ctx(tfm); in aes_set_key()
44 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aes_set_key()
49 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aes_set_key()
55 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aes_set_key()
Daesbs-glue.c57 static int aesbs_cbc_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aesbs_cbc_set_key() argument
60 struct aesbs_cbc_ctx *ctx = crypto_tfm_ctx(tfm); in aesbs_cbc_set_key()
64 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aesbs_cbc_set_key()
73 static int aesbs_ctr_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aesbs_ctr_set_key() argument
76 struct aesbs_ctr_ctx *ctx = crypto_tfm_ctx(tfm); in aesbs_ctr_set_key()
80 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aesbs_ctr_set_key()
87 static int aesbs_xts_set_key(struct crypto_tfm *tfm, const u8 *in_key, in aesbs_xts_set_key() argument
90 struct aesbs_xts_ctx *ctx = crypto_tfm_ctx(tfm); in aesbs_xts_set_key()
94 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in aesbs_xts_set_key()
108 struct aesbs_cbc_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in aesbs_cbc_encrypt()
[all …]
Daes-ce-glue.c135 static int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ce_aes_setkey() argument
138 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in ce_aes_setkey()
145 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in ce_aes_setkey()
154 static int xts_set_key(struct crypto_tfm *tfm, const u8 *in_key, in xts_set_key() argument
157 struct crypto_aes_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_set_key()
167 tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; in xts_set_key()
174 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_encrypt()
197 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_decrypt()
220 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_encrypt()
244 struct crypto_aes_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_decrypt()
[all …]
/arch/x86/crypto/
Dghash-clmulni-intel_glue.c55 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument
58 struct ghash_ctx *ctx = crypto_shash_ctx(tfm); in ghash_setkey()
63 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ghash_setkey()
84 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_update()
137 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_final()
166 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ghash_async_init() local
167 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm); in ghash_async_init()
179 desc->tfm = child; in ghash_async_init()
190 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in ghash_async_update() local
191 struct ghash_async_ctx *ctx = crypto_ahash_ctx(tfm); in ghash_async_update()
[all …]
Dfpu.c48 struct crypto_fpu_ctx *ctx = crypto_blkcipher_ctx(desc_in->tfm); in crypto_fpu_encrypt()
51 .tfm = child, in crypto_fpu_encrypt()
57 err = crypto_blkcipher_crt(desc.tfm)->encrypt(&desc, dst, src, nbytes); in crypto_fpu_encrypt()
67 struct crypto_fpu_ctx *ctx = crypto_blkcipher_ctx(desc_in->tfm); in crypto_fpu_decrypt()
70 .tfm = child, in crypto_fpu_decrypt()
76 err = crypto_blkcipher_crt(desc.tfm)->decrypt(&desc, dst, src, nbytes); in crypto_fpu_decrypt()
81 static int crypto_fpu_init_tfm(struct crypto_tfm *tfm) in crypto_fpu_init_tfm() argument
83 struct crypto_instance *inst = crypto_tfm_alg_instance(tfm); in crypto_fpu_init_tfm()
85 struct crypto_fpu_ctx *ctx = crypto_tfm_ctx(tfm); in crypto_fpu_init_tfm()
96 static void crypto_fpu_exit_tfm(struct crypto_tfm *tfm) in crypto_fpu_exit_tfm() argument
[all …]
Daesni-intel_glue.c283 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()
[all …]
Dtwofish_glue.c54 static void twofish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in twofish_encrypt() argument
56 twofish_enc_blk(crypto_tfm_ctx(tfm), dst, src); in twofish_encrypt()
59 static void twofish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in twofish_decrypt() argument
61 twofish_dec_blk(crypto_tfm_ctx(tfm), dst, src); in twofish_decrypt()
Dsalsa20_glue.c40 static int setkey(struct crypto_tfm *tfm, const u8 *key, in setkey() argument
43 struct salsa20_ctx *ctx = crypto_tfm_ctx(tfm); in setkey()
53 struct crypto_blkcipher *tfm = desc->tfm; in encrypt() local
54 struct salsa20_ctx *ctx = crypto_blkcipher_ctx(tfm); in encrypt()
Daes_glue.c25 static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_encrypt() argument
27 aes_enc_blk(crypto_tfm_ctx(tfm), dst, src); in aes_encrypt()
30 static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in aes_decrypt() argument
32 aes_dec_blk(crypto_tfm_ctx(tfm), dst, src); in aes_decrypt()
Dtwofish_glue_3way.c216 int lrw_twofish_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_twofish_setkey() argument
219 struct twofish_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_twofish_setkey()
223 &tfm->crt_flags); in lrw_twofish_setkey()
234 struct twofish_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt()
251 struct twofish_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt()
265 void lrw_twofish_exit_tfm(struct crypto_tfm *tfm) in lrw_twofish_exit_tfm() argument
267 struct twofish_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_twofish_exit_tfm()
273 int xts_twofish_setkey(struct crypto_tfm *tfm, const u8 *key, in xts_twofish_setkey() argument
276 struct twofish_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_twofish_setkey()
277 u32 *flags = &tfm->crt_flags; in xts_twofish_setkey()
[all …]
Ddes3_ede_glue.c76 static void des3_ede_x86_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des3_ede_x86_encrypt() argument
78 des3_ede_enc_blk(crypto_tfm_ctx(tfm), dst, src); in des3_ede_x86_encrypt()
81 static void des3_ede_x86_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des3_ede_x86_decrypt() argument
83 des3_ede_dec_blk(crypto_tfm_ctx(tfm), dst, src); in des3_ede_x86_decrypt()
133 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_encrypt()
143 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_decrypt()
153 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_encrypt()
194 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_decrypt()
289 struct des3_ede_x86_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ctr_crypt()
352 ctr_crypt_final(crypto_blkcipher_ctx(desc->tfm), &walk); in ctr_crypt()
[all …]
Dcrc32c-intel_glue.c130 u32 *mctx = crypto_shash_ctx(desc->tfm); in crc32c_intel_init()
171 return __crc32c_intel_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32c_intel_digest()
175 static int crc32c_intel_cra_init(struct crypto_tfm *tfm) in crc32c_intel_cra_init() argument
177 u32 *key = crypto_tfm_ctx(tfm); in crc32c_intel_cra_init()
225 return __crc32c_pcl_intel_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32c_pcl_intel_digest()
Dcrc32-pclmul_glue.c82 static int crc32_pclmul_cra_init(struct crypto_tfm *tfm) in crc32_pclmul_cra_init() argument
84 u32 *key = crypto_tfm_ctx(tfm); in crc32_pclmul_cra_init()
106 u32 *mctx = crypto_shash_ctx(desc->tfm); in crc32_pclmul_init()
148 return __crc32_pclmul_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32_pclmul_digest()
Dcast6_avx_glue.c248 static int lrw_cast6_setkey(struct crypto_tfm *tfm, const u8 *key, in lrw_cast6_setkey() argument
251 struct cast6_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_cast6_setkey()
255 &tfm->crt_flags); in lrw_cast6_setkey()
265 struct cast6_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_encrypt()
291 struct cast6_lrw_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in lrw_decrypt()
314 static void lrw_exit_tfm(struct crypto_tfm *tfm) in lrw_exit_tfm() argument
316 struct cast6_lrw_ctx *ctx = crypto_tfm_ctx(tfm); in lrw_exit_tfm()
326 static int xts_cast6_setkey(struct crypto_tfm *tfm, const u8 *key, in xts_cast6_setkey() argument
329 struct cast6_xts_ctx *ctx = crypto_tfm_ctx(tfm); in xts_cast6_setkey()
330 u32 *flags = &tfm->crt_flags; in xts_cast6_setkey()
[all …]
/arch/sparc/crypto/
Ddes_glue.c43 static int des_set_key(struct crypto_tfm *tfm, const u8 *key, in des_set_key() argument
46 struct des_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des_set_key()
47 u32 *flags = &tfm->crt_flags; in des_set_key()
70 static void des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des_encrypt() argument
72 struct des_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in des_encrypt()
78 static void des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in des_decrypt() argument
80 struct des_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in des_decrypt()
97 struct des_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ecb_crypt()
145 struct des_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_encrypt()
176 struct des_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_decrypt()
[all …]
Dcamellia_glue.c35 static int camellia_set_key(struct crypto_tfm *tfm, const u8 *_in_key, in camellia_set_key() argument
38 struct camellia_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in camellia_set_key()
40 u32 *flags = &tfm->crt_flags; in camellia_set_key()
57 static void camellia_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in camellia_encrypt() argument
59 struct camellia_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in camellia_encrypt()
66 static void camellia_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in camellia_decrypt() argument
68 struct camellia_sparc64_ctx *ctx = crypto_tfm_ctx(tfm); in camellia_decrypt()
89 struct camellia_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ecb_crypt()
152 struct camellia_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_encrypt()
191 struct camellia_sparc64_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in cbc_decrypt()
Dcrc32c_glue.c45 u32 *mctx = crypto_shash_ctx(desc->tfm); in crc32c_sparc64_init()
107 return __crc32c_sparc64_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32c_sparc64_digest()
111 static int crc32c_sparc64_cra_init(struct crypto_tfm *tfm) in crc32c_sparc64_cra_init() argument
113 u32 *key = crypto_tfm_ctx(tfm); in crc32c_sparc64_cra_init()
/arch/arm64/crypto/
Daes-ce-cipher.c37 static void aes_cipher_encrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[]) in aes_cipher_encrypt() argument
39 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_cipher_encrypt()
82 static void aes_cipher_decrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[]) in aes_cipher_decrypt() argument
84 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_cipher_decrypt()
Dghash-ce-glue.c56 struct ghash_key *key = crypto_shash_ctx(desc->tfm); in ghash_update()
88 struct ghash_key *key = crypto_shash_ctx(desc->tfm); in ghash_final()
103 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument
106 struct ghash_key *key = crypto_shash_ctx(tfm); in ghash_setkey()
110 crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in ghash_setkey()
/arch/x86/include/asm/crypto/
Dtwofish.h38 extern int lrw_twofish_setkey(struct crypto_tfm *tfm, const u8 *key,
41 extern void lrw_twofish_exit_tfm(struct crypto_tfm *tfm);
43 extern int xts_twofish_setkey(struct crypto_tfm *tfm, const u8 *key,
Dserpent-avx.h40 extern int lrw_serpent_setkey(struct crypto_tfm *tfm, const u8 *key,
43 extern void lrw_serpent_exit_tfm(struct crypto_tfm *tfm);
45 extern int xts_serpent_setkey(struct crypto_tfm *tfm, const u8 *key,

12