From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E33441C52 for ; Mon, 11 Jul 2016 17:18:55 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 11 Jul 2016 08:18:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,347,1464678000"; d="scan'208";a="1019519530" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by fmsmga002.fm.intel.com with ESMTP; 11 Jul 2016 08:18:52 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX152.ger.corp.intel.com (163.33.192.66) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 11 Jul 2016 16:18:51 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.125]) by irsmsx111.ger.corp.intel.com ([169.254.2.182]) with mapi id 14.03.0248.002; Mon, 11 Jul 2016 16:18:51 +0100 From: "De Lara Guarch, Pablo" To: "amartya.das@wipro.com" , "users@dpdk.org" Thread-Topic: dpdk-users] [Snow 3g Hash API] Thread-Index: AdHZKQxqKk0ynvrhSPm1Hx6v9MJ9iACXRPfg Date: Mon, 11 Jul 2016 15:18:50 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWQwYzVkZTYtMDQ1Ny00YmYxLWIzNGQtYTE3NjNkNzc0NzUyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjIxa1Z5bkFRRE5kMXF2dkVsSlBZd1F4WElvb2kwZlwvTVBCU1dGUHlRTm13PSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-users] dpdk-users] [Snow 3g Hash API] X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2016 15:18:56 -0000 Hi Amartya, > -----Original Message----- > From: users [mailto:users-bounces@dpdk.org] On Behalf Of > amartya.das@wipro.com > Sent: Friday, July 08, 2016 3:58 PM > To: users@dpdk.org > Subject: [dpdk-users] dpdk-users] [Snow 3g Hash API] >=20 > Hi, >=20 > I am trying to integrate Snow3G API in our stack. I have made a below dat= a > dump to be used for unit test: >=20 > struct snow3g_hash_test_data snow3g_hash_test_case_2 =3D { > .key =3D { > .data =3D > {0xe4,0xa8,0x46,0x48,0x1e,0xbd,0x10,0x26,0x70,0xe2,0x3a,0xc0,0x32,0xfb,0x= c > a,0xe0}, > .len =3D 16 > }, >=20 > .aad =3D { > .data =3D { > 0x00, 0x00, 0x00, 0x00, 0= x00, 0x00, 0x00, 0x00, > 0x00, 0x00, 0x00, 0x00, 0= x00, 0x00, 0x00, 0x00 > }, > .len =3D 16 > }, >=20 > .plaintext =3D { > .data =3D {0x83, 0x32, 0x00, 0x10}, > .len =3D 32 > }, > .validAuthLenInBits =3D { > .len =3D 32 > }, > .validAuthOffsetLenInBits =3D { > .len =3D 128 > }, > .digest =3D { > .data =3D {0x38, 0xB5, 0x54, 0xC0 }, > .len =3D 4 > } > }; >=20 >=20 > However, I want to test with count =3D 1024, dir =3D 01, fresh =3D 0 as p= er 3gpp test > vector . In that case aad.data value will be changed. >=20 > It will be a great help, if anybody could tell what will be add.data valu= e for > that and logic to put the data accordingly. The AAD is the IV passed to the Snow3G f9 function.=20 >>From the 3GPP specifications, the IV is (from MSB to LSB): IV_3 =3D COUNT[0-31] IV_2 =3D FRESH[0-31] IV_1 =3D DIRECTION[0] XOR COUNT[0] || COUNT[1-31] IV_0 =3D FRESH[0-31] So, in your case: IV =3D 0x00000400, 0x00000000, 0x80000400, 0x00000000 Pablo >=20 > Thanks in advance. >=20 > BRs > Amartya