Re: Basics concepts about openssl+rsa

2010-08-18 Thread Leandro Santiago
Hello again. I'm reading these documents and I've seen that the IO struct for these is the BIO struct. My idea is do something like following (I've generated rsa_public.key with genrsa): $ openssl rsautl -encrypt -in legible_file -pubin -inkey rsa_public.key -out encrypted_file But in my progra

Re: Basics concepts about openssl+rsa

2010-08-17 Thread Leandro Santiago
Thx. I'll read these documents. In my system the keys aren't generated in "instalation-time", but I have both the keys, private and public pre-generated. Actually in my system the password based encrypt system works fine, and it's part of a larger subsystem. So the rsa idea has sounded good for m

Re: Basics concepts about openssl+rsa

2010-08-17 Thread Wim Lewis
On Aug 17, 2010, at 3:19 PM, Wim Lewis wrote: > But for any real-world application, you'll want to do the standard business > of generating a session key, encrypting the message using conventional > symmetric encryption, and encrypting the session key with the public key. > Since that's a lot o

Re: Basics concepts about openssl+rsa

2010-08-17 Thread Wim Lewis
On Aug 17, 2010, at 12:37 PM, Leandro Santiago wrote: > It's really a basic doubt: How can I parse a file with the public key > to a struct which I can use to encrypt the string. Maybe just a > simple_example.c... :-) And also an example about decrypt using the > private key, of course :-) > > I'