Lines Matching refs:desc

60 static int ecb_crypt(struct blkcipher_desc *desc, struct blkcipher_walk *walk,  in ecb_crypt()  argument
64 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ecb_crypt()
72 err = blkcipher_walk_virt(desc, walk); in ecb_crypt()
73 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; in ecb_crypt()
107 err = blkcipher_walk_done(desc, walk, nbytes); in ecb_crypt()
114 static int ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ecb_encrypt() argument
120 return ecb_crypt(desc, &walk, true); in ecb_encrypt()
123 static int ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ecb_decrypt() argument
129 return ecb_crypt(desc, &walk, false); in ecb_decrypt()
132 static unsigned int __cbc_encrypt(struct blkcipher_desc *desc, in __cbc_encrypt() argument
135 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_encrypt()
156 static int cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in cbc_encrypt() argument
163 err = blkcipher_walk_virt(desc, &walk); in cbc_encrypt()
166 nbytes = __cbc_encrypt(desc, &walk); in cbc_encrypt()
167 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_encrypt()
173 static unsigned int __cbc_decrypt(struct blkcipher_desc *desc, in __cbc_decrypt() argument
176 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __cbc_decrypt()
228 static int cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in cbc_decrypt() argument
236 err = blkcipher_walk_virt(desc, &walk); in cbc_decrypt()
237 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; in cbc_decrypt()
241 nbytes = __cbc_decrypt(desc, &walk); in cbc_decrypt()
242 err = blkcipher_walk_done(desc, &walk, nbytes); in cbc_decrypt()
249 static void ctr_crypt_final(struct blkcipher_desc *desc, in ctr_crypt_final() argument
252 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in ctr_crypt_final()
266 static unsigned int __ctr_crypt(struct blkcipher_desc *desc, in __ctr_crypt() argument
269 struct cast5_ctx *ctx = crypto_blkcipher_ctx(desc->tfm); in __ctr_crypt()
312 static int ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ctr_crypt() argument
320 err = blkcipher_walk_virt_block(desc, &walk, CAST5_BLOCK_SIZE); in ctr_crypt()
321 desc->flags &= ~CRYPTO_TFM_REQ_MAY_SLEEP; in ctr_crypt()
325 nbytes = __ctr_crypt(desc, &walk); in ctr_crypt()
326 err = blkcipher_walk_done(desc, &walk, nbytes); in ctr_crypt()
332 ctr_crypt_final(desc, &walk); in ctr_crypt()
333 err = blkcipher_walk_done(desc, &walk, 0); in ctr_crypt()