Hi Srinath,
Have you verified the key using dumpasn1 or other tool?
What happens when you use a FileSource rather than a fopen\buffer
\StringSource combination?
Jeff
>From *.cpp:
BYTE *ReadFromDisk(TCHAR *FileName, DWORD *dwBufferLen)
{
unsigned char *buff = NULL;
*dwBufferLen = 0;
// Read the file and store data in pbBuffer
FILE *f = fopen(FileName, "rb");
....
}
On Feb 27, 3:29 pm, Srinath Sitaraman <[email protected]>
wrote:
> Hi,
> I have an application that's using cryptopp521 package. I am attaching
> herwith a portion of sample code that's the subject of concern.
>
> I create an ECDSA<ECP, SHA>::PublicKey object, ECKpub and I use it to load
> the public key (please see attached binary file) which is 302 bytes long as
> follows:
>
> ECKpub.Load(StringSource(pkPub, Len, true, NULL)); //Here Len = 302 and
> pkPub is a pointer to the public key
>
> The Load call throws an unhandled exception. However, when I use the
> cryptopp552 package, I do not get an exception. Do you have any thoughts on
> why this is happening?! Using the crypto552 package is not an issue for me,
> but I am trying to understand what the problem could be, and fix if it I am
> doing something wrong in my code.
>
> Thanks in advance.
>
> Srinath
>
> Test.cpp
> 1KViewDownload
>
> PubKey.bin
> < 1KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---