Emmanuel Lepavec wrote:
You use RSA_private_encrypt(...) on the message's digest to generate a signature. The result can be decrypted with the public_decrypt-function if you have the public part.Victor Duchovni wrote:The private key is for signing and decryption, the public key is for signature verification and encryption... Do not encrypt/decrypt arbitrary data with RSA (only suitable message digests, session keys, and other standard uses).Thanks for your answer. But why does the RSA_private_encrypt(...) function exist?
If you could detail your intended use it may be clearer for me why you want to do that. Remember that it's very easy to do wrong things in cryptographic applications, so I'm always a bit suspicious if someone has a "non standard use"... ;)The problem is that, even though it is not standard use, I *need* to do encryption with the Private Key.
[...]
Hope it helps. Ted ;) -- PGP Public Key Information Download complete Key from http://www.convey.de/ted/tedkey_convey.asc Key fingerprint = 31B0 E029 BCF9 6605 DAC1 B2E1 0CC8 70F4 7AFB 8D26
smime.p7s
Description: S/MIME Cryptographic Signature