From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 57C434C88 for ; Thu, 28 Mar 2019 11:28:37 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2SAPxDx030181; Thu, 28 Mar 2019 03:28:35 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=PhAm0jjwRxINtSxrF5nkp5qQ6IA/DcrvHJ826lOd/2g=; b=iNU8FMePrabkIx9Y9YEqCx++nn38OK6hCRRdwTaz/a4ZXivPbeJsVx0uKG7SVQXMED5B iqZhQA/DtiBkLM7QYNnu2pKBqr/bGEFBT+CF+UK4KHSzg6WcIT+kas5kcc/T8la1Jue2 71ZP7IAWRlXtnSG5BMS0DysIAmqoh9+2Jr79xa1w+eK4iZwyQ+SpyaJ3Gby7QgXPRRkE +t2cR79TW0+704fL94AAOaUcGk3/R0hsFOLwcfuMWjycILE1qRhwi4obmX6zz7TXyMOC ZSbutkjRHjTXj8gkmS7cCD8b8GxFvbFsS0G6jP9ddw4+PqsqXETVKB9YC6ZEaMzlB/mF ZQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2rgfn5a7bx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Mar 2019 03:28:34 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 28 Mar 2019 03:28:23 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.55) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 28 Mar 2019 03:28:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PhAm0jjwRxINtSxrF5nkp5qQ6IA/DcrvHJ826lOd/2g=; b=eSCV0/DyAZockZLvcMndPLVgmAxWJ/F46GayAa4jiOza/g2x12L7BeOXrq951gmke9L9lOuh1QFIZYIQHs/BCy+MoWJzXqPCJa5X/JVrx19SQpq7sOImtWU22vK3fb3ptzSuC6b/SV+mWYHgt+JYXE+tEiaOXJksu+F5MiAE6KM= Received: from MN2PR18MB2542.namprd18.prod.outlook.com (20.179.82.221) by MN2PR18MB2733.namprd18.prod.outlook.com (20.179.21.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.15; Thu, 28 Mar 2019 10:28:22 +0000 Received: from MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::ecb7:6a6e:f852:3d90]) by MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::ecb7:6a6e:f852:3d90%6]) with mapi id 15.20.1750.014; Thu, 28 Mar 2019 10:28:22 +0000 From: Ayuj Verma To: "akhil.goyal@nxp.com" CC: "arkadiuszx.kusztal@intel.com" , "Shally Verma" , Sunila Sahu , "Kanaka Durga Kotamarthy" , Arvind Desai , "dev@dpdk.org" , Ayuj Verma Thread-Topic: [PATCH v3 1/4] lib/cryptodev: add rsa priv key feature flag Thread-Index: AQHU5VD4b0noG9w0+0aQ208Nc9mQ2Q== Date: Thu, 28 Mar 2019 10:28:22 +0000 Message-ID: <1553768834-19072-2-git-send-email-ayverma@marvell.com> References: <1553768834-19072-1-git-send-email-ayverma@marvell.com> In-Reply-To: <1553768834-19072-1-git-send-email-ayverma@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0150.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:68::20) To MN2PR18MB2542.namprd18.prod.outlook.com (2603:10b6:208:103::29) x-mailer: git-send-email 1.8.3.1 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [49.200.218.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e1dd0127-3856-4873-9ca0-08d6b3681a3f x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:MN2PR18MB2733; x-ms-traffictypediagnostic: MN2PR18MB2733: x-microsoft-antispam-prvs: x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(366004)(396003)(136003)(346002)(199004)(189003)(3846002)(6436002)(8676002)(81166006)(186003)(446003)(2616005)(476003)(105586002)(81156014)(106356001)(26005)(36756003)(107886003)(2501003)(486006)(11346002)(86362001)(8936002)(2351001)(7736002)(71190400001)(53936002)(50226002)(4326008)(102836004)(71200400001)(55236004)(386003)(6506007)(5640700003)(6916009)(97736004)(99286004)(25786009)(6512007)(305945005)(5660300002)(68736007)(4720700003)(478600001)(66066001)(316002)(256004)(6116002)(2906002)(6486002)(14444005)(76176011)(14454004)(54906003)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2733; H:MN2PR18MB2542.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qH3QmKpgQoJomRhopJNUZnqj3McSXIsvxpXXy4chYvOM/yNAsapJXop4H5HaoPkIElPiwnJsP/+Pptk0uRehFOwlqH1m3nzm2EOQx8vass+M47EyoRHzgU6xfDwIP77l+KhPT8nSMSCy/6KBDEMO+hM5UNcwjzTwMe5L4rWJFIHIW0Nq3AsvbFHjwqvCp94FYx6KTrfCtevCvvtJeJ1vfFVYqGvI4lT1tv5JtaXleBegl5KDBc9k0NW+XJktZbcgKEEeo8S9LcL2p1a4KUPnJ/uhN89y9MiTLMJs4/5+7belZUeAzn6F3ZZxjyzssFjsMd5PIjFR2QtV4RAHHu06PgoT+mmdMGSwBlsIwr8+tGNa0R8NGgERZ/h6lyby4QuiOtQODiUkMejxljiGW01iStIiYyEULyPe071mzO+7pYA= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e1dd0127-3856-4873-9ca0-08d6b3681a3f X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2019 10:28:22.2464 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2733 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-28_05:, , signatures=0 Subject: [dpdk-dev] [PATCH v3 1/4] lib/cryptodev: add rsa priv key feature flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Mar 2019 10:28:37 -0000 Add feature flag to reflect RSA private key operation support using quintuple (crt) or exponent type key. if PMD support both, then it should set both. App should query cryptodev feature flag to check if Sign and Decryt with CRT keys or exponent is supported, thus call operation with relevant key type. Signed-off-by: Ayuj Verma Signed-off-by: Shally Verma --- lib/librte_cryptodev/rte_cryptodev.c | 4 ++++ lib/librte_cryptodev/rte_cryptodev.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rt= e_cryptodev.c index 871d7dd..cdc586a 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -486,6 +486,10 @@ struct rte_cryptodev_sym_session_pool_private_data { return "CPU_ARM_CE"; case RTE_CRYPTODEV_FF_SECURITY: return "SECURITY_PROTOCOL"; + case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP: + return "RSA_PRIV_OP_KEY_EXP"; + case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT: + return "RSA_PRIV_OP_KEY_QT"; default: return NULL; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rt= e_cryptodev.h index a0bbcf9..298b352 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -438,6 +438,10 @@ struct rte_cryptodev_asym_capability_idx { /**< Utilises ARM CPU Cryptographic Extensions */ #define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16) /**< Support Security Protocol Processing */ +#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP (1ULL << 17) +/**< Support RSA Private Key OP with exponent */ +#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT (1ULL << 18) +/**< Support RSA Private Key OP with CRT (quintuple) Keys */ =20 =20 /** --=20 1.8.3.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 2D3A5A067F for ; Thu, 28 Mar 2019 11:28:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 80BC01B12D; Thu, 28 Mar 2019 11:28:40 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 57C434C88 for ; Thu, 28 Mar 2019 11:28:37 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2SAPxDx030181; Thu, 28 Mar 2019 03:28:35 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=PhAm0jjwRxINtSxrF5nkp5qQ6IA/DcrvHJ826lOd/2g=; b=iNU8FMePrabkIx9Y9YEqCx++nn38OK6hCRRdwTaz/a4ZXivPbeJsVx0uKG7SVQXMED5B iqZhQA/DtiBkLM7QYNnu2pKBqr/bGEFBT+CF+UK4KHSzg6WcIT+kas5kcc/T8la1Jue2 71ZP7IAWRlXtnSG5BMS0DysIAmqoh9+2Jr79xa1w+eK4iZwyQ+SpyaJ3Gby7QgXPRRkE +t2cR79TW0+704fL94AAOaUcGk3/R0hsFOLwcfuMWjycILE1qRhwi4obmX6zz7TXyMOC ZSbutkjRHjTXj8gkmS7cCD8b8GxFvbFsS0G6jP9ddw4+PqsqXETVKB9YC6ZEaMzlB/mF ZQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2rgfn5a7bx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 28 Mar 2019 03:28:34 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 28 Mar 2019 03:28:23 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.55) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 28 Mar 2019 03:28:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PhAm0jjwRxINtSxrF5nkp5qQ6IA/DcrvHJ826lOd/2g=; b=eSCV0/DyAZockZLvcMndPLVgmAxWJ/F46GayAa4jiOza/g2x12L7BeOXrq951gmke9L9lOuh1QFIZYIQHs/BCy+MoWJzXqPCJa5X/JVrx19SQpq7sOImtWU22vK3fb3ptzSuC6b/SV+mWYHgt+JYXE+tEiaOXJksu+F5MiAE6KM= Received: from MN2PR18MB2542.namprd18.prod.outlook.com (20.179.82.221) by MN2PR18MB2733.namprd18.prod.outlook.com (20.179.21.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.15; Thu, 28 Mar 2019 10:28:22 +0000 Received: from MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::ecb7:6a6e:f852:3d90]) by MN2PR18MB2542.namprd18.prod.outlook.com ([fe80::ecb7:6a6e:f852:3d90%6]) with mapi id 15.20.1750.014; Thu, 28 Mar 2019 10:28:22 +0000 From: Ayuj Verma To: "akhil.goyal@nxp.com" CC: "arkadiuszx.kusztal@intel.com" , "Shally Verma" , Sunila Sahu , "Kanaka Durga Kotamarthy" , Arvind Desai , "dev@dpdk.org" , Ayuj Verma Thread-Topic: [PATCH v3 1/4] lib/cryptodev: add rsa priv key feature flag Thread-Index: AQHU5VD4b0noG9w0+0aQ208Nc9mQ2Q== Date: Thu, 28 Mar 2019 10:28:22 +0000 Message-ID: <1553768834-19072-2-git-send-email-ayverma@marvell.com> References: <1553768834-19072-1-git-send-email-ayverma@marvell.com> In-Reply-To: <1553768834-19072-1-git-send-email-ayverma@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BM1PR01CA0150.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:68::20) To MN2PR18MB2542.namprd18.prod.outlook.com (2603:10b6:208:103::29) x-mailer: git-send-email 1.8.3.1 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [49.200.218.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e1dd0127-3856-4873-9ca0-08d6b3681a3f x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:MN2PR18MB2733; x-ms-traffictypediagnostic: MN2PR18MB2733: x-microsoft-antispam-prvs: x-forefront-prvs: 0990C54589 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(366004)(396003)(136003)(346002)(199004)(189003)(3846002)(6436002)(8676002)(81166006)(186003)(446003)(2616005)(476003)(105586002)(81156014)(106356001)(26005)(36756003)(107886003)(2501003)(486006)(11346002)(86362001)(8936002)(2351001)(7736002)(71190400001)(53936002)(50226002)(4326008)(102836004)(71200400001)(55236004)(386003)(6506007)(5640700003)(6916009)(97736004)(99286004)(25786009)(6512007)(305945005)(5660300002)(68736007)(4720700003)(478600001)(66066001)(316002)(256004)(6116002)(2906002)(6486002)(14444005)(76176011)(14454004)(54906003)(52116002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB2733; H:MN2PR18MB2542.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qH3QmKpgQoJomRhopJNUZnqj3McSXIsvxpXXy4chYvOM/yNAsapJXop4H5HaoPkIElPiwnJsP/+Pptk0uRehFOwlqH1m3nzm2EOQx8vass+M47EyoRHzgU6xfDwIP77l+KhPT8nSMSCy/6KBDEMO+hM5UNcwjzTwMe5L4rWJFIHIW0Nq3AsvbFHjwqvCp94FYx6KTrfCtevCvvtJeJ1vfFVYqGvI4lT1tv5JtaXleBegl5KDBc9k0NW+XJktZbcgKEEeo8S9LcL2p1a4KUPnJ/uhN89y9MiTLMJs4/5+7belZUeAzn6F3ZZxjyzssFjsMd5PIjFR2QtV4RAHHu06PgoT+mmdMGSwBlsIwr8+tGNa0R8NGgERZ/h6lyby4QuiOtQODiUkMejxljiGW01iStIiYyEULyPe071mzO+7pYA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: e1dd0127-3856-4873-9ca0-08d6b3681a3f X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2019 10:28:22.2464 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2733 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-28_05:, , signatures=0 Subject: [dpdk-dev] [PATCH v3 1/4] lib/cryptodev: add rsa priv key feature flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190328102822.MEvFyfeTm2vp6pQW9oRJ4daAY2H_L4q9TP-SVi5ICMc@z> Add feature flag to reflect RSA private key operation support using quintuple (crt) or exponent type key. if PMD support both, then it should set both. App should query cryptodev feature flag to check if Sign and Decryt with CRT keys or exponent is supported, thus call operation with relevant key type. Signed-off-by: Ayuj Verma Signed-off-by: Shally Verma --- lib/librte_cryptodev/rte_cryptodev.c | 4 ++++ lib/librte_cryptodev/rte_cryptodev.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rt= e_cryptodev.c index 871d7dd..cdc586a 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -486,6 +486,10 @@ struct rte_cryptodev_sym_session_pool_private_data { return "CPU_ARM_CE"; case RTE_CRYPTODEV_FF_SECURITY: return "SECURITY_PROTOCOL"; + case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP: + return "RSA_PRIV_OP_KEY_EXP"; + case RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT: + return "RSA_PRIV_OP_KEY_QT"; default: return NULL; } diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rt= e_cryptodev.h index a0bbcf9..298b352 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -438,6 +438,10 @@ struct rte_cryptodev_asym_capability_idx { /**< Utilises ARM CPU Cryptographic Extensions */ #define RTE_CRYPTODEV_FF_SECURITY (1ULL << 16) /**< Support Security Protocol Processing */ +#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_EXP (1ULL << 17) +/**< Support RSA Private Key OP with exponent */ +#define RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT (1ULL << 18) +/**< Support RSA Private Key OP with CRT (quintuple) Keys */ =20 =20 /** --=20 1.8.3.1