OpenSSL
Génération des keys:
openssl rand -base64 48 > passphrase.txt openssl genrsa -aes256 -passout file:passphrase.txt -out privatetest.key 4092 openssl rsa -passin file:passphrase.txt -in privatetest.key -pubout -out publictest.key
To encrypt:
openssl rsautl -passin file:passphrase.txt -encrypt -pubin -inkey publictest.key -in test.txt -out test.base64
To decrypt:
openssl rsautl -passin file:passphrase.txt -decrypt -inkey privatetest.key -in test.base64 -out decrypt_test.txt