RE: RSA encryption and Decryption code in C language

2013-07-02 Thread yamini
Hello Enrico, Thanks for the code! It really helped. Regards, yamini. -- View this message in context: http://openssl.6102.n7.nabble.com/RSA-encryption-and-Decryption-code-in-C-language-tp45588p45759.html Sent from the OpenSSL - User mailing list archive at Nabble.com

RSA encryption and Decryption code in C language

2013-06-18 Thread yamini
(client and server are on different machines). Thanks and Regards, Yamini. -- View this message in context: http://openssl.6102.n7.nabble.com/RSA-encryption-and-Decryption-code-in-C-language-tp45588.html Sent from the OpenSSL - User mailing list archive at Nabble.com

Re: RSA encryption and Decryption code in C language

2013-06-18 Thread Michel
Hi Yamini, I would suggest looking at the 'EVP Envelope' API : https://www.openssl.org/docs/crypto/EVP_SealInit.html Le 17/06/2013 19:26, yamini a écrit : Hello, I am implementing the DES algorithm between my client and server systems for encryption. The DES key is transmitted in encrypted

Re: RSA encryption and Decryption code in C language

2013-06-18 Thread Matt Caswell
On 18 June 2013 09:43, Michel msa...@paybox.com wrote: Hi Yamini, I would suggest looking at the 'EVP Envelope' API : https://www.openssl.org/docs/crypto/EVP_SealInit.html Also see: http://wiki.openssl.org/index.php/EVP_Asymmetric_Encryption_and_Decryption_of_an_Envelope Matt

RE: RSA encryption and Decryption code in C language

2013-06-18 Thread enrico d'urso
Hi, I'm implementing a software very similar to yours. This is a small function that I used to generate private and public key: #include openssl/pem.h int main() { char * file_pem = key_priv; char * file_pem_pub = key_pub; FILE * fp; int bits = 1024; unsigned long exp =

Re: RSA encryption and Decryption code in C language

2013-06-18 Thread Hemayamini Kurra
Hello Michel, Thanks for the link. I have the following code. int main() { RSA *key; unsigned char input_ptext[] = 58FD6F1C310FC9D0194FB8B0E99070A6CBA3473BFE69F953E60E99070A6CBA3473BFE69F953E0E99070A6CBA3473BFE69F953E0E99070A6CBAE; unsigned char ctext[256]; unsigned char ptext[256];

Re: RSA encryption and Decryption code in C language

2013-06-18 Thread Ken Goldman
You cannot generate a private key from a public key. Typically, the receiver generates the key pair and sends the public key to the sender. The sender encrypts with the public key. The receiver decrypts with the private key. A typical format for sending a public key across a channel is an