- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Team,
I'm struggling to use the method ippsGFpECPrivateKey for an elliptic curve configured following this process:
1) Create Gallois Field using:
ippsGFpInitFixed(521, ippsGFpMethod_p521r1(), gf_output);
gf_output size is 1768.
2) Create Elliptic Curve using:
ippsGFpECInitStd521r1(gf_output_GF, ec_output)
Note that ec_output was first reseat with ec_size_output (4064) extracted from
ippsGFpECGetSize(gf_output_GF, ec_size_output)
3) Create BigNum using:
ippsECCPGetSizeStd521r1(secret_key_size_output)
convert secret_key_size_output (12808) into secret_key_size_word (401)
ippsBigNumGetSize(secret_key_size_word, bn_size_output)
big_num now reseat with bn_size_output (3271)
ippsBigNumInit(secret_key_size_word, big_num)
4) Now onto using ippsGFpECPrivateKey
ippsGFpECPrivateKey(secret_key(size=3271), elliptic_curve(size=4064), randfunc, randctx)
The error returned is -6.
I can see from the documentation that -6 "Indicates an error condition if the parameter pointed to by pPrivate has a memory size that is less than the order n of the elliptic curve base point G."
This same process does produce the correct results, for std256r1 and std384r1, would somebody understand what i'm doing wrong for std521r1?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you tell us your OS, IPP version, and CPU information, as well as a simple reproducer for this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ruqiu,
Thanks for the response.
I believe my problem is now gone.
Trying to create a simple reproducer, I realised that the randfunc() was the one sending back the ippStsSizeErr error...
Best Regards,
Jeremie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jeremie,
Thank you let us know the issue is gone.
And glad to know that you found out the real issue in your code when trying to create a reproducer.
Best,
Ruqiu

Reply
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