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) <[email protected]>
---
 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