On 03/28/2012 05:51 PM, Frater wrote:
> Thor Lancelot Simon pisze:
>> On Wed, Mar 28, 2012 at 04:07:37PM +0200, Frater wrote:
>>   
>>> Please write to me a simple example or show me code on internet.
>>>     
>> Should we perhaps send email to your professor instead?
>>   
> You are unlucky, not studying for 20 years;)

You should. You know, lifelong learning;) However I don't know how to
send email to a web search engine, as it is our professor know.
Don't afraid to ask em questions.

The thing about assymetric encryption is that it is sloow. So
customarily weuse it only with small data; verifying a hash or
encrypting a symmetric key.
Well, I am lying. Cryptography should only be implemented by people who
know both cryptography and programming. As I am not proficient in
either, I just give advices.
In case of encryption you may want to generate a key for symmetric
encryption (pitfall: enough entropy and correct random generation),
encrypt it using the public key of the recipient (pitfall: dunno. maybe
salting and padding), use the symmetric key to encrypt the actual
message (pitfall: salting, padding, chaining), and send it. (pitfall:
key destruction).
Fortunately there is a standard how to do it, called pkcs7 a.k.a. s/mime.

So in short: you should choose a mailer application which is written by
people you trust won't fall into any of the possible problem, import the
pem files and send your big string using its encryption.

And seriously: http://www.openssl.org/docs/crypto/PKCS7_encrypt.html


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to