From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A795A0093; Thu, 11 Jun 2020 17:06:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E2822A5D; Thu, 11 Jun 2020 17:06:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id D61F61B19 for ; Thu, 11 Jun 2020 17:06:40 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05BF5KFr029281; Thu, 11 Jun 2020 08:06:40 -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=Z4Wt+az4Sy4lYUvsUzAVhM4eEPcIspwR5M6HhXeyBs0=; b=D7w28mHsKFqvxzhjqYcLlYpfNstQ81S1aWGI1KPWDFVc5gf4dD3KZZiWoNE0acCAq+Wg PNPNJyJMw/HI3a5/Oo59V+CgOr/qGqdJ+P2JaPNAwRdj/ojzhMaHfF61KC9zZo250O9V C+IXdgfD8YvW4Z5LSw0Vbuqk3mab4lnznvuPp8UEyaqgiHr0Oto9Pe8umzl9IcDqW7N5 KVZhbzdq35xm1InPzaQJ1e8tE7DGSRJ41BebjehpuRkUwuC1XfVUNitSOhZR+ZwWN7kr vfsM1FHiubthcIlTDlYyKe/jCAsAZZi4cWOvvmGLNFfASWTMUpa0DYu9S3tSo0PCVpmG Cw== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 31j77dt8vv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 11 Jun 2020 08:06:37 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 11 Jun 2020 08:06:36 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 11 Jun 2020 08:06:36 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.172) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Thu, 11 Jun 2020 08:06:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Va7gYvfPmtsGsNnx9DGWDYdi9wZlUTU9Exi8dxsSA3FbgxiV18epNW0pJZxadhiv2zgQhhbHkz24O3+KAZliyLgSz7/QzJhgTrmWx/wBhU1A3L8RtyYdhDKKV3UAJoKzxvAdfOJ/uKqvNlAmg6zfCupJrjzQ3uEDr7zfjpV2Ud9rTqvqGqX8dnbFEcwKHy/yg24NdM2f1zI2/oYYuigKgZJmnE2A7HflFxgmnvuvcRTNCBnykNWLGGHbvjnpturFxIWAg9y6cfG9Tlh/6DaerUuvYSBAgoYrG6Ws732NA9uYNaMEyVc/dqag7J2qVaohCaJO1EKB3+TSbmvdynnqIg== 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=Z4Wt+az4Sy4lYUvsUzAVhM4eEPcIspwR5M6HhXeyBs0=; b=n2Kk37OwBZw9VJoLlEIGNLmIM0FqlBu2DbyliYRUe+80/2V+f/WZXawdHfsZWWgHi3+QP7UjczdMipu8Ej2EMh7+JharQKboxTHrYZiFYZXX3rboQ7fS0izazcZrmb/FC5oUxVRxPY6Rl0Utug9t+7qgqwl71LFOR+2h9NDe7O27vNEAAqTUzUGTXBplZKcG59zm3eRJ6iEqAS/IXNcNL8/naKsVeKkoBY943HyvmmjKwlAyrpy1nCq5oT4dEkglCb5QbNhaxd5VTxozkVhavkyfGJHS3CVqZoIhzf3qT+6yBcRIdk1+tz8TCSSLGi9psub+3W56wIgULxva7343uA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z4Wt+az4Sy4lYUvsUzAVhM4eEPcIspwR5M6HhXeyBs0=; b=M9XC+bn8J05Fk939j1i2PN912VjmEMEjXydr0EGYSituvquOkZ1iGZLxH+U2YyXJz8SbZ8QDyai53VxwIpFHF/wUDj4zXYMwHVGOegJY/ErEHr/XQXx0UZzqQ8a4qncL7ErWqTQxREb4naNlRcmreqNw8gxrjyrxoXSUv39ti4Y= Received: from MN2PR18MB2877.namprd18.prod.outlook.com (2603:10b6:208:3b::26) by MN2PR18MB2622.namprd18.prod.outlook.com (2603:10b6:208:10a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18; Thu, 11 Jun 2020 15:06:35 +0000 Received: from MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::15a6:7cce:c7ce:b74f]) by MN2PR18MB2877.namprd18.prod.outlook.com ([fe80::15a6:7cce:c7ce:b74f%7]) with mapi id 15.20.3088.021; Thu, 11 Jun 2020 15:06:34 +0000 From: Anoob Joseph To: Arek Kusztal , "dev@dpdk.org" CC: "akhil.goyal@nxp.com" , "fiona.trahe@intel.com" Thread-Topic: [dpdk-dev] [PATCH v4 2/2] test/cryptodev: add chacha poly test cases to cryptodev Thread-Index: AQHWP1v1o7R9GlFCIEee92aGVwOSkKjThBMA Date: Thu, 11 Jun 2020 15:06:34 +0000 Message-ID: References: <20200610191813.13660-1-arkadiuszx.kusztal@intel.com> <20200610191813.13660-2-arkadiuszx.kusztal@intel.com> In-Reply-To: <20200610191813.13660-2-arkadiuszx.kusztal@intel.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [27.34.244.79] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 151aebaa-660f-4f2d-f8a4-08d80e190852 x-ms-traffictypediagnostic: MN2PR18MB2622: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2803; x-forefront-prvs: 0431F981D8 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UbSHHXIJ3yh48Xuwk2lqsSMdtRNLvK04HgJM04+YT25HpdmaavzLil7EGr42NfjIa2dULDKdfha5JcI9DIN/Vl1hvkZmXXTM1nVRPBqGHqNayJCqlEkotPpGHOwYG36aw9j5uofYedJOKjCcpJiy6TTFcejd2IbVTY77TWJra8GVDGHn+i9I71fHDNtTrkAeb7fzOCE5xD0f6zOzoS90xvbUhUxKfD6zSay8zSrrJcOJ9CgNSZaKbK5srAsLjoGjycS/fFCALNWc97EMeCI3iDcwpsYLfOo9DJbucvB5JvevFJqWrMLxnMRNwQL9z6QaPgbcJ3Azwz5zmRbwjcJvkQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR18MB2877.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(396003)(39860400002)(376002)(136003)(346002)(7696005)(55016002)(186003)(316002)(54906003)(4326008)(2906002)(8936002)(110136005)(478600001)(9686003)(66556008)(26005)(66476007)(66946007)(83380400001)(5660300002)(6506007)(53546011)(86362001)(71200400001)(66446008)(76116006)(33656002)(52536014)(64756008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: vCpWhBUlCwV0nUyCINCB89xnWSoKxZr48k1HMcPBTX3ZllyL/tzonnxsh6w5L7AIpwgY9W0Kq3X1TIiCkIp6DiTh5OuBthkP9bm1ojXMsHUF7Doh1DmobjceVoVSBtyjOwJHnpIM+dFFq1mnm8dQXPGHJs2kuuPfwrYHD+T/OWy5NZpv0WWIhC4a1yGjL1ZL5OwIBffLVoXrx29YpXa92CHfgn1VyNQZ1sR+F8xb3ybgCaVeFl00oomPnrMgrmZO8/n1SYiajrrIXwyRRZKZyg32+H3NALRF4lY7kcay2XR32l3Pt0X6hmw+SCM59dJGEVIcVk4c0UtITpVtNdRpoUiuEM4N0JRXt4xzvFM/Itt3/3MRi5EBl2iBjJ4I/0QifW1lK7OwWudXTXNVdex3jKqvWB/ox/MZ60gdqOkCTMn9RR9HNgI0t9tJnYtHRGNRnJ8gpmrFuWSdhSKledQC9k0B08ozwL4kGxGNXoc+UY0= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 151aebaa-660f-4f2d-f8a4-08d80e190852 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jun 2020 15:06:34.8262 (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-CrossTenant-userprincipalname: UdfqyhqX38pYD648mW0Qi3/L1kmv/iq3gMPfL8G4hxo8SwMH4w95d/mgqNCtbN2K2DWsb5ahkS9wha72CWACtw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB2622 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-11_15:2020-06-11, 2020-06-11 signatures=0 Subject: Re: [dpdk-dev] [PATCH v4 2/2] test/cryptodev: add chacha poly test cases to cryptodev 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" Minor nit inline. Acked-by: Anoob Joseph > -----Original Message----- > From: dev On Behalf Of Arek Kusztal > Sent: Thursday, June 11, 2020 12:48 AM > To: dev@dpdk.org > Cc: akhil.goyal@nxp.com; fiona.trahe@intel.com; Arek Kusztal > > Subject: [dpdk-dev] [PATCH v4 2/2] test/cryptodev: add chacha poly test > cases to cryptodev >=20 > This patch adds Chacha20-Poly1305 implementation to cryptodev tests. >=20 > Signed-off-by: Arek Kusztal > --- > v4: > - resent in 20.08 DPDK window >=20 > app/test/test_cryptodev.c | 18 ++++++- > app/test/test_cryptodev_aead_test_vectors.h | 75 > +++++++++++++++++++++++++++++ > 2 files changed, 92 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index > 8f63146..2f94ab1 100644 > --- a/app/test/test_cryptodev.c > +++ b/app/test/test_cryptodev.c > @@ -11502,6 +11502,18 @@ > auth_decrypt_AES128CBC_HMAC_SHA1_esn_check(void) > &aes128cbc_hmac_sha1_aad_test_vector); > } >=20 > +static int > +test_chacha20_poly1305_encrypt_test_case_rfc8439(void) > +{ > + return > test_authenticated_encryption(&chacha20_poly1305_case_rfc8439); > +} > + > +static int > +test_chacha20_poly1305_decrypt_test_case_rfc8439(void) > +{ > + return > test_authenticated_decryption(&chacha20_poly1305_case_rfc8439); > +} > + > #ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER >=20 > /* global AESNI slave IDs for the scheduler test */ @@ -11956,7 +11968,1= 1 > @@ static struct unit_test_suite cryptodev_testsuite =3D { > test_AES_GMAC_authentication_test_case_4), > TEST_CASE_ST(ut_setup, ut_teardown, >=20 > test_AES_GMAC_authentication_verify_test_case_4), > - > + /** Chacha20-Poly1305 */ > + TEST_CASE_ST(ut_setup, ut_teardown, > + > test_chacha20_poly1305_encrypt_test_case_rfc8439), > + TEST_CASE_ST(ut_setup, ut_teardown, > + [Anoob] Might be better to keep a blank line between individual test blocks= . Can keep the existing blank line (which got removed in this patch) and ad= d a new one after. =20 > test_chacha20_poly1305_decrypt_test_case_rfc8439), > /** SNOW 3G encrypt only (UEA2) */ > TEST_CASE_ST(ut_setup, ut_teardown, > test_snow3g_encryption_test_case_1), > diff --git a/app/test/test_cryptodev_aead_test_vectors.h > b/app/test/test_cryptodev_aead_test_vectors.h > index e62fdb2..140f253 100644 > --- a/app/test/test_cryptodev_aead_test_vectors.h > +++ b/app/test/test_cryptodev_aead_test_vectors.h > @@ -3823,4 +3823,79 @@ static const struct aead_test_data > ccm_test_case_256_3 =3D { > .len =3D 8 > } > }; > +static uint8_t chacha_aad_rfc8439[] =3D { > + 0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3, > + 0xc4, 0xc5, 0xc6, 0xc7 > +}; > + > +static const struct aead_test_data chacha20_poly1305_case_rfc8439 =3D { > + .algo =3D RTE_CRYPTO_AEAD_CHACHA20_POLY1305, > + .key =3D { > + .data =3D { > + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, > + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, > + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, > + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f > + }, > + .len =3D 32 > + }, > + .iv =3D { > + .data =3D { > + 0x07, 0x00, 0x00, 0x00, 0x40, 0x41, 0x42, 0x43, > + 0x44, 0x45, 0x46, 0x47 > + }, > + .len =3D 12 > + }, > + .aad =3D { > + .data =3D chacha_aad_rfc8439, > + .len =3D 12 > + }, > + .plaintext =3D { > + .data =3D { > + 0x4c, 0x61, 0x64, 0x69, 0x65, 0x73, 0x20, 0x61, > + 0x6e, 0x64, 0x20, 0x47, 0x65, 0x6e, 0x74, 0x6c, > + 0x65, 0x6d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20, > + 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x73, > + 0x73, 0x20, 0x6f, 0x66, 0x20, 0x27, 0x39, 0x39, > + 0x3a, 0x20, 0x49, 0x66, 0x20, 0x49, 0x20, 0x63, > + 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x66, > + 0x65, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f, > + 0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20, > + 0x74, 0x69, 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20, > + 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x74, 0x75, > + 0x72, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x6e, 0x73, > + 0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x77, 0x6f, > + 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, > + 0x74, 0x2e > + }, > + .len =3D 114 > + }, > + .ciphertext =3D { > + .data =3D { > + 0xd3, 0x1a, 0x8d, 0x34, 0x64, 0x8e, 0x60, 0xdb, > + 0x7b, 0x86, 0xaf, 0xbc, 0x53, 0xef, 0x7e, 0xc2, > + 0xa4, 0xad, 0xed, 0x51, 0x29, 0x6e, 0x08, 0xfe, > + 0xa9, 0xe2, 0xb5, 0xa7, 0x36, 0xee, 0x62, 0xd6, > + 0x3d, 0xbe, 0xa4, 0x5e, 0x8c, 0xa9, 0x67, 0x12, > + 0x82, 0xfa, 0xfb, 0x69, 0xda, 0x92, 0x72, 0x8b, > + 0x1a, 0x71, 0xde, 0x0a, 0x9e, 0x06, 0x0b, 0x29, > + 0x05, 0xd6, 0xa5, 0xb6, 0x7e, 0xcd, 0x3b, 0x36, > + 0x92, 0xdd, 0xbd, 0x7f, 0x2d, 0x77, 0x8b, 0x8c, > + 0x98, 0x03, 0xae, 0xe3, 0x28, 0x09, 0x1b, 0x58, > + 0xfa, 0xb3, 0x24, 0xe4, 0xfa, 0xd6, 0x75, 0x94, > + 0x55, 0x85, 0x80, 0x8b, 0x48, 0x31, 0xd7, 0xbc, > + 0x3f, 0xf4, 0xde, 0xf0, 0x8e, 0x4b, 0x7a, 0x9d, > + 0xe5, 0x76, 0xd2, 0x65, 0x86, 0xce, 0xc6, 0x4b, > + 0x61, 0x16 > + }, > + .len =3D 114 > + }, > + .auth_tag =3D { > + .data =3D { > + 0x1a, 0xe1, 0x0b, 0x59, 0x4f, 0x09, 0xe2, 0x6a, > + 0x7e, 0x90, 0x2e, 0xcb, 0xd0, 0x60, 0x06, 0x91 > + }, > + .len =3D 16 > + } > +}; > #endif /* TEST_CRYPTODEV_AEAD_TEST_VECTORS_H_ */ > -- > 2.1.0