ssh-keygen -p -N "" -f ~/.ssh/id_rsa -m pem
ssh-keygen -e -m PKCS8 -f ~/.ssh/id_rsa
openssl rsautl -encrypt -pubin -inkey <(ssh-keygen -e -m PKCS8 -f ~/.ssh/id_rsa.pub) -in ~/Downloads/play.txt -out ~/Downloads/play.enc
openssl rsautl -decrypt -inkey ~/.ssh/id_rsa -in ~/Downloads/play.enc
It's not always easy to share the cypher data by file . . . so you can do this to make it easier.
openssl rsautl -encrypt -pubin -inkey <(ssh-keygen -e -m PKCS8 -f ~/.ssh/id_rsa.pub) -in ~/Downloads/play.txt | base64 | pbcopy
Someone encrypted something to you? Try to copy it and do this!
pbpaste | base64 -D | openssl rsautl -decrypt -inkey ~/.ssh/id_rsa