Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4747967pja; Fri, 22 Nov 2019 01:12:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyGYPxEqvOzCUiVv0Yi2z9iVVIJgVrO3849UldpXqKRydhOP/FMAWyy/GORsR3tYXvJZwgL X-Received: by 2002:a17:906:604e:: with SMTP id p14mr21104517ejj.257.1574413940294; Fri, 22 Nov 2019 01:12:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574413940; cv=none; d=google.com; s=arc-20160816; b=N2lCAPVEo2ZroljugFgaeYilUOkvzr/thBlcYLqv71oT3cWIpRNsB4y9xOPM9OS+IH zJ2bMbEL3ls8JoCPt99Ss8HQT0mS/44o7f+BB9Wxv+aK8D9d2V4dB/gapt/83Pi1GBIQ UZJxF7smiDqAh8UvBmtNCWPSnv2xI0m8Zb2yzm5Bj+hPic2EJQdQlLRfG3aIivUGwLMY WPfvuqPCWOnFUcyBsjV0ywCZTXZQV4ecDApy0ND6yTEYh3aeU14iXRpDoxvyXjDW6dpU QwuOYxzyxFnaXnP/H7LLEWd1PZD93798wYreqeflB3fC3pPPB/oM6RHNLiUTynNHZBQ7 LqCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject; bh=5C7woaQOi0u0mCu5Z2w3QHB6TnoRfwrJDsBHOeVKo8k=; b=E8ugLZpPqssXyFwL/no3d5hg77H1oqyrgolYBnQNpsfftsogAKo79n2xVK040WXgdM Qsd4G1UPNjdwHWOGNLQ7uSaPWQHeZU0it2eO/CeGC+S2tVsphBbZzNeGIFyc8+i0odx/ QPsG7DkIES6C5K+5E/moKSDXRwVZot5xlGV+sO0FGyuQFfv0nVWOVTj4bQr1XUelIJj3 kTbTAkwdQruCjAo6EI38q4x9/thMQ4IQChNGthh081hCvihIrn3iSqS1WLGAYCQr4fJQ tq2wPFeQIUfVR8d07GDZ9vrG2TTk+/FLdSXA740XGoq7hfPNR8oSZhy3GKqNtwUl5yad i8tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si4318069eds.63.2019.11.22.01.11.55; Fri, 22 Nov 2019 01:12:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbfKVJLi (ORCPT + 99 others); Fri, 22 Nov 2019 04:11:38 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:28582 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbfKVJLi (ORCPT ); Fri, 22 Nov 2019 04:11:38 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAM96dbE145852 for ; Fri, 22 Nov 2019 04:11:37 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wdqn0ggcb-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Nov 2019 04:11:36 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Nov 2019 09:11:34 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 22 Nov 2019 09:11:31 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAM9BUMC50004060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Nov 2019 09:11:30 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E4AA4204B; Fri, 22 Nov 2019 09:11:30 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 14D3042042; Fri, 22 Nov 2019 09:11:30 +0000 (GMT) Received: from funtu.home (unknown [9.145.67.101]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 22 Nov 2019 09:11:29 +0000 (GMT) Subject: Re: [PATCH 3/3] crypto/testmgr: add selftests for paes-s390 To: Herbert Xu Cc: linux-crypto@vger.kernel.org, ebiggers@kernel.org, heiko.carstens@de.ibm.com, gor@linux.ibm.com References: <20191113105523.8007-1-freude@linux.ibm.com> <20191113105523.8007-4-freude@linux.ibm.com> <20191122081611.vznhvhouim6hnehc@gondor.apana.org.au> From: Harald Freudenberger Date: Fri, 22 Nov 2019 10:11:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191122081611.vznhvhouim6hnehc@gondor.apana.org.au> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 19112209-0012-0000-0000-0000036AB001 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19112209-0013-0000-0000-000021A64777 Message-Id: <88154ccf-84e8-17d1-1917-b8deeff20311@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-22_01:2019-11-21,2019-11-22 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 clxscore=1015 suspectscore=0 malwarescore=0 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911220081 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 22.11.19 09:16, Herbert Xu wrote: > On Wed, Nov 13, 2019 at 11:55:23AM +0100, Harald Freudenberger wrote: >> This patch adds selftests for the s390 specific protected key >> AES (PAES) cipher implementations: >> * cbc-paes-s390 >> * ctr-paes-s390 >> * ecb-paes-s390 >> * xts-paes-s390 >> PAES is an AES cipher but with encrypted ('protected') key >> material. So here come ordinary AES enciphered data values >> but with a special key format understood by the PAES >> implementation. >> >> The testdata definitons and testlist entries are surrounded >> by #if IS_ENABLED(CONFIG_CRYPTO_PAES_S390) because they don't >> make any sense on non s390 platforms or without the PAES >> cipher implementation. >> >> Signed-off-by: Harald Freudenberger >> --- >> crypto/testmgr.c | 36 +++++ >> crypto/testmgr.h | 334 +++++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 370 insertions(+) > So with your cleartext work, I gather that you can now supply > arbitrary keys to paes? If so my preferred method of testing it > would be to add a paes-specific tester function that massaged the > existing aes vectors into the format required by paes so you > get exactly the same testing coverage as plain aes. > > Is this possible? > > Thanks, Thanks for your feedback. I thought about this too. But it would require to implement own versions of alg_test_skcipher() and test_skcipher() and test_skcipher_vs_generic_impl() and that's a lot of complicated code unique for paes within testmgr.c I'd like to avoid.