blkcipher_walk_init(&walk, dst, src, nbytes);
err = blkcipher_walk_virt(desc, &walk);
+ memcpy(op->iv, walk.iv, AES_IV_LENGTH);
while((nbytes = walk.nbytes)) {
op->src = walk.src.virt.addr,
op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
op->dir = AES_DIR_DECRYPT;
- memcpy(op->iv, walk.iv, AES_IV_LENGTH);
-
ret = geode_aes_crypt(op);
- memcpy(walk.iv, op->iv, AES_IV_LENGTH);
nbytes -= ret;
-
err = blkcipher_walk_done(desc, &walk, nbytes);
}
+ memcpy(walk.iv, op->iv, AES_IV_LENGTH);
return err;
}
blkcipher_walk_init(&walk, dst, src, nbytes);
err = blkcipher_walk_virt(desc, &walk);
+ memcpy(op->iv, walk.iv, AES_IV_LENGTH);
while((nbytes = walk.nbytes)) {
op->src = walk.src.virt.addr,
op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
op->dir = AES_DIR_ENCRYPT;
- memcpy(op->iv, walk.iv, AES_IV_LENGTH);
-
ret = geode_aes_crypt(op);
nbytes -= ret;
err = blkcipher_walk_done(desc, &walk, nbytes);
}
+ memcpy(walk.iv, op->iv, AES_IV_LENGTH);
return err;
}