Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp607205yba; Wed, 15 May 2019 07:01:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2WmDXtPURsMdR/BybQ/XtGBOxI+HRGvLJgoHdrjwIOhQ12NLFNhXxd3hfRepw2GoMfaFU X-Received: by 2002:a17:902:a01:: with SMTP id 1mr43613937plo.36.1557928889537; Wed, 15 May 2019 07:01:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557928889; cv=none; d=google.com; s=arc-20160816; b=HwpwnXoaQ3CYiT9z1OW8MHCNNhJK7dYpgZ6GxLPlBQStHSE+kgfpWd1sT2ULOel6jJ TAky32Ur64s4EPMl9zPijJGB7D9BoI6HVg1vHGgLGP/vtnpQXWYPrWpe5qoiqsUqY0sw 55zrYskjLBbr4LvHLmGOIlunqBQB0gTua6Q/2UYCqL6oSmcdHZqo2ovtw6CBTSQD1L+O Xu4io8jfm/hDA1thGJXgKId30NMvOj8373s1qJVvF9nf9C8bLw5oVWbZJYXqYxthx2yb f37xOL6A7dFh0txjqCiQqXvr4Ck6E1M9E7KuidEA9/BdzJw8Ehot4x5slMMXTESaEpOV fMzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=aJh/8vQoHaVocWkVoibMP2JxnCvIFr4nQtQKT8JoNMs=; b=KsjlykWxkKR1gmXxRMqPj2kn77kltg3kmVT7xSG24xsU8y5IGHjTPPb20o0dATM+OY lQQBYXJEnQ8CrMBcwgkNZFcMGjxoVIE5EB6fAmTSpttQhiBW4lpjBzc58FTbXpLikAhy 1O23UaogVop87/7bmPx0zKmRv8awc2EqDsbxLpKofMoIE7LVjy+emZj6gS38HWt6bFwr OM44dmTwbybKPYtlwmXBaD5RuT2at1m2hbZ6rE8okL8rLihyjeQXP8Ntx1UA1XrVDhdm ZnfxmRoejg9BAe4qkHtMiGd0PtewUWkPyI/ziFNqG/SFy+sCk6K2IAWwzp/DfifrnSaB VT3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=dy6XE5ef; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si1899263pgn.177.2019.05.15.07.01.08; Wed, 15 May 2019 07:01:29 -0700 (PDT) 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; dkim=pass header.i=@nxp.com header.s=selector2 header.b=dy6XE5ef; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726902AbfEOOAm (ORCPT + 99 others); Wed, 15 May 2019 10:00:42 -0400 Received: from mail-eopbgr10051.outbound.protection.outlook.com ([40.107.1.51]:23205 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726834AbfEOOAm (ORCPT ); Wed, 15 May 2019 10:00:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aJh/8vQoHaVocWkVoibMP2JxnCvIFr4nQtQKT8JoNMs=; b=dy6XE5ef7GQNuMSDMsmKhRnsGOtk431QfTHJKGibw27HWkKFYXO3IFlcgrHSZejKlPtxl3BT3oWV/VZUl44gYLMak5b2WCVroF0tbPmcIGdYHwOSpdd1ZWxpJ9y9pcowyA1Cxv/Y4mg6kM8iBsjnGt84tVt3h+HkWA/tu+mMTC0= Received: from VI1PR04MB4445.eurprd04.prod.outlook.com (20.177.55.161) by VI1PR04MB5262.eurprd04.prod.outlook.com (20.177.51.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1900.16; Wed, 15 May 2019 14:00:38 +0000 Received: from VI1PR04MB4445.eurprd04.prod.outlook.com ([fe80::39fd:f3c3:46fc:f872]) by VI1PR04MB4445.eurprd04.prod.outlook.com ([fe80::39fd:f3c3:46fc:f872%7]) with mapi id 15.20.1900.010; Wed, 15 May 2019 14:00:38 +0000 From: Iuliana Prodan To: Horia Geanta , Herbert Xu , Aymen Sghaier CC: "David S. Miller" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH v2 2/2] crypto: caam - strip input without changing crypto request Thread-Topic: [PATCH v2 2/2] crypto: caam - strip input without changing crypto request Thread-Index: AQHVCxD1rkBi6ZHI30+wWLoL2LqnOQ== Date: Wed, 15 May 2019 14:00:38 +0000 Message-ID: References: <1557919546-360-1-git-send-email-iuliana.prodan@nxp.com> <1557919546-360-2-git-send-email-iuliana.prodan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=iuliana.prodan@nxp.com; x-originating-ip: [212.146.100.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 91d19de9-c57e-46c2-54cb-08d6d93db5f0 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:VI1PR04MB5262; x-ms-traffictypediagnostic: VI1PR04MB5262: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:983; x-forefront-prvs: 0038DE95A2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(366004)(376002)(39860400002)(136003)(396003)(199004)(189003)(76176011)(446003)(486006)(6116002)(3846002)(4744005)(8676002)(9686003)(44832011)(5660300002)(2906002)(25786009)(55016002)(71190400001)(6506007)(53546011)(52536014)(71200400001)(110136005)(86362001)(14444005)(256004)(99286004)(476003)(7696005)(8936002)(54906003)(66066001)(186003)(4326008)(6246003)(478600001)(68736007)(102836004)(73956011)(26005)(64756008)(66556008)(66476007)(33656002)(66946007)(76116006)(305945005)(66446008)(7736002)(74316002)(53936002)(14454004)(81166006)(81156014)(316002)(6436002)(6636002)(229853002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB5262;H:VI1PR04MB4445.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 4rxnZ+dDmFVS1FbWt3LkuXe5otmZylj1D4uiVshgxqdwBo31JgVE/liJwPOHeLpXXVz1SlWsfOCCqJjAfL3M91S/LPnj9lx/VRdc6CHyoKSWilI7H8rvtMDSKq5H2T7NVYkDEbtiqKkTrd1kDMWRwRiYt8k2bvqmWaG0lFDupQoUj+Wrp02oQRVAgCU3Qe6rRBlY8Jm3Aqcw3J61TYqCkY0JUX/RLp2LvYkTyZk+c6hi9CyGzNHGJF3Dk0Sr/zVjhej92NldQx5vhZf9UKfSNuL8PodkiAXl7XdqeHIZXBW/oXM9lYyGGPT+E5bEVC8zSINnaCj/k7H80wH4/k7vPwqbpJYMTiKpv+qvQFyhagKSaIsoT453BnEOUcwS54xHeZno4r7ZGbp1++9wmwpAKclk3N6dMpzI5gpQt+PKCkk= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91d19de9-c57e-46c2-54cb-08d6d93db5f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2019 14:00:38.7213 (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-Transport-CrossTenantHeadersStamped: VI1PR04MB5262 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 5/15/2019 3:59 PM, Horia Geanta wrote:=0A= > On 5/15/2019 2:25 PM, Iuliana Prodan wrote:=0A= >> For rsa/pkcs1pad(rsa-caam, sha256), CAAM expects an input of modulus siz= e.=0A= > Only for sha256?=0A= No, is not just sha256. Is a combination of rsa-caam and a hash =0A= algorithm. I'll send a new version to fix the commit message.=0A= > =0A= >> For this we strip the leading zeros in case the size is more than modulu= s.=0A= >> This commit avoids modifying the crypto request while striping zeros fro= m=0A= > ^^^ stripping=0A= > =0A= > Horia=0A= > =0A= =0A=