Lines Matching refs:desc

59 static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,  in ecb_crypt()  argument
63 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_crypt()
71 err = blkcipher_walk_virt(desc, walk); in ecb_crypt()
72 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; in ecb_crypt()
106 err = blkcipher_walk_done(desc, walk, nbytes); in ecb_crypt()
113 static int ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ecb_encrypt() argument
119 return ecb_crypt(desc, &walk, true); in ecb_encrypt()
122 static int ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ecb_decrypt() argument
128 return ecb_crypt(desc, &walk, false); in ecb_decrypt()
131 static unsigned int __cbc_encrypt(struct blkcipher_desc *desc, in __cbc_encrypt() argument
134 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_encrypt()
155 static int cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in cbc_encrypt() argument
162 err = blkcipher_walk_virt(desc, &walk); in cbc_encrypt()
165 nbytes = __cbc_encrypt(desc, &walk); in cbc_encrypt()
166 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_encrypt()
172 static unsigned int __cbc_decrypt(struct blkcipher_desc *desc, in __cbc_decrypt() argument
175 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_decrypt()
227 static int cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in cbc_decrypt() argument
235 err = blkcipher_walk_virt(desc, &walk); in cbc_decrypt()
236 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; in cbc_decrypt()
240 nbytes = __cbc_decrypt(desc, &walk); in cbc_decrypt()
241 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_decrypt()
248 static void ctr_crypt_final(struct blkcipher_desc *desc, in ctr_crypt_final() argument
251 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ctr_crypt_final()
265 static unsigned int __ctr_crypt(struct blkcipher_desc *desc, in __ctr_crypt() argument
268 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ctr_crypt()
311 static int ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ctr_crypt() argument
319 err = blkcipher_walk_virt_block(desc, &walk, CAST5_BLOCK_SIZE); in ctr_crypt()
320 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; in ctr_crypt()
324 nbytes = __ctr_crypt(desc, &walk); in ctr_crypt()
325 err = blkcipher_walk_done(desc, &walk, nbytes); in ctr_crypt()
331 ctr_crypt_final(desc, &walk); in ctr_crypt()
332 err = blkcipher_walk_done(desc, &walk, 0); in ctr_crypt()