Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® Integrated Performance Primitives
- Problem with IPP extension fields function

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

kleboeuf

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-09-2011
03:52 PM

137 Views

Problem with IPP extension fields function

I've recently started working with the Intel IPP library for a research project at my school involving finite field arithmetic. I was having some problems setting up extension fields, and was wondering if anyone could either tell me what I'm doing wrong, or confirm that what I'm trying to do is not possible.

I'm trying to work in medium-sized binary extension fields that are of interest in the area of cryptography; say GF(2^233). I'm trying to set up an IppsGFPXState, but I cannot get past the GFPXGetSize step, which is used to determine how much memory needs to be allocated for the IppsGFPXState context structure.

I can get GFPXGetSize to work for low-degree extensions; specifically, as long as m in GF(2^m) stays below 10 the function does not return an error. I have looked through the documentation, and was unable to find any mention of a limitation on the degree of the extension.

Shown below is modified code from Andrzej and Jakub Chrzeszczyk's 'Intel IPP Cryptography Guide' to demonstrate the problem that I'm having (also attached; see a.cpp):

[cpp]#include "ippcore.h" #include "ippcp.h" #includeint main(){ using namespace std; srand(time(0)); Ipp32u degree=9; Ipp32u bitS=32; Ipp32u size; IppStatus w; const Ipp32u P[] = {0x00000002}; ippsGFPGetSize(bitS,&size); IppsGFPState* GFP= (IppsGFPState*)(new Ipp8u [size]); w=ippsGFPInit(GFP,P,bitS); const Ipp32u *Prime=0; Ipp32u elemLen; w=ippsGFPGet(GFP,″,&elemLen); Ipp32u xsize; w=ippsGFPXGetSize(GFP,degree,&xsize); cout <<"XGetSize: "<

I am compiling the above code on an Intel Q9650 @ 3GHz Linux machine running CentOS 4.8, 64-bit using the following command:

icpc -ipp=crypto a.cpp

I am using version 12.0.2 of the Intel compiler, and version 7.0.2 of the cryptography IPP.

If I change the line "Ipp32u degree=9" to degree=10 or above, the program will still compile fine, but I get the following error when I run the executable: "XGetSize: ippStsSizeErr: Wrong value of data size"

If anyone can shed some light on this issue it would be greatly appreciated!

Karl Leboeuf#include "ippcore.h"

#include "ippcp.h"

#include

int main(){

using namespace std;

srand(time(0));

Ipp32u bitS=32;

Ipp32u size;

IppStatus w;

const Ipp32u P[] = {0x00000002};

ippsGFPGetSize(bitS,&size);

IppsGFPState* GFP= (IppsGFPState*)(new Ipp8u [size]);

w=ippsGFPInit(GFP,P,bitS);

const Ipp32u *Prime=0;

Ipp32u elemLen;

w=ippsGFPGet(GFP,″,&elemLen);

///////////CANNOT SET DEGREE ABOVE 10////////

Ipp32u degree=9;

/////////////////////////////////////////////

Ipp32u xsize;

w=ippsGFPXGetSize(GFP,degree,&xsize);

cout <<"XGetSize: "<

delete [] (Ipp8u*)GFP;

return 0;

}

1 Solution

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-10-2011
11:10 PM

137 Views

Yes, that's happens becasue of there is the restriction in the current implementation. we will add some note about this restriction in to the future version.

--Gennady

Link Copied

3 Replies

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-10-2011
11:10 PM

138 Views

Yes, that's happens becasue of there is the restriction in the current implementation. we will add some note about this restriction in to the future version.

--Gennady

kleboeuf

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-11-2011
05:58 AM

137 Views

Thank you very much for your reply. I am disappointed that this is the case! Are you aware of any other way I can access binary field multiplication functions for NIST fields? I know that they are in there somewhere, because

Either way, a note about the restriction would have been appreciated!

Thank you for your time,

Karl Leboeuf

Andrzej_Chrzeszczyk

New Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-11-2011
12:41 PM

137 Views

The IPP Manual, Vol4 (p.522 in my version) states that

in GF(p) (and consequently in GF(p^d))

p is ***ODD*** PRIME.

The case p=2 is considered in different chapters.

You can perform calculations concerning elliptic curves

(including NIST curves)

over GF(2^m) with large m using ECCB functions.

Elements of GF(2^m) are considered there as BigNums

(and not as elements of extension field).

Andrzej Chrzeszczyk

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.