Search This Blog

Tuesday, September 17, 2013

Public Key encryption in PHP

I created the keys with openssl using:
generate a 1024 bit rsa private key, ask for a passphrase to encrypt it and save to file.

openssl genrsa -des3 -out /path/to/privatekey 1024

generate the public key for the private key and save to file
openssl rsa -in /path/to/privatekey -pubout -out /path/to/publickey







No comments: