qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.9 3/3] tests: crypto: add testcase for sta


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH for-2.9 3/3] tests: crypto: add testcase for standard des(ecb)
Date: Mon, 5 Dec 2016 09:24:34 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

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) <address@hidden>
> ---
>  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/ :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]