From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDpVs-0005Te-Id for qemu-devel@nongnu.org; Mon, 05 Dec 2016 04:24:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDpVp-0006NG-F9 for qemu-devel@nongnu.org; Mon, 05 Dec 2016 04:24:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52216) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cDpVp-0006N2-8q for qemu-devel@nongnu.org; Mon, 05 Dec 2016 04:24:41 -0500 Date: Mon, 5 Dec 2016 09:24:34 +0000 From: "Daniel P. Berrange" Message-ID: <20161205092434.GB2498@redhat.com> Reply-To: "Daniel P. Berrange" References: <1480928380-161760-1-git-send-email-longpeng2@huawei.com> <1480928380-161760-4-git-send-email-longpeng2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1480928380-161760-4-git-send-email-longpeng2@huawei.com> Subject: Re: [Qemu-devel] [PATCH for-2.9 3/3] tests: crypto: add testcase for standard des(ecb) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Longpeng(Mike)" Cc: eblake@redhat.com, armbru@redhat.com, arei.gonglei@huawei.com, qemu-devel@nongnu.org, wu.wubin@huawei.com, jianjay.zhou@huawei.com On Mon, Dec 05, 2016 at 04:59:40PM +0800, Longpeng(Mike) wrote: > As we have added standart DES support when using gcrypt/nettle, > so this patch add a testcase for standard ecb(des). > > Note: the data is copied from linux-kernel's tcrypt module. > > Signed-off-by: Longpeng(Mike) > --- > tests/test-crypto-cipher.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/tests/test-crypto-cipher.c b/tests/test-crypto-cipher.c > index 5d9e535..382d77e 100644 > --- a/tests/test-crypto-cipher.c > +++ b/tests/test-crypto-cipher.c > @@ -150,6 +150,17 @@ static QCryptoCipherTestData test_data[] = { > "b2eb05e2c39be9fcda6c19078c6a9d1b", > }, > { > + .path = "/crypto/cipher/des-ecb", > + .alg = QCRYPTO_CIPHER_ALG_DES, > + .mode = QCRYPTO_CIPHER_MODE_ECB, > + .key = > + "0123456789abcdef", > + .plaintext = > + "0123456789abcde7", > + .ciphertext = > + "c95744256a5ed31d", > + }, > + { > .path = "/crypto/cipher/des-rfb-ecb-56", > .alg = QCRYPTO_CIPHER_ALG_DES_RFB, > .mode = QCRYPTO_CIPHER_MODE_ECB, This should be included as part of the patch which adds the cipher in the first place. Ideally there should be a CBC mode test as well. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|