From patchwork Mon May 21 05:50:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10413977 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 75102600CC for ; Mon, 21 May 2018 05:52:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64F7428786 for ; Mon, 21 May 2018 05:52:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59A8228789; Mon, 21 May 2018 05:52:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFE7128786 for ; Mon, 21 May 2018 05:52:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750947AbeEUFwR (ORCPT ); Mon, 21 May 2018 01:52:17 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35931 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbeEUFwP (ORCPT ); Mon, 21 May 2018 01:52:15 -0400 Received: by mail-pf0-f195.google.com with SMTP id w129-v6so6538252pfd.3 for ; Sun, 20 May 2018 22:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QLbx20CzDLp2rlBte9rN66EkTKHUwrzksi1BAAI3kH4=; b=tMSBia1DGaFAxa34EhkqUAei/S0ZjaYKmsPWRxf5R7tq6QySKLgq0EGqOHEzLUgNoT EwikwRI420xtzahdLbR+LFiGRQFKcSBIxMYSO3NWwavTA19MJjAWNa1X6/xDqtJjv4nS 6KU9TTT1wQIZaNZdKZlo48mncb2yzxLURkvXmtoM+vamvCZ2ZWyYnuYEcvEECfskI+ex Q42rPD1p29GLFz86QGkBGDtgMyV9C80tac+JOcKsO+NcvGTQTkXklqSL0J3B6ncu7ZYl jAGcsjD629p19SctrYZ9Fv8dR33ExWRtsIU4bxPDfnCfmwvHW+JvbcNoPkfu1lJkZ0fk CO+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QLbx20CzDLp2rlBte9rN66EkTKHUwrzksi1BAAI3kH4=; b=VwX1l/QZjXexUGTW31hq2JKFoz0ew76Q6MpK7Aw6Hu3Q2ArB7rS7/JC6AyeydnNzmj ybc0WhS7J4kyLtnAOcChZpU2040jw0ubOgd0lTuGLyS48tkw7SonFGHxddZOfWB5jbJS DHKWcx8SaV9D8+zMmw6ft+PIAOAVs+XOLjMPe9robXAxlLro4M4KVsY4WeWpl+LlrgnL oMrXteN+kz7Cgdj9a1GW900k6x9yM5FyVukZZLqKDWLz7YWuH6LsPENJtqRpVeW24y5T 8rwZd3NRx4GfIpiqeGDXRNOQEek3co6vmkay+k0phWKFVf9GHbJINTTFNAQ96bhkAnGP j1gA== X-Gm-Message-State: ALKqPwdMQUr69FciBjFKiAYc3HAWHSwj2qsfb52DsZuKeX0e/bVnjGOK fWLbJmyz2mKe8sveO4NLR+FtlaDJ X-Google-Smtp-Source: AB8JxZpufPB4/wcjOjB3LxTkxV8gxE/dIZZ3d3PXooiYUvtYZmzRk8ypaLbsxgyRQopAsLZ6roahlQ== X-Received: by 2002:a62:4353:: with SMTP id q80-v6mr18716637pfa.228.1526881935070; Sun, 20 May 2018 22:52:15 -0700 (PDT) Received: from sol.localdomain (c-67-185-97-198.hsd1.wa.comcast.net. [67.185.97.198]) by smtp.gmail.com with ESMTPSA id n19-v6sm5859436pgv.89.2018.05.20.22.52.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 May 2018 22:52:14 -0700 (PDT) From: Eric Biggers To: linux-crypto@vger.kernel.org Cc: Herbert Xu , Eric Biggers Subject: [PATCH 1/5] crypto: testmgr - add extra ecb(des) encryption test vectors Date: Sun, 20 May 2018 22:50:25 -0700 Message-Id: <20180521055029.16657-2-ebiggers3@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180521055029.16657-1-ebiggers3@gmail.com> References: <20180521055029.16657-1-ebiggers3@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers Two "ecb(des)" decryption test vectors don't exactly match any of the encryption test vectors with input and result swapped. In preparation for removing the decryption test vectors, add these to the encryption test vectors, so we don't lose any test coverage. Signed-off-by: Eric Biggers --- crypto/testmgr.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 552d8f00d85b..5ab36fb8dd31 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -5595,6 +5595,28 @@ static const struct cipher_testvec des_enc_tv_template[] = { .rlen = 16, .np = 2, .tap = { 8, 8 } + }, { + .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", + .klen = 8, + .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7" + "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5", + .ilen = 16, + .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d" + "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b", + .rlen = 16, + .np = 2, + .tap = { 8, 8 } + }, { + .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", + .klen = 8, + .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7" + "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5", + .ilen = 16, + .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d" + "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b", + .rlen = 16, + .np = 3, + .tap = { 3, 12, 1 } }, { /* Four blocks -- for testing encryption with chunking */ .key = "\x01\x23\x45\x67\x89\xab\xcd\xef", .klen = 8,