[dpdk-users] dpdk-users] [Snow 3g Hash API]
De Lara Guarch, Pablo
pablo.de.lara.guarch at intel.com
Mon Jul 11 17:18:50 CEST 2016
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
More information about the users
mailing list