Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4047933pxk; Tue, 22 Sep 2020 09:04:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwouWQTgZJAHyEqB+SS9qgbhWxTRp0Xm2I7aElVBS3sMvUySOaESEFMXuzHJwVh8/hI7ai9 X-Received: by 2002:a05:600c:2246:: with SMTP id a6mr1876637wmm.38.1600790683537; Tue, 22 Sep 2020 09:04:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1600790683; cv=pass; d=google.com; s=arc-20160816; b=cd+8fFZBvJ8VJIJpzfn2Q494gDCH6gO2xoMuf3+xuWfmcm2PmwHEX59WqfCk6cdprx tBffruowSLJ6GcJO6lEaUtJqIdYP3r3pQSQ8ii2kkzsGTDOvtr7tGdi2Q989vrthQLzX i4a9Ag45b7iZCF3GSR4Nd5L9cUH9y3kLjzFWEGpCep1Y3isPyb3CH0Ciwf5JLMmfko16 BZVyl7JuEQKzakupu6PfHQ5y96QkcM8D8SAKApRK/q1CvxSaAtpvQR8h6HQWy2Q+wLno QENfrlg/EZSMigQEefWfirvjYJbcEDC3lKKSI0heW7zRNSZDNTO86jqwiGsRPE9H9Qhs X1JQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=Z5kYkQEHiasdXGOex/JhfBPIwqHf/hfNb8hO3jDT6uo=; b=GCgEDKheHDWYsxi8JPOHwbYAFYdjC1/bvwgf65QMoLPEgDiIRLEM8x/kfnYZxnHUH7 xOb0wmeiUVdMoYYvdjiBiPKNg+yqGBR4oeZzEdis4lrxleywGU4RjpJwuaclQeyUSaDu yvXKCPPPyLdlJyAin9FGHXJOn19RbTLB1NsU/GBQp3cU214D+fF7A31z8VM/b2uMzoRV LY67+QVF0roGA2zB7nGh6/7XXwbuPN+9cqRkZn8Wnt0m2+18HwsxGjFqrcu5LQBDqYoI PzB1KvUSFCn3JDLXjFJwQoHEqslzCNslovdqwh6THi1n3KSEAweOsHyR7NmSx7MLyL5R xaWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="fAzZZ/fe"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si10959122edq.177.2020.09.22.09.04.06; Tue, 22 Sep 2020 09:04:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="fAzZZ/fe"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726588AbgIVQEC (ORCPT + 99 others); Tue, 22 Sep 2020 12:04:02 -0400 Received: from mail-eopbgr60083.outbound.protection.outlook.com ([40.107.6.83]:40665 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726340AbgIVQEB (ORCPT ); Tue, 22 Sep 2020 12:04:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DOvDaxcoAyVJr87jZJ888u4zlYJbIfCXpwqTOWxgi1sRfK4HV/uJcZ7dDFYGwziQ62JyJ8J2V7J30UVOinHay7J+RnIs5pPtjwiqTnXOtYi5mxmB0FZ0zyZRRylgJWCMa1COxI53e754cZkkygl4hhLhe1pQrK9QTwJYxVrbbSubfxPoeO6CLzj2tEXJ82ZyjfFp/5gkv/qYxpOlIgIsyGJh1lp+/nVynCX5mJVxXTOK4ABB5wwMJv9sSrev41y+rWjveuC5q7e1c+qMgY+WKr04Aqpa8oWUe3RSUnD8rInWrJvN666nq1T8Q8n3Eru55/o8kYeHV02ZRMdsWdmckQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z5kYkQEHiasdXGOex/JhfBPIwqHf/hfNb8hO3jDT6uo=; b=nh3rqGG7GoWQCLZNUy5DciDrtGlIyI2pWlO8O+QEkrS3Pt7ZAbpOqq/+6UoX4kSB77g6J4+/+PU2JkTGyE1WkP73BgZ8vavURWX3rszs9dwCJH2+tJiP1yrFQwTrZPDJ7MsqBpBUU8yPtz4aYrqCa2Imt6e2G0xSEdp/3KEeX2d1NEp81G8Esj7O9Z1tR7V7piYVMK5+e7ZCB5lPNNLNCvpystI4Xyl223552aZEHW27LPx2lNZ1jBI/CVqtVkgFbtTFNs2vP081rEPJ3i4omvUPQUE10/fi/+elvpAGHOIwSbzRTipCSyOCT7JEI9+E3SQ+XhtRH4GczuUuy79lFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z5kYkQEHiasdXGOex/JhfBPIwqHf/hfNb8hO3jDT6uo=; b=fAzZZ/fegqWp6Ug15I0LQX21ra2usSBx411uDbQAN5OMvkkoo6BitFSgqw4T4GwRFo55EjYWh5YddhueJ1ghchBFwCKRWmSMmIaetTjkU0IA3mjgMvwQroJyoofCbaWRCZCJE3UoOBAJTKaBR/VuneJ5BCtVcVNfprXJEelFEWo= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=oss.nxp.com; Received: from VE1PR04MB6608.eurprd04.prod.outlook.com (2603:10a6:803:125::12) by VI1PR04MB7072.eurprd04.prod.outlook.com (2603:10a6:800:12c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Tue, 22 Sep 2020 16:03:58 +0000 Received: from VE1PR04MB6608.eurprd04.prod.outlook.com ([fe80::34b6:beed:6762:a67c]) by VE1PR04MB6608.eurprd04.prod.outlook.com ([fe80::34b6:beed:6762:a67c%7]) with mapi id 15.20.3391.027; Tue, 22 Sep 2020 16:03:58 +0000 From: Andrei Botila To: Horia Geanta , Aymen Sghaier , Herbert Xu , "David S. Miller" Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 00/10] crypto: caam - xts(aes) updates Date: Tue, 22 Sep 2020 19:03:18 +0300 Message-Id: <20200922160328.28926-1-andrei.botila@oss.nxp.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: AM4PR0302CA0022.eurprd03.prod.outlook.com (2603:10a6:205:2::35) To VE1PR04MB6608.eurprd04.prod.outlook.com (2603:10a6:803:125::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv15007.swis.ro-buh01.nxp.com (83.217.231.2) by AM4PR0302CA0022.eurprd03.prod.outlook.com (2603:10a6:205:2::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.13 via Frontend Transport; Tue, 22 Sep 2020 16:03:57 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.217.231.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d1e8e75b-eb02-4eba-201e-08d85f111d52 X-MS-TrafficTypeDiagnostic: VI1PR04MB7072: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: me6qmSQnWrPh4tURFvUauV3J0g9In0ihebckPUbiT1ax1j90pPOB4nMxLfrCt67HREyRZijKN1sXdI9Nase+IsT5RMzZs7WpwLzKGrPnCfr7seL6w6lyRc33ieub0hWfE//0qwiWu4oCpcCZWE2PuSqjdt8grkuq6sFl1kazDwHuYskHZ8TQxZqnv0HZIKsNMr/v437IXCDFRyeW6dsox3jG1z/TOjL4ihi9MSCGOaND5mUKGirHQdjP32hfKHi6R2SxXk6rcnEt3BfVlQ+7UBUAknvOYpRKV3fzgQGyBH20MQuPulJlCgY3z9sB6dds X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6608.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(376002)(366004)(346002)(39860400002)(136003)(1076003)(4326008)(2616005)(6512007)(83380400001)(186003)(16526019)(2906002)(956004)(5660300002)(66556008)(66476007)(8936002)(316002)(6506007)(44832011)(66946007)(52116002)(6486002)(478600001)(110136005)(8676002)(26005)(86362001)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: atf3fLT9lYMl6qkD1JKqmXIID8IHXzTPtvrvORpM3vsxbXUFNx+qx+e+S1W3DmuLkY/lMyl+6ts0e/+rcBk+Jjp5B0Li9jRkQ+FH9ggFyNTj7hapWUnm6YVyc7JxNgVEAURMfj5iGUGwL9PPQJTz6SDdppCbVvf131LYxZ74wLNhqxtE9xd23sjYb0pXp0f9fut6yuX7wJy9QdXxs9PPDwmp4+kvDj42SoLXi2BkuxBJ6yuSByqJABa/N6S0N9dfRJDz+8/KX0Dx4mqped7YCBH7wB9MKWEPVblkPCCXYg21c2xKjT2LM8AF6/2UgIkxKhyjY2gBGBrIV6hbTs1cde61JBsaWUuyEEiEAxNZ0fzsdzMxQ3feG/zPctnn2w8keub7nH96LR2Hx3dqtVXRcion1wQ1kXNzWNPz4RIJ9uQIYga536X+POIoIF1cJgipyuat91f+qNl+9J34O6n+UFhhZYXmb9meqabEi6AY4LSyzGAJp6djsvEaRs9YktR5ubELbAZlt2coZWpbgVu28sD12tdLf+LunmuwWsm4pfSgdOeZkgdR7Nx6JGW2dGy0G/RlB7V2YlWwZMOrDTG84TD2BkbQTsTOTkx/ZwPkM8S4wY3arq4Xm10Ibgi59mCsmomCARhjj5WZtvBWmXGHhQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1e8e75b-eb02-4eba-201e-08d85f111d52 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6608.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2020 16:03:58.7447 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nCNp1E/axKOWG8h1kIoUe9t0YEuaOPnGPp8nwNurw6/kL4tFAWFWfc1kJP3TZF+YxGTOXZ8/JVIOhiB+9oH53Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7072 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Andrei Botila This patch series fixes some problems in CAAM's implementation of xts(aes): - CAAM until Era 9 can't process XTS with 16B IV - CAAM can only process in hardware XTS key lengths of 16B and 32B - These hardware limitations are resolved through a fallback - CAAM used to return 0 for XTS block length equal to zero This patch series also adds a new feature in CAAM's xts(aes): - CAAM is now able to process XTS with 16B IV in HW Changes since v2: - modified xts_skcipher_ivsize() based on comments - squashed the previous 7-9/12 commits Changes since v1: - use only get_unaligned() for calculating XTS IV size - fixed the double calling of crypto_skcipher_set_reqsize() in case of XTS - added a patch which modifies the return value for XTS when block length is equal to zero Andrei Botila (10): crypto: caam/jr - add fallback for XTS with more than 8B IV crypto: caam/qi - add fallback for XTS with more than 8B IV crypto: caam/qi2 - add fallback for XTS with more than 8B IV crypto: caam/jr - add support for more XTS key lengths crypto: caam/qi - add support for more XTS key lengths crypto: caam/qi2 - add support for more XTS key lengths crypto: caam - add xts check for block length equal to zero crypto: caam/jr - add support for XTS with 16B IV crypto: caam/qi - add support for XTS with 16B IV crypto: caam/qi2 - add support for XTS with 16B IV drivers/crypto/caam/Kconfig | 3 + drivers/crypto/caam/caamalg.c | 94 +++++++++++++++++++++--- drivers/crypto/caam/caamalg_desc.c | 27 ++++--- drivers/crypto/caam/caamalg_qi.c | 94 +++++++++++++++++++++--- drivers/crypto/caam/caamalg_qi2.c | 111 ++++++++++++++++++++++++++--- drivers/crypto/caam/caamalg_qi2.h | 2 + 6 files changed, 293 insertions(+), 38 deletions(-) -- 2.17.1