Lines Matching refs:walk

17 static int crypto_cbc_encrypt_segment(struct skcipher_walk *walk,  in crypto_cbc_encrypt_segment()  argument
22 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_segment()
23 u8 *src = walk->src.virt.addr; in crypto_cbc_encrypt_segment()
24 u8 *dst = walk->dst.virt.addr; in crypto_cbc_encrypt_segment()
27 u8 *iv = walk->iv; in crypto_cbc_encrypt_segment()
45 static int crypto_cbc_encrypt_inplace(struct skcipher_walk *walk, in crypto_cbc_encrypt_inplace() argument
50 unsigned int nbytes = walk->nbytes; in crypto_cbc_encrypt_inplace()
51 u8 *src = walk->src.virt.addr; in crypto_cbc_encrypt_inplace()
54 u8 *iv = walk->iv; in crypto_cbc_encrypt_inplace()
68 memcpy(walk->iv, iv, bsize); in crypto_cbc_encrypt_inplace()
76 struct skcipher_walk walk; in crypto_cbc_encrypt() local
79 err = skcipher_walk_virt(&walk, req, false); in crypto_cbc_encrypt()
81 while (walk.nbytes) { in crypto_cbc_encrypt()
82 if (walk.src.virt.addr == walk.dst.virt.addr) in crypto_cbc_encrypt()
83 err = crypto_cbc_encrypt_inplace(&walk, skcipher); in crypto_cbc_encrypt()
85 err = crypto_cbc_encrypt_segment(&walk, skcipher); in crypto_cbc_encrypt()
86 err = skcipher_walk_done(&walk, err); in crypto_cbc_encrypt()
92 static int crypto_cbc_decrypt_segment(struct skcipher_walk *walk, in crypto_cbc_decrypt_segment() argument
97 unsigned int nbytes = walk->nbytes; in crypto_cbc_decrypt_segment()
98 u8 *src = walk->src.virt.addr; in crypto_cbc_decrypt_segment()
99 u8 *dst = walk->dst.virt.addr; in crypto_cbc_decrypt_segment()
102 u8 *iv = walk->iv; in crypto_cbc_decrypt_segment()
117 memcpy(walk->iv, iv, bsize); in crypto_cbc_decrypt_segment()
122 static int crypto_cbc_decrypt_inplace(struct skcipher_walk *walk, in crypto_cbc_decrypt_inplace() argument
127 unsigned int nbytes = walk->nbytes; in crypto_cbc_decrypt_inplace()
128 u8 *src = walk->src.virt.addr; in crypto_cbc_decrypt_inplace()
149 crypto_xor(src, walk->iv, bsize); in crypto_cbc_decrypt_inplace()
150 memcpy(walk->iv, last_iv, bsize); in crypto_cbc_decrypt_inplace()
158 struct skcipher_walk walk; in crypto_cbc_decrypt() local
161 err = skcipher_walk_virt(&walk, req, false); in crypto_cbc_decrypt()
163 while (walk.nbytes) { in crypto_cbc_decrypt()
164 if (walk.src.virt.addr == walk.dst.virt.addr) in crypto_cbc_decrypt()
165 err = crypto_cbc_decrypt_inplace(&walk, skcipher); in crypto_cbc_decrypt()
167 err = crypto_cbc_decrypt_segment(&walk, skcipher); in crypto_cbc_decrypt()
168 err = skcipher_walk_done(&walk, err); in crypto_cbc_decrypt()