I had a look at the example in RSA phpseclib.
- Code: Select all
$rsa = new Crypt_RSA();
$plaintext = 'terrafrost';
$ciphertext = $rsa->encrypt($plaintext);
As I see it encrypts with private key. But the RSA specs tells that it should be done with public key. Check it out: http://en.wikipedia.org/wiki/RSA