Re: [Qemu-devel] [PATCH] virtio-crypto: use the correct length for cipher operation

2017-01-08 Thread Gonglei (Arei)
Hi Michael, Ping... Regards, -Gonglei > -Original Message- > From: Gonglei (Arei) > Sent: Thursday, December 22, 2016 11:37 AM > To: qemu-devel@nongnu.org > Cc: m...@redhat.com; Gonglei (Arei) > Subject: [PATCH] virtio-crypto: use the correct length for cipher operation > > In some m

[Qemu-devel] [PATCH] virtio-crypto: use the correct length for cipher operation

2016-12-21 Thread Gonglei
In some modes of cipher algorithms, the length of destination data maybe larger then source data, such as ciphertext stealing (CTS). For symmetric algorithms, the length of ciphertext is definitly equal to the plaintext for each crypto operation. So we should use the src_len instead of dst_len avo