Very easy!
If you want to use digital signatue. you have better use the standard data format. 
such as pkcs7 SignedData. instead of just cryto a plain message use your private key. 
In this way, that your signatue can be shared by those software(IE,NE...).  You can 
learn how to do it in cryto/pkcs7/enc.c

If you just want to sign it. you may hash your plain text(use md5 or sha1) and
RSA_private_encrypt() it. so, it is a signature, *_*, so coarse.

-----原始邮件-----
发件人: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]代表 [EMAIL PROTECTED]
发送时间: 2000年9月8日 14:05
收件人: [EMAIL PROTECTED]
主题: how to encrypt data with public key


hi, all,
i already have the public key pairs, the problem
is that how can i use openssl to encrypt plaintext
using the public key and then decrypt it with
the private key? in other words, how to realize
digital signature with openssl?
thank all of you very much!!!
sincerely,
ice

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to