The following code (I think it cant be more simple) validates the key in windows but
not in Solaris.
Any comments?
Murat :-)
-----------------------------
#include <stdio.h>
#include <stdlib.h>
#include <cryptlib.h>
#include <dsa.h>
#include <osrng.h>
#include <hex.h>
USING_NAMESPACE(CryptoPP)
USING_NAMESPACE(std)
RandomPool rng;
int main(int argc,char *argv[])
{
char privKey[] = "3081E70201003081C906072A8648CE3804013081BD02510"
"084CA34301AB2EC920DE1304BF4467258D5371869FF9710D541790376D615B57B9CDB89A5"
"7D9511DCAB6AF2A068DE8C1F9D92752B7BAEE2F3CD50D0CA6B1809F46CF3E2D5C4786A110"
"9A40DB6929A5B85021500EDFFB2725C9F7C688E1DE003E70B87F9E67C115902510081D65A"
"CBD4C406FEEB4EACBF8CBEBE4A4AAB911D65BEC76A0DB254FBF5D77F42A0EE39C2E75FAC3"
"5C78B74ADD0C306471AAC93B9CB9EAB392C773E4E3596D74A31372B2E861EFD8603EA5CC5"
"6A315A120416021441A76580783FE328E58753C4880D0FD00A12514D";
rng.Put((unsigned char*)"1234567890",10);
StringSource fs((byte*)privKey,strlen(privKey), true, new HexDecoder());
GDSA<SHA>::Signer priv(fs);
if (!priv.GetKey().Validate(rng,3))
{
printf("Could not validate private key\n");
}
else
printf("Validated private key\n");
return 0;
}
----------------------------
*********** REPLY SEPARATOR ***********
On 05.05.2003 at 14:55 Wei Dai wrote:
I just noticed this email sitting in my inbox. Have you been able to
resolve this problem? If not unfortunately I don't have access to a
Solaris machine with gcc 3.2.1 installed. I suggest that you run your test
program under a debugger on both Solaris and Windows, and trace the
executions step by step until they start to differ, and try to pin down
where the problem lies.
On Tue, Apr 29, 2003 at 04:49:46PM +0300, Murat Eren wrote:
> Hi,
> I am using crypto51 for dsa, signing and verifying. I encountered with
the problem that same keys are validated in Windows, but not in Solaris.
Attached you will find the test program source code and keys and Makefile
for Solaris.
> I am using VC60 in windows, and g++ in Solaris.
>
> (Configured with: ../configure --disable-nls --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld
> Thread model: posix
> gcc version 3.2.1)
>
> Any idea? Looking forward for a solution.
>
> Murat :-)