Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

I wrote a sample app using IRSA. It worked for me with the below mentioned modulus, private and public key exponent values.

static const unsigned char s_modulus[] =
{
0xc0, 0xf0, 0x40, 0x5d, 0x7b, 0x46, 0x04, 0xfe, 0xc3, 0xbc, 0x1c,
0x5e, 0xed, 0xf9, 0xdf, 0x03, 0x89, 0x66, 0x3b, 0xaa, 0xde, 0xcb,
0x01, 0xe4, 0x0d, 0x9a, 0xd5, 0x7a, 0xf4, 0x8e, 0xd4, 0x9d
;

// 256-bit private key exponent 1
static const unsigned char s_private[] =
{
0x80, 0xa0, 0x2a, 0xe8, 0xfc, 0xd9, 0x58, 0xa9, 0xd7, 0xd2, 0xbd, 0x94,
0x9e, 0xa6, 0x94, 0xab, 0xdd, 0x23, 0x32, 0xc5, 0x81, 0xa8, 0x47, 0xa7,
0x9c, 0xe3, 0x57, 0xb8, 0x53, 0x67, 0xbf, 0xab
;

static const unsigned char s_pcpublicexponent = 0x03;

I got this from a sample application.

But i tried the modulus with different values, Then IRSA_INIT returned failed. What values we have to use for modulus? And using this modulus, how to get private array.

And is there any rule that we have to use 256 bit array only for modulus and private exponents??

Thanks

LOK

its good to read about RSA before using it as you need to specify the Key to the Algo.
You need to calculate Exponent using the Modulus. So Modulus is changed at Random, it may be invalid.
read through Key Generation here. most of your queries would be answered.
http://en.wikipedia.org/wiki/RSA
- And is there any rule that we have to use 256 bit array only for modulus and private exponents??
There no such limit. it may be less than 256 bits as long as they are correct as per RSA standards above.
thanks.

its good to read about RSA before using it as you need to specify the Key to the Algo.
You need to calculate Exponent using the Modulus. So Modulus is changed at Random, it may be invalid.
read through Key Generation here. most of your queries would be answered.
http://en.wikipedia.org/wiki/RSA
- And is there any rule that we have to use 256 bit array only for modulus and private exponents??
There no such limit. it may be less than 256 bits as long as they are correct as per RSA standards above.
thanks.