qemu-devel
[Top][All Lists]
Advanced

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

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


From: Longpeng(Mike)
Subject: [Qemu-devel] [PATCH for-2.9 3/3] tests: crypto: add testcase for standard des(ecb)
Date: Mon, 5 Dec 2016 16:59:40 +0800

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,
-- 
1.8.3.1





reply via email to

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