Results 1 to 3 of 3
Hi,
I want to encrypt a text using rsa encryption method. I did it using command openssl but i want it using my library api, the library api is as,
...
- 07-08-2010 #1Just Joined!
- Join Date
- Feb 2008
- Posts
- 50
RSA Encryption
Hi,
I want to encrypt a text using rsa encryption method. I did it using command openssl but i want it using my library api, the library api is as,
int rsa_calc (unsigned char * msg, unsigned char * mod, int count, int exp, unsigned char result);
I can't understand how i input public key (.pem file) and what will be the modulus (unsigned char * mod) and exponent (int exp) for any text.
Is there any kind of formula to calculate modulus and exponent of the text.
Please help on this.
- 07-08-2010 #2
unsigned char = 1 byte = 8 bit
you would probably cast it to unsigned int and do the encryption on the numeric. how the RSA encryption works on a numeric should be clear if you understood how RSA works / the mathematics behind it.
why use your api and not the openssl one? I ask because I don't trust the programming skills of software engineers and neither mine.
- 07-09-2010 #3Just Joined!
- Join Date
- Feb 2008
- Posts
- 50
Thanks for your reply Kloschüssel.. I can't use openssl here since I am doing this encryption at POS device where I can't use openssl or can't install any package on the device as it does't give permissions to install any package..
I am trying with this API and hopefully will solve my problem.
Thanks


Reply With Quote