From patchwork Fri Jun 5 09:39:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 6552311 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C8FF0C0020 for ; Fri, 5 Jun 2015 09:39:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E926E2074A for ; Fri, 5 Jun 2015 09:39:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAD7F20747 for ; Fri, 5 Jun 2015 09:39:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752270AbbFEJja (ORCPT ); Fri, 5 Jun 2015 05:39:30 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:38616 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbbFEJj3 (ORCPT ); Fri, 5 Jun 2015 05:39:29 -0400 Received: by wibdq8 with SMTP id dq8so12873628wib.1 for ; Fri, 05 Jun 2015 02:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=HqkO8CIkIm8QSyeVl2Uo7HLTl8Fap9RkEO3Rcd26s9U=; b=xET2hkYmQGyGyQhFyBkU2Nm5g7wCglgcsMXGASb4zCEcDg2+hQNEq1mRDgroxJIWwr 5ywEPIZ3Ki5xYwb75/tNivxVwJmrahlfhq8yqrLvjXH8mC+fvcBAfq/zR6SPyNUEZJRg 6KhHRS3+cPrGt1cYrlV84pljhf17BzE2gHCl+/few44+XCwqJSz9ga7fv6wu3vNSG+Rl pe+yi89xXK0XYym1GgAy7GDOGwiKfoExcnLfA0auVGiZVwzK1wdFveieS2uvp02m/0Vi sxhEClXayBKqCeAJQ+oYqh4gwNvpzcAC8CE726f7U6wTtdAo0gSxR80JVw9wj6+nZedT XIWA== X-Received: by 10.180.83.40 with SMTP id n8mr16367127wiy.57.1433497168107; Fri, 05 Jun 2015 02:39:28 -0700 (PDT) Received: from Red ([2a01:240:fe00:142::2]) by mx.google.com with ESMTPSA id ef10sm9738818wjd.49.2015.06.05.02.39.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 02:39:27 -0700 (PDT) Date: Fri, 5 Jun 2015 11:39:22 +0200 From: LABBE Corentin To: linux-crypto@vger.kernel.org Subject: [PATCH RFC] crypto: testmgr - Document struct cipher_testvec Message-ID: <20150605093922.GA16806@Red> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello I was adding a test to testmgr for cbc(aes) but I hesitate on the cipher_testvec parameter also_non_np. Since its functions is not trivial, I propose a patch for documenting the struture. So does I have well understand the purpose of also_non_np ? And if yes what it is the interest of doing a test twice (one with and one without SG splitting) ? Regards From 0156e32be7dd7ffd0a4fdad8d0a3eaf3c0bf92c7 Mon Sep 17 00:00:00 2001 From: LABBE Corentin Date: Wed, 3 Jun 2015 09:09:13 +0200 Subject: [PATCH 02/11] crypto: testmgr - Document struct cipher_testvec Signed-off-by: LABBE Corentin --- crypto/testmgr.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 8a31e9a..ab2019e 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -46,6 +46,24 @@ struct hash_testvec { unsigned char ksize; }; +/* + * cipher_testvec: structure to describe a cipher test + * @key: A pointer to a key used by the test + * @klen: The length of @key + * @iv: A pointer to the IV used by the test + * @input: A pointer to data used as input + * @ilen The length of data in @input + * @result: A pointer to what the test need to produce + * @rlen: The length of data in @result + * @fail: If set to one, the test need to fail + * @wk: Does the test need CRYPTO_TFM_REQ_WEAK_KEY + * ( e.g. test needs to fail due to a weak key ) + * @np: numbers of SG to distribute data in (from 1 to MAX_TAP) + * @tap: How to distribute data in @np SGs + * @also_non_np: if set to 1, the test will be also done without + * splitting data in @np SGs + */ + struct cipher_testvec { char *key; char *iv;