Thanks. I saw the libsso code. As made the changes accordingly and its working 
now.

IV_0 = (count) (4 bytes)
IV_1 = (fresh) (4 bytes)
IV_2 = (count^(dir<<31)) (4 bytes)
IV_3  = (fresh^(dir<<15)) (4 bytes)

BRs
Amartya

-----Original Message-----
From: De Lara Guarch, Pablo [mailto:[email protected]]
Sent: Monday, July 11, 2016 8:49 PM
To: Amartya Kumar Das (MFG & Tech) <amartya.das at wipro.com>; users at dpdk.org
Subject: RE: dpdk-users] [Snow 3g Hash API]

** This mail has been sent from an external source **

Hi Amartya,

> -----Original Message-----
> From: users [mailto:users-bounces at dpdk.org] On Behalf Of
> amartya.das at wipro.com
> Sent: Friday, July 08, 2016 3:58 PM
> To: users at 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

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. WARNING: Computer viruses can be transmitted via email. The 
recipient should check this email and any attachments for the presence of 
viruses. The company accepts no liability for any damage caused by any virus 
transmitted by this email. www.wipro.com

Reply via email to