Lines Matching refs:dst
37 asmlinkage void __blowfish_enc_blk(struct bf_ctx *ctx, u8 *dst, const u8 *src,
39 asmlinkage void blowfish_dec_blk(struct bf_ctx *ctx, u8 *dst, const u8 *src);
42 asmlinkage void __blowfish_enc_blk_4way(struct bf_ctx *ctx, u8 *dst,
44 asmlinkage void blowfish_dec_blk_4way(struct bf_ctx *ctx, u8 *dst,
47 static inline void blowfish_enc_blk(struct bf_ctx *ctx, u8 *dst, const u8 *src) in blowfish_enc_blk() argument
49 __blowfish_enc_blk(ctx, dst, src, false); in blowfish_enc_blk()
52 static inline void blowfish_enc_blk_xor(struct bf_ctx *ctx, u8 *dst, in blowfish_enc_blk_xor() argument
55 __blowfish_enc_blk(ctx, dst, src, true); in blowfish_enc_blk_xor()
58 static inline void blowfish_enc_blk_4way(struct bf_ctx *ctx, u8 *dst, in blowfish_enc_blk_4way() argument
61 __blowfish_enc_blk_4way(ctx, dst, src, false); in blowfish_enc_blk_4way()
64 static inline void blowfish_enc_blk_xor_4way(struct bf_ctx *ctx, u8 *dst, in blowfish_enc_blk_xor_4way() argument
67 __blowfish_enc_blk_4way(ctx, dst, src, true); in blowfish_enc_blk_xor_4way()
70 static void blowfish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in blowfish_encrypt() argument
72 blowfish_enc_blk(crypto_tfm_ctx(tfm), dst, src); in blowfish_encrypt()
75 static void blowfish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in blowfish_decrypt() argument
77 blowfish_dec_blk(crypto_tfm_ctx(tfm), dst, src); in blowfish_decrypt()
93 u8 *wdst = walk->dst.virt.addr; in ecb_crypt()
125 static int ecb_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ecb_encrypt() argument
130 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_encrypt()
134 static int ecb_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ecb_decrypt() argument
139 blkcipher_walk_init(&walk, dst, src, nbytes); in ecb_decrypt()
150 u64 *dst = (u64 *)walk->dst.virt.addr; in __cbc_encrypt() local
154 *dst = *src ^ *iv; in __cbc_encrypt()
155 blowfish_enc_blk(ctx, (u8 *)dst, (u8 *)dst); in __cbc_encrypt()
156 iv = dst; in __cbc_encrypt()
159 dst += 1; in __cbc_encrypt()
167 static int cbc_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in cbc_encrypt() argument
173 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_encrypt()
191 u64 *dst = (u64 *)walk->dst.virt.addr; in __cbc_decrypt() local
197 dst += nbytes / bsize - 1; in __cbc_decrypt()
206 dst -= 4 - 1; in __cbc_decrypt()
212 blowfish_dec_blk_4way(ctx, (u8 *)dst, (u8 *)src); in __cbc_decrypt()
214 dst[1] ^= ivs[0]; in __cbc_decrypt()
215 dst[2] ^= ivs[1]; in __cbc_decrypt()
216 dst[3] ^= ivs[2]; in __cbc_decrypt()
222 *dst ^= *(src - 1); in __cbc_decrypt()
224 dst -= 1; in __cbc_decrypt()
230 blowfish_dec_blk(ctx, (u8 *)dst, (u8 *)src); in __cbc_decrypt()
236 *dst ^= *(src - 1); in __cbc_decrypt()
238 dst -= 1; in __cbc_decrypt()
242 *dst ^= *(u64 *)walk->iv; in __cbc_decrypt()
248 static int cbc_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, in cbc_decrypt() argument
254 blkcipher_walk_init(&walk, dst, src, nbytes); in cbc_decrypt()
270 u8 *dst = walk->dst.virt.addr; in ctr_crypt_final() local
275 memcpy(dst, keystream, nbytes); in ctr_crypt_final()
287 u64 *dst = (u64 *)walk->dst.virt.addr; in __ctr_crypt() local
294 if (dst != src) { in __ctr_crypt()
295 dst[0] = src[0]; in __ctr_crypt()
296 dst[1] = src[1]; in __ctr_crypt()
297 dst[2] = src[2]; in __ctr_crypt()
298 dst[3] = src[3]; in __ctr_crypt()
307 blowfish_enc_blk_xor_4way(ctx, (u8 *)dst, in __ctr_crypt()
311 dst += 4; in __ctr_crypt()
320 if (dst != src) in __ctr_crypt()
321 *dst = *src; in __ctr_crypt()
325 blowfish_enc_blk_xor(ctx, (u8 *)dst, (u8 *)ctrblocks); in __ctr_crypt()
328 dst += 1; in __ctr_crypt()
336 static int ctr_crypt(struct blkcipher_desc *desc, struct scatterlist *dst, in ctr_crypt() argument
342 blkcipher_walk_init(&walk, dst, src, nbytes); in ctr_crypt()