Lines Matching refs:tail
324 int tail = req->cryptlen % AES_BLOCK_SIZE; in ppc_xts_encrypt() local
325 int offset = req->cryptlen - tail - AES_BLOCK_SIZE; in ppc_xts_encrypt()
333 if (tail) { in ppc_xts_encrypt()
336 req->cryptlen - tail, req->iv); in ppc_xts_encrypt()
341 if (err || !tail) in ppc_xts_encrypt()
345 memcpy(b[1], b[0], tail); in ppc_xts_encrypt()
346 scatterwalk_map_and_copy(b[0], req->src, offset + AES_BLOCK_SIZE, tail, 0); in ppc_xts_encrypt()
353 scatterwalk_map_and_copy(b[0], req->dst, offset, AES_BLOCK_SIZE + tail, 1); in ppc_xts_encrypt()
362 int tail = req->cryptlen % AES_BLOCK_SIZE; in ppc_xts_decrypt() local
363 int offset = req->cryptlen - tail - AES_BLOCK_SIZE; in ppc_xts_decrypt()
372 if (tail) { in ppc_xts_decrypt()
380 if (err || !tail) in ppc_xts_decrypt()
383 scatterwalk_map_and_copy(b[1], req->src, offset, AES_BLOCK_SIZE + tail, 0); in ppc_xts_decrypt()
394 memcpy(b[0], b[2], tail); in ppc_xts_decrypt()
395 memcpy(b[0] + tail, b[1] + tail, AES_BLOCK_SIZE - tail); in ppc_xts_decrypt()
400 scatterwalk_map_and_copy(b[0], req->dst, offset, AES_BLOCK_SIZE + tail, 1); in ppc_xts_decrypt()