Encrypt with private key and decrypt with public key

What I’d like to know is simple. Can I use OpenSSL to encrypt a string “hello” with a private key then send it to everyone who can decrypt it with the public key to retrieve the original string.

I’ve searched all around and can’t really find anything.

Mathematically I can use the private exponent and public modulus to perform an encryption then use the public exponent and public modulus to perform the decryption.

Can I do this with OpenSSL?

I’ve read that this is considered signing. Then how can I sign with my private key and receive the original data from the signed file with just the public key?

I’ve read a lot of the responses on the web and they’re all vague. Can anyone give me clear solutions?

If it is possible to encrypt with a private key and decrypt with public can anyone give me an example on how to do it with the openssl tool? Or do I have to write my own implementation?

Leave a Comment