> Well memcmp certainly wont work with an RSA structure, it contains pointers
> which will differ even for the same key.
>
> You can check the values by calling BN_cmp() on rsa->n and rsa->e .
Marvelous. That's solved my problem.
Thank you for your time and input Dr. Henson.
_
ising and then deserialising the
> key. I've read the other posts to the list on this, but I
> haven't had any luck.
>
> Here's my problem - The deserialised key does not match
> the original public key:
>
> // Code beginning
>
> int serialisedPublic
to the list on this, but I
haven't had any luck.
Here's my problem - The deserialised key does not match
the original public key:
// Code beginning
int serialisedPublicKeySize = i2d_RSAPublicKey(ourKeyPair->pub_key, NULL);
unsigned char* serialisedPublicKey = new unsigned
t;
> unsigned char *ptr;
> int derlen
> ptr=keystr;
> derlen=i2d_RSAPublicKey(rsa,&ptr);
> ptr=keystr;
>
> In a function B:
>
>
>unsigned char *ptr;
> int len;
>
> ptr=keystr; //keystr is a param but its value is equal keystr in
> function A
Hello.
I have a problem with this situation:
I have this code in function A:
char keystr[1024];
...
RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL);
unsigned char *ptr;
int derlen
ptr=keystr;
derlen=i2d_RSAPublicKey(rsa,&ptr);
ptr=keystr;
In a function B:
unsigned char
Hello.
I have a problem with this situation:
I have this code in function A:
char keystr[1024];
...
RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL);
unsigned char *ptr;
int derlen
ptr=keystr;
derlen=i2d_RSAPublicKey(rsa,&ptr);
ptr=keystr;
In a function B:
unsigned char
Rafa Marín López wrote:
> Hello, all.
Hello,
> I have executed this instruction:
>
> char keystr[1024];
>
> RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL);
>
> i2d_RSAPublicKey(rsa,&(keystr));
&keystr is a I/O parameter, pointing past the DER coded k
Rafa Marín López wrote:
>
> Hello, all.
>
> I have executed this instruction:
>
> char keystr[1024];
>
> RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL);
>
> i2d_RSAPublicKey(rsa,&(keystr));
>
> But resultant keystr is zeroed. Why?
>
>
Hello, all.
I have executed this instruction:
char keystr[1024];
RSA *rsa=RSA_generate_key((int)1024,0x10001,NULL,NULL);
i2d_RSAPublicKey(rsa,&(keystr));
But resultant keystr is zeroed. Why?
I have verified the RSA key pair and they are cor