DPDK usage discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "amartya.das@wipro.com" <amartya.das@wipro.com>,
	"users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] dpdk-users] [Snow 3g Hash API]
Date: Mon, 11 Jul 2016 15:18:50 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8973C98C715@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <PS1PR03MB18831F2DFC0C352B5DE38689ED3C0@PS1PR03MB1883.apcprd03.prod.outlook.com>

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]
> 
> Hi,
> 
> I am trying to integrate Snow3G API in our stack. I have made a below data
> dump to be used for unit test:
> 
> struct snow3g_hash_test_data snow3g_hash_test_case_2 = {
>                 .key = {
>                                 .data =
> {0xe4,0xa8,0x46,0x48,0x1e,0xbd,0x10,0x26,0x70,0xe2,0x3a,0xc0,0x32,0xfb,0xc
> a,0xe0},
>                                 .len = 16
>                 },
> 
>                 .aad = {
>                                 .data = {
>                                                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>                                                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
>                                 },
>                                 .len = 16
>                 },
> 
>                 .plaintext = {
>                                 .data = {0x83, 0x32, 0x00, 0x10},
>                                 .len = 32
>                 },
>                 .validAuthLenInBits = {
>                                 .len = 32
>                                 },
>                 .validAuthOffsetLenInBits = {
>                                 .len = 128
>                 },
>                 .digest = {
>                                 .data = {0x38, 0xB5, 0x54, 0xC0 },
>                                 .len  = 4
>                 }
> };
> 
> 
> However, I want to test with count = 1024, dir = 01, fresh = 0 as per 3gpp test
> vector . In that case aad.data  value will be changed.
> 
> It will be a great help, if anybody could tell what will be add.data value for
> that and logic to put the data accordingly.

The AAD is the IV passed to the Snow3G f9 function. 
>From the 3GPP specifications, the IV is (from MSB to LSB):
IV_3 = COUNT[0-31]
IV_2 = FRESH[0-31]
IV_1 = DIRECTION[0] XOR COUNT[0] || COUNT[1-31]
IV_0 = FRESH[0-31]

So, in your case:
IV = 0x00000400,  0x00000000, 0x80000400, 0x00000000

Pablo
> 
> Thanks in advance.
> 
> BRs
> Amartya

  reply	other threads:[~2016-07-11 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 14:57 amartya.das
2016-07-11 15:18 ` De Lara Guarch, Pablo [this message]
2016-07-12  3:01   ` amartya.das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E115CCD9D858EF4F90C690B0DCB4D8973C98C715@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=amartya.das@wipro.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).